cmakepp_lang/object/object
Provides an easy way to include the CMakePPLang Object, which all user-defined classes will inherit from, as well as related functions to manage the Object.
- cmakepp_lang/object/object._cpp_object_singleton(__CMAKEPP_LANG_OBJECT_SINGLETON__)
Warning
This is a generic command invocation. It is not a function or macro definition.
Holds an instance of the
obj
class.All instances of the
obj
class are identical and static (well strictly speaking a malicious user could modify them). Thus for efficiency we make a single instance of theobj
class and have all derived classes alias it. For all intents and purposes this makes the object class a singleton. That said aside fromcpp_class()
needing this variable (__CMAKEPP_LANG_OBJECT_SINGLETON__
) to hold anobj
instance no part of CMakePP actually requires there to only be oneobj
instance in play at any time.