My Account Log in

1 option

C++ software interoperability for Windows programmers : connecting to C#, R, and Python clients / Adam Gladstone.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Gladstone, Adam, author.
Series:
ITpro collection
Language:
English
Subjects (All):
C++ (Computer program language).
Physical Description:
1 online resource (235 pages)
Place of Publication:
New York : Apress L. P., [2022]
Summary:
Get up-to-speed quickly and connect modern code written in C#, R, and Python to an existing codebase written in C++. This book for practitioners is about software interoperability in a Windows environment from C++ to languages such as C#, R, and Python. Using a series of example projects, the book demonstrates how to connect a simple C++ codebase packaged as a static or dynamic library to modern clients written in C#, R, and Python. The book shows you how to develop the in-between components that allow disparate languages to communicate. This book addresses a fundamental question in software design: given an existing C++ codebase, how does one go about connecting that codebase to clients written in C#, R, and Python? How is the C++ functionality exposed to these clients? One answer may be to rewrite the existing codebase in the target language. This is rarely, if ever, feasible and this book's goal is to save you the pain and the high cost of throwing out valuable existing code by showing you how to make that older code function alongside and with the more modern languages that are commonly in use today. The knowledge you will gain from reading this book will help you broaden your architectural choices and take advantage of the growing amount of talent around newer languages. What You Will Learn Build components that connect C++ to other languages Translate between the C++ type system and the type systems of C#, R, and Python Write a managed assembly targeting the .NET framework Create C++ packages for use in R/Studio Develop Python modules based on high-performance C++ code Overcome the difficulties and pitfalls involved in cross-language development.
Contents:
Intro
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Part I: Foundations
Chapter 1: Preliminaries
Prerequisites
How to Use This Book
The Software Interoperability Project
The Projects
Terminology
How the Projects Fit Together
Summary
Chapter 2: C++ Components and C++ Clients
A Tour of the Source Code
Descriptive Statistics
Linear Regression
The Data Manager
Statistical Tests
Functions, Classes, and Type Conversion
C++ Components
StatsLib
Project Settings and Configuration
Building and Testing the Project
StatsLibTest
Building, Running, and Checking the Results
StatsDll
C++ Clients
StatsConsole
StatsViewer
Additional Resources
Exercises
Part II: C++/CLI and .NET
Chapter 3: Building a C++/CLI Wrapper
C++/CLI support
StatsCLR
Project Settings
Code Organization
The Statistics Class
Parameters and Return Values
Type Conversion
Exception Handling
Testing the Code
StatsCLR.UnitTests
Managed Wrapper Classes
The DataManager
The TTest Class
Chapter 4: C# Clients: Consuming the Managed Wrapper
StatsClient
Installing Accord.NET
Statistical Functions
Data Analysis
Data Modelling
Hypothesis Testing
Using Reflection
Module Information
Dynamic Invocation
PowerShell
StatsExcel
Installing Excel-DNA
Exposing Functions to Excel
Build and Run.
Exception Handling
Debugging
Part III: R and Rcpp
Chapter 5: Building an R Package
Rtools
Installing CodeBlocks
CodeBlocks
Toolchain Setup
Project Setup
R/RStudio Packages
Background
Building a Package with Rcpp
Installing Rcpp
The Project Files
Editing the Makefile
Boilerplate Code
Building StatsR
Chapter 6: Exposing Functions Using Rcpp
The Conversion Layer
The Code
Exercising the Functionality
Using a DataFrame
Functions vs. Classes
Rcpp Modules
Testing
Measuring Performance
Distribution Explorer
Part IV: Python
Chapter 7: Building a Python Extension Module
Using Visual Studio Community Edition 2019
StatsPythonRaw
Functions
Declarations
Error Handling
The Module Definition
Python Client
Chapter 8: Module Development with Boost.Python and PyBind
Boost.Python
StatisticalTests
PyBind
Code Organization: module.cpp
The Python "Client"
Performance
The Statistics Service
Exercises.
Chapter 9: Conclusion
Appendix A: Boost Libraries
Installation
Building
References
Appendix B: CMAKE
Building the Outputs
Index.
Notes:
Description based on print version record.
Includes bibliographical references and index.
ISBN:
9781484279663
1484279662
OCLC:
1294345314

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account