|
Any++
|
Macros to reduce boilerplate for declaring/defining static runtime data. More...
Macros | |
| #define | ANY_SINGLETON_DECLARE(export_, name, ...) |
| Declare access to a singleton object in a header file. | |
| #define | ANY_SINGLETON(namespace_, name, ...) |
| Define a singleton object in a source file. | |
Macros to reduce boilerplate for declaring/defining static runtime data.
To enable some dynamic functionality (crosscast, open dispatch) there must be some static data holding information to perform these operations. Extra care must be taken in a DLL scenario.
To reduce boilerplate code, Any++ supplies these macros.
| #define ANY_SINGLETON | ( | namespace_, | |
| name, | |||
| ... ) |
Define a singleton object in a source file.
| namespace_ | The namespace for the singleton. |
| name | Name of the singleton. |
| __VA_ARGS__ | Parameters for the singleton constructor. |
See also ANY_SINGLETON_DECLARE.
| #define ANY_SINGLETON_DECLARE | ( | export_, | |
| name, | |||
| ... ) |
Declare access to a singleton object in a header file.
| export_ | To supply an export macro in a DLL scenario. |
| name | Name of the singleton. |
| __VA_ARGS__ | Type of the singleton object. |
This macro should reside inside the namespace you wish the singleton to reside. See also ANY_SINGLETON.