#include <typelib/typebuilder.hh>
Public Member Functions | |
TypeBuilder (Registry ®istry, const std::list< std::string > &base) | |
TypeBuilder (Registry ®istry, const Type *base_type) | |
void | addPointer (int level) |
void | addArrayMajor (int size) |
void | addArrayMinor (int size) |
const Type & | getType () const |
Static Public Member Functions | |
static const Type * | build (Registry ®istry, const std::string &full_name) |
static std::string | getBaseTypename (const std::string &full_name) |
static const Type * | getBaseType (const Registry ®istry, const std::string &full_name) |
Classes | |
struct | Modifier |
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
References Typelib::Registry::build(), and join().
Initializes the type builder
void Typelib::TypeBuilder::addPointer | ( | int | level | ) |
Builds a level-deferenced pointer of the current type
References Typelib::Registry::add(), Typelib::Registry::get(), Typelib::Type::getName(), and Typelib::Pointer::getPointerName().
void Typelib::TypeBuilder::addArrayMajor | ( | int | size | ) |
Add an outermost dimension to the current type (if it is not an array, builds an array
References Typelib::Registry::add(), Typelib::Registry::get(), Typelib::Array::getArrayName(), and Typelib::Type::getName().
Referenced by addArrayMinor().
void Typelib::TypeBuilder::addArrayMinor | ( | int | size | ) |
Add an innermost dimension to the current type (if it is not an array, builds an array
References addArrayMajor(), Typelib::Type::Array, Typelib::Type::getCategory(), Typelib::Array::getDimension(), and Typelib::Indirect::getIndirection().
const Type & Typelib::TypeBuilder::getType | ( | ) | const |
Get the current type
const Type * Typelib::TypeBuilder::build | ( | Registry & | registry, | |
const std::string & | full_name | |||
) | [static] |
Build a type from its full name
std::string Typelib::TypeBuilder::getBaseTypename | ( | const std::string & | full_name | ) | [static] |
Get base name, that is the type full_name
is derived from
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
Referenced by Typelib::Registry::has().