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
 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)
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)
static TypeSpec parse (const Registry &registry, const std::string &full_name)

Private Attributes

std::string m_basename
Registrym_registry
Type const * m_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 
) [static, private]

Definition at line 85 of file typebuilder.cc.

const Type * Typelib::TypeBuilder::build ( Registry registry,
const std::string &  full_name 
) [static]

Build a type from its full name

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

Definition at line 147 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 156 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 164 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 111 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 Mon Sep 14 2015 15:08:18