Graphite  Version 3
An experimental 3D geometry processing program
OGF::MetaArg Class Reference

The representation of the arguments in the Meta repository. More...

#include <OGF/gom/reflection/meta_arg.h>

Inheritance diagram for OGF::MetaArg:
OGF::CustomAttributes

Public Member Functions

 MetaArg (const std::string &name, const std::string &type_name)
 Constructs a new MetaArg. More...
 
 MetaArg (const std::string &name, MetaType *type)
 Constructs a new MetaArg. More...
 
const std::string & name () const
 Gets the name. More...
 
const std::string & type_name () const
 Gets the type name name. More...
 
MetaTypetype () const
 Gets the type. More...
 
bool has_default_value () const
 Tests whether the argument has a default value. More...
 
const Anydefault_value () const
 Gets the default value of an argument. More...
 
Anydefault_value ()
 Gets the default value of an argument. More...
 
- Public Member Functions inherited from OGF::CustomAttributes
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.
 

Detailed Description

The representation of the arguments in the Meta repository.

Definition at line 60 of file meta_arg.h.

Constructor & Destructor Documentation

◆ MetaArg() [1/2]

OGF::MetaArg::MetaArg ( const std::string &  name,
const std::string &  type_name 
)

Constructs a new MetaArg.

Parameters
[in]namename of the argument
[in]type_nameC++ type name of the argument

◆ MetaArg() [2/2]

OGF::MetaArg::MetaArg ( const std::string &  name,
MetaType type 
)

Constructs a new MetaArg.

Parameters
[in]namename of the argument
[in]typepointer to the MetaType of the argument

Member Function Documentation

◆ default_value() [1/2]

Any& OGF::MetaArg::default_value ( )
inline

Gets the default value of an argument.

Returns
a modifiable reference to an Any with the default value of the argument

Definition at line 122 of file meta_arg.h.

◆ default_value() [2/2]

const Any& OGF::MetaArg::default_value ( ) const
inline

Gets the default value of an argument.

Returns
a const reference to an Any with the default value of the argument

Definition at line 113 of file meta_arg.h.

◆ has_default_value()

bool OGF::MetaArg::has_default_value ( ) const
inline

Tests whether the argument has a default value.

Return values
trueif the argument has a default value
falseotherwise

Definition at line 104 of file meta_arg.h.

◆ name()

const std::string& OGF::MetaArg::name ( ) const
inline

Gets the name.

Returns
the name of the argument

Definition at line 81 of file meta_arg.h.

◆ type()

MetaType* OGF::MetaArg::type ( ) const

Gets the type.

Returns
a pointer to the MetaType of the argument

◆ type_name()

const std::string& OGF::MetaArg::type_name ( ) const
inline

Gets the type name name.

Returns
the C++ type name of the argument

Definition at line 89 of file meta_arg.h.


The documentation for this class was generated from the following file: