Classes | Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions | Private Attributes
Typelib::TypeBuilder Class Reference

#include <typebuilder.hh>

List of all members.

Classes

struct  Modifier

Public Member Functions

void addArrayMajor (int size)
void addArrayMinor (int size)
void addPointer (int level)
const TypegetType () const
void setSize (int size)
 TypeBuilder (Registry &registry, const std::list< std::string > &base)
 TypeBuilder (Registry &registry, const Type *base_type)

Static Public Member Functions

static const Typebuild (Registry &registry, const std::string &full_name, int size=0)
static const TypegetBaseType (const Registry &registry, const std::string &full_name)
static std::string getBaseTypename (const std::string &full_name)

Private Types

typedef std::list< ModifierModifierList
typedef std::pair< const Type
*, ModifierList
TypeSpec

Static Private Member Functions

static const Typebuild (Registry &registry, const TypeSpec &spec, int size)
static TypeSpec parse (const Registry &registry, const std::string &full_name)

Private Attributes

std::string m_basename
Registrym_registry
Typem_type

Detailed Description

Helper class to easily build a derived type (pointer, array)

Definition at line 14 of file typebuilder.hh.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

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

  • registry the registry to act on
  • base the base type

Definition at line 22 of file typebuilder.cc.

Typelib::TypeBuilder::TypeBuilder ( Registry registry,
const Type base_type 
)

Initializes the type builder

  • registry the registry to act on
  • base_type the base type

Definition at line 31 of file typebuilder.cc.


Member Function Documentation

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.

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

Returns:
the new type or 0 if it can't be built

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

Returns:
the new type or 0 if it can't be built

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.

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.


Member Data Documentation

std::string Typelib::TypeBuilder::m_basename [private]

Definition at line 16 of file typebuilder.hh.

Definition at line 30 of file typebuilder.hh.

Definition at line 17 of file typebuilder.hh.


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


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Sat Jun 8 2019 18:49:23