Graphite
Version 3
An experimental 3D geometry processing program
|
Stores a set of custom attributes, i.e. name-value pairs attached to the objects. More...
#include <OGF/gom/reflection/meta_type.h>
Public Member Functions | |
size_t | nb_custom_attributes () const |
Gets the number of custom attributes. More... | |
std::string | ith_custom_attribute_name (index_t i) const |
Gets the name of a custom attribute by index. More... | |
std::string | ith_custom_attribute_value (index_t i) const |
Gets the value of a custom attribute by index. More... | |
bool | has_custom_attribute (const std::string &name) const |
Tests whether a given custom attribute exists. More... | |
void | create_custom_attribute (const std::string &name, const std::string &value) |
Creates a new custom attribute. More... | |
void | set_custom_attribute (const std::string &name, const std::string &value) |
Sets the value of a new custom attribute. More... | |
std::string | custom_attribute_value (const std::string &name) const |
Gets the value of a new custom attribute. More... | |
void | clear_custom_attributes () |
Clears the custom attributes. | |
Stores a set of custom attributes, i.e. name-value pairs attached to the objects.
All the constructs of the language (classes, methods, arguments...) can be "decorated" with custom attributes. For instance, these custom attribute can indicate which widget type should be used for a function argument in the GUI. They can also contain the documentation parsed from the Doxygen comments.
Definition at line 63 of file meta_type.h.
|
inline |
Creates a new custom attribute.
[in] | name | name of the custom attribute |
[in] | value | value of the custom attribute |
Definition at line 114 of file meta_type.h.
|
inline |
Gets the value of a new custom attribute.
[in] | name | name of the custom attribute |
Definition at line 138 of file meta_type.h.
|
inline |
Tests whether a given custom attribute exists.
[in] | name | name of the custom attribute |
true | if the object has a custom attribute named name |
false | otherwise |
Definition at line 104 of file meta_type.h.
|
inline |
Gets the name of a custom attribute by index.
[in] | i | the index of the custom attribute |
i
th custom attribute Definition at line 80 of file meta_type.h.
|
inline |
Gets the value of a custom attribute by index.
[in] | i | the index of the custom attribute |
i
th custom attribute Definition at line 92 of file meta_type.h.
|
inline |
Gets the number of custom attributes.
Definition at line 70 of file meta_type.h.
|
inline |
Sets the value of a new custom attribute.
[in] | name | name of the custom attribute |
[in] | value | value of the custom attribute |
Definition at line 126 of file meta_type.h.