https://github.com/konard/cppcligenericsexample
Generating multiple implementations of a generic interface using C++/CLI template and .NET Framework 4.7.2
https://github.com/konard/cppcligenericsexample
cpp-cli generics net-framework-472 template
Last synced: about 1 month ago
JSON representation
Generating multiple implementations of a generic interface using C++/CLI template and .NET Framework 4.7.2
- Host: GitHub
- URL: https://github.com/konard/cppcligenericsexample
- Owner: Konard
- License: mit
- Created: 2019-05-24T18:31:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-24T19:44:16.000Z (almost 6 years ago)
- Last Synced: 2025-02-11T12:44:58.190Z (3 months ago)
- Topics: cpp-cli, generics, net-framework-472, template
- Language: C++
- Size: 17.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CppCLIGenericsExample
This example shows how to generate multiple generic interface implementations using C++/CLI template. There is the `IGeneric` interface. C++/CLI template is used to generate specific implementations of this interface for `UInt64`, `UInt32`, `UInt16` and `Byte` types. All implementations share single base template `ClassTemplate` logic.The problem with current approach is that it works only for Windows while support for C++/CLI is not crossplatform.
It is possible to achieve the same result using [C#, T4 text template and .NET Core 2.2](https://github.com/Konard/T4GenericsExample).
## Prerequisites
* [Visual Studio 2019 Community Edition](https://visualstudio.microsoft.com/vs/) (at least)
* [Microsoft .NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)## Run
* Clone repository
* Open solution (`.sln` file) in Visual Studio
* Press `F5` to build and start program## Development process videos
https://youtu.be/MSjBlWnINQQ