Graphite
Version 3
An experimental 3D geometry processing program
|
Stores all the meta information of the system, used by the reflection API. More...
#include <OGF/gom/reflection/meta.h>
Public Member Functions | |
~Meta () | |
destructor fo the Meta database. | |
bool | meta_type_is_bound (const std::string &name) const |
Tests whether a MetaType exists in the system by type name. More... | |
bool | typeid_name_is_bound (const std::string &typeid_name) const |
Tests whether a MetaType exists in the system by typeid name. More... | |
bool | bind_meta_type (MetaType *meta_type) |
Declares a MetaType to the system. More... | |
bool | bind_meta_type (MetaType *meta_type, const std::string &typeid_name) |
Declares a MetaType to the system. More... | |
MetaType * | resolve_meta_type (const std::string &type_name) const |
Finds a MetaType by type name. More... | |
MetaClass * | resolve_meta_class (const std::string &type_name) const |
Finds a MetaClass by type name. More... | |
MetaType * | resolve_meta_type_by_typeid_name (const std::string &typeid_name) const |
Finds a MetaType by typeid name. More... | |
bool | unbind_meta_type (const std::string &name) |
Removes a MetaType from the system. More... | |
void | list_types (std::vector< MetaType * > &types) |
Gets the list of all MetaType objects declared to the system. More... | |
void | list_type_names (std::vector< std::string > &type_names) |
Gets the list of all type names declared to the system. More... | |
Static Public Member Functions | |
static Meta * | instance () |
Gets the instance. More... | |
static void | initialize () |
Initializes the Meta database. More... | |
static void | terminate () |
Terminates the Meta database. More... | |
Stores all the meta information of the system, used by the reflection API.
The meta information associates to each C++ type a MetaType object, that implements different services, such as serialization, introspection and dynamic method invokation, used to couple Graphite with interpreted languages (python) and to generate the GUI. The meta information is automatically generated by the GOMGEN tool. The meta information can be accessed either from a string with the type name (as written in C++ sources, and scoped with OGF::), or with the typeid name (as obtained with typeid<T>.name).
bool OGF::Meta::bind_meta_type | ( | MetaType * | meta_type | ) |
bool OGF::Meta::bind_meta_type | ( | MetaType * | meta_type, |
const std::string & | typeid_name | ||
) |
|
static |
Initializes the Meta database.
|
static |
Gets the instance.
void OGF::Meta::list_type_names | ( | std::vector< std::string > & | type_names | ) |
Gets the list of all type names declared to the system.
[out] | type_names | a vector of all type names, including aliases. |
void OGF::Meta::list_types | ( | std::vector< MetaType * > & | types | ) |
bool OGF::Meta::meta_type_is_bound | ( | const std::string & | name | ) | const |
Tests whether a MetaType exists in the system by type name.
[in] | name | type name |
true | if a type with name name exists in the system |
false | otherwise |
|
inline |
MetaType* OGF::Meta::resolve_meta_type | ( | const std::string & | type_name | ) | const |
MetaType* OGF::Meta::resolve_meta_type_by_typeid_name | ( | const std::string & | typeid_name | ) | const |
|
static |
Terminates the Meta database.
bool OGF::Meta::typeid_name_is_bound | ( | const std::string & | typeid_name | ) | const |
Tests whether a MetaType exists in the system by typeid name.
[in] | typeid_name | the C++ RTTI name of the system, as obtained by typeid<T>.name() |
true | if a type with name name exists in the system |
false | otherwise |
bool OGF::Meta::unbind_meta_type | ( | const std::string & | name | ) |
Removes a MetaType from the system.
[in] | name | type name |
true | if the meta type could be sucessfully removed |
false | otherwise |