MkObjectC - get information from the MkTypeS …
MkObjectC - get information from the MkTypeS …
The Introspection API is used to get information about the details of the instance and type implementation. Only the connection between type and instance is currently implemented.
Three methods are used to create an iteration over all avaialable instances of a type.
Instance
(static), Next
and Prev
Instance
(example: (static,runtime) MK_BUF MkBufferInstances()
)MK_NULL
if no instance was created.Next
(example: MK_BUF MkBufferNext(MK_BUF const buf)
)MK_NULL
if the given-instance is the last-instance.Prev
(example: MK_BUF MkBufferPrev(MK_BUF const buf)
)MK_NULL
if the given-instance is the first-instance.Example: a simple loop over all instances of class MkBufferC (language C++
) ~~~~{.cc} for (auto buf = MkBufferC::Instances(); buf != NULL; buf = buf->Next()) { SendSTR(buf->ToString()); } ~~~~