About
A published object is declared in a header file. Every source code file that includes this header file can then access this published object.
Declaration
A published object is declared with the MAXON_DECLARATION attribute. Only instances of MAXON API data types can be published this way. A custom class has to be registered as a data type using MAXON_DATATYPE and MAXON_DATATYPE_REGISTER (see MAXON Data Type). Implementations of interfaces are a data type so they can be shared as a published object.
{
public:
{
};
};
#include "example_declarations1.hxx"
#include "example_declarations2.hxx"
[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
SimpleAtom()
Definition: example_declarations.h:25
maxon::Int _protonCnt
number of protons
Definition: example_declarations.h:30
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:188
#define MAXON_DATATYPE(type, id)
Definition: datatype.h:295
#define MAXON_DECLARATION(T, Name, id,...)
Definition: module.h:847
Further Reading