Atjaunināt sīkdatņu piekrišanu

E-grāmata: C++ Software Interoperability for Windows Programmers: Connecting to C#, R, and Python Clients

  • Formāts: EPUB+DRM
  • Izdošanas datums: 28-Jan-2022
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484279663
Citas grāmatas par šo tēmu:
  • Formāts - EPUB+DRM
  • Cena: 65,42 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: EPUB+DRM
  • Izdošanas datums: 28-Jan-2022
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484279663
Citas grāmatas par šo tēmu:

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

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

Who This Book Is For

Software developers who are looking for ways to extend existing systems written in C++ using modern languages. Readers should have some programming experience, particularly in C++. Readers should also be familiar with common development tools such as Visual Studio, R/Studio, Visual Studio Code, and CodeBlocks. 



Intermediate user level
About the Author ix
About the Technical Reviewer xi
Acknowledgments xiii
Introduction xv
Part I: Foundations 1(38)
Chapter 1 Preliminaries
3(8)
Introduction
3(1)
Prerequisites
3(1)
How to Use This Book
4(1)
The Software Interoperability Project
5(5)
The Projects
7(1)
Terminology
8(1)
How the Projects Fit Together
9(1)
Summary
10(1)
Chapter 2 C++ Components and C++ Clients
11(28)
Introduction
11(1)
A Tour of the Source Code
11(12)
Descriptive Statistics
12(5)
Linear Regression
17(1)
The Data Manager
18(1)
Statistical Tests
18(5)
Functions, Classes, and Type Conversion
23(1)
C++ Components
23(7)
StatsLib
23(5)
StatsDII
28(2)
C++ Clients
30(4)
Introduction
30(1)
StatsConsole
31(1)
StatsViewer
31(3)
Summary
34(1)
Additional Resources
35(1)
Exercises
35(4)
Part II: C++/CLI and .NET 39(50)
Chapter 3 Building a C++/CLI Wrapper
41(26)
Introduction
41(1)
Prerequisites
42(1)
C++/CLI support
42(1)
StatsCLR
43(11)
Project Settings
43(2)
Code Organization
45(1)
The Statistics Class
46(3)
Type Conversion
49(4)
Exception Handling
53(1)
Testing the Code
54(1)
StatsCLR.UnitTests
54(1)
Managed Wrapper Classes
55(7)
Introduction
55(1)
The DataManager
56(3)
The TTest Class
59(3)
Summary
62(2)
Additional Resources
63(1)
Exercises
64(3)
Chapter 4 C# Clients: Consuming the Managed Wrapper
67(22)
Introduction
67(1)
StatsClient
68(10)
Project Settings
68(1)
Installing Accord.NET
68(1)
Code Organization
68(5)
Using Reflection
73(5)
StatsExcel
78(7)
Installing Excel-DNA
78(1)
Project Settings
79(1)
Exposing Functions to Excel
79(2)
Type Conversion
81(1)
Build and Run
82(1)
Exception Handling
83(2)
Debugging
85(1)
Summary
85(1)
Additional Resources
85(1)
Exercises
86(3)
Part III: R and Rcpp 89(56)
Chapter 5 Building an R Package
91(22)
Introduction
91(1)
Prerequisites
92(1)
Rtools
92(1)
Installing CodeBlocks
92(1)
CodeBlocks
93(6)
Toolchain Setup
93(3)
Project Setup
96(3)
R/RStudio Packages
99(11)
Background
99(2)
Building a Package with Rcpp
101(9)
Summary
110(1)
Additional Resources
111(1)
Exercises
111(2)
Chapter 6 Exposing Functions Using Rcpp
113(32)
Introduction
113(1)
The Conversion Layer
113(1)
Code Organization
114(15)
Descriptive Statistics
114(6)
Linear Regression
120(5)
Statistical Tests
125(4)
Testing
129(2)
Measuring Performance
131(3)
Debugging
134(1)
Distribution Explorer
135(2)
Summary
137(1)
Additional Resources
138(1)
Exercises
138(7)
Part IV: Python 145(68)
Chapter 7 Building a Python Extension Module
147(26)
Introduction
147(1)
Prerequisites
148(1)
Using Visual Studio Community Edition 2019
148(1)
StatsPythonRaw
149(15)
Project Settings
149(1)
Code Organization
150(1)
Functions
150(6)
The Conversion Layer
156(4)
Error Handling
160(2)
The Module Definition
162(2)
Python Client
164(3)
Debugging
166(1)
Summary
167(1)
Additional Resources
167(1)
Exercises
168(5)
Chapter 8 Module Development with Boost.Python and PyBind
173(38)
Introduction
173(1)
Boost.Python
173(13)
Prerequisites
174(1)
Project Settings
174(2)
Code Organization
176(3)
The Conversion Layer
179(1)
The Module Definition
180(4)
Exception Handling
184(2)
PyBind
186(8)
Prerequisites
186(1)
Project Settings
186(1)
Code Organization: module.cpp
187(7)
Exception Handling
194(1)
The Python "Client"
194(8)
Performance
195(4)
The Statistics Service
199(3)
Summary
202(1)
Additional Resources
202(1)
Exercises
203(8)
Chapter 9 Conclusion
211(2)
Appendix A: Boost Libraries 213(2)
Introduction
213(1)
Installation
213(1)
Building
214(1)
References
214(1)
Appendix B: CMAKE 215(4)
Introduction
215(1)
Project Setup
215(2)
Building the Outputs
217(2)
References 219(2)
Index 221
Adam Gladstone is a software developer with more than 20 years of experience in investment banking, building software mostly in C++ and C#. For the last few years, he has been developing data science and machine learning skills, particularly in Python and R after completing a degree in Math & Statistics. He currently works at Virtu Financial Inc. in Madrid as an Analyst Programmer. In his free time, he develops tools for natural language processing.