#include <typebuilder.hh>
Classes | |
| struct | Modifier |
Public Member Functions | |
| void | addArrayMajor (int size) |
| void | addArrayMinor (int size) |
| void | addPointer (int level) |
| const Type & | getType () const |
| void | setSize (int size) |
| TypeBuilder (Registry ®istry, const std::list< std::string > &base) | |
| TypeBuilder (Registry ®istry, const Type *base_type) | |
Static Public Member Functions | |
| static const Type * | build (Registry ®istry, const std::string &full_name, int size=0) |
| static const Type * | getBaseType (const Registry ®istry, const std::string &full_name) |
| static std::string | getBaseTypename (const std::string &full_name) |
Private Types | |
| typedef std::list< Modifier > | ModifierList |
| typedef std::pair< const Type *, ModifierList > | TypeSpec |
Static Private Member Functions | |
| static const Type & | build (Registry ®istry, const TypeSpec &spec, int size) |
| static TypeSpec | parse (const Registry ®istry, const std::string &full_name) |
Private Attributes | |
| std::string | m_basename |
| Registry & | m_registry |
| Type * | m_type |
Helper class to easily build a derived type (pointer, array)
Definition at line 14 of file typebuilder.hh.
typedef std::list<Modifier> Typelib::TypeBuilder::ModifierList [private] |
Definition at line 24 of file typebuilder.hh.
typedef std::pair<const Type*, ModifierList> Typelib::TypeBuilder::TypeSpec [private] |
Definition at line 25 of file typebuilder.hh.
| Typelib::TypeBuilder::TypeBuilder | ( | Registry & | registry, |
| const std::list< std::string > & | base | ||
| ) |
Initializes the type builder This constructor builds the canonical name based on base an gets its initial type from registry. It throws Undefined(typename) if base is not defined
Definition at line 22 of file typebuilder.cc.
| Typelib::TypeBuilder::TypeBuilder | ( | Registry & | registry, |
| const Type * | base_type | ||
| ) |
Initializes the type builder
Definition at line 31 of file typebuilder.cc.
| void Typelib::TypeBuilder::addArrayMajor | ( | int | size | ) |
Add an outermost dimension to the current type (if it is not an array, builds an array
Definition at line 72 of file typebuilder.cc.
| void Typelib::TypeBuilder::addArrayMinor | ( | int | size | ) |
Add an innermost dimension to the current type (if it is not an array, builds an array
Definition at line 54 of file typebuilder.cc.
| void Typelib::TypeBuilder::addPointer | ( | int | level | ) |
Builds a level-deferenced pointer of the current type
Definition at line 37 of file typebuilder.cc.
| const Type & Typelib::TypeBuilder::build | ( | Registry & | registry, |
| const TypeSpec & | spec, | ||
| int | size | ||
| ) | [static, private] |
Definition at line 90 of file typebuilder.cc.
| const Type * Typelib::TypeBuilder::build | ( | Registry & | registry, |
| const std::string & | full_name, | ||
| int | size = 0 |
||
| ) | [static] |
Build a type from its full name
Definition at line 154 of file typebuilder.cc.
| const Type * Typelib::TypeBuilder::getBaseType | ( | const Registry & | registry, |
| const std::string & | full_name | ||
| ) | [static] |
Get base type, that is the type full_name is derived from
Definition at line 163 of file typebuilder.cc.
| std::string Typelib::TypeBuilder::getBaseTypename | ( | const std::string & | full_name | ) | [static] |
Get base name, that is the type full_name is derived from
Definition at line 171 of file typebuilder.cc.
| const Type & Typelib::TypeBuilder::getType | ( | ) | const |
Get the current type
Definition at line 36 of file typebuilder.cc.
| TypeBuilder::TypeSpec Typelib::TypeBuilder::parse | ( | const Registry & | registry, |
| const std::string & | full_name | ||
| ) | [static, private] |
Definition at line 118 of file typebuilder.cc.
| void Typelib::TypeBuilder::setSize | ( | int | size | ) |
Sets the size of the current type
Definition at line 85 of file typebuilder.cc.
std::string Typelib::TypeBuilder::m_basename [private] |
Definition at line 16 of file typebuilder.hh.
Registry& Typelib::TypeBuilder::m_registry [private] |
Definition at line 30 of file typebuilder.hh.
Type* Typelib::TypeBuilder::m_type [private] |
Definition at line 17 of file typebuilder.hh.