Skip to content

API: C++ and MSVC extensions #108

@PMeira

Description

@PMeira

Regarding the API side (not implementation of the library), it could be useful to add a header that maps the C-API to the equivalent COM presentation of the API using MSVC properties (non-standard C++): https://docs.microsoft.com/en-us/cpp/cpp/property-cpp?view=msvc-170

This shouldn't be too hard to create or maintain but would take a few days to implement and test. This would complement our current offerings to provide almost drop-in replacements for the COM module (at the moment, we have DSS Python, DSS Sharp, and DSS MATLAB).

The extension has also been implemented in Clang for a while (several years, needs -fms-extensions or similar compiler flags), so this could be a path to migrate Windows-specific C++ code to Linux/macOS without too much hassle. Apparently this is also available in GCC but I couldn't find a reference in the docs, but there are comments like https://blog.aaronballman.com/2011/11/an-almost-useful-language-extension/#comment-208718 that suggest it really is available. Even in the Wikipedia section it lists GCC as supporting it: https://en.wikipedia.org/wiki/Property_%28programming%29#C++ -- I couldn't find anything in GCC's testsuite, so maybe this was removed. There are always other "less clean" ways to implement a similar API in C++ if it comes to that.

Unless more users request this, it's is not a high priority at the moment, it's just "nice to have" by v1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions