About
A published object is declared in a header file using the MAXON_DECLARATION attribute. It can be accessed and used in any source code file that includes this header file.
Usage
The following functions are automatically generated for the published object class:
- GetId(): Returns the maxon::Id of the published object class.
- GetInstance(): Returns a reference to the published object class instance. The returned type is maxon::Declaration.
- IsInitialized(): Returns true if the published object is initialized.
- GetReference(): Returns a reference to the published object.
A reference can also be obtained by using the function call operator "()".
[published_objects_declaration]
Definition: example_declarations.h:23
maxon::Int _neutronCnt
number of neutrons
Definition: example_declarations.h:33
maxon::Int _electronCnt
number of electrons
Definition: example_declarations.h:34
maxon::Int _protonCnt
number of protons
Definition: example_declarations.h:30
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define MAXON_UNLIKELY(X)
Definition: compilerdetection.h:404
Further Reading