ObjectTypeTemplate Class Reference

Template for a type. More...

#include <objecttypetemplate.h>

List of all members.

Public Member Functions

 ObjectTypeTemplate (const std::string &name, const std::vector< std::string > &parameterNames)
 ObjectTypeTemplate (const std::string &name)
const std::string & name () const
 Get the name used as a unique identifiers.
int numberOfParameters () const
 Get the number of parameters.
const std::string & parameterName (int index) const
 Get the name of a parameter given its name.
bool isParameterPrivate (int index) const
 Check if the parameter is private.
int parameterNumber (const std::string &name) const
 Get the index of a parameter given its name.
bool isNull () const
 Check if the template has the name "". Types when constructed by default have a null template.
void addParameter (const std::string &parameterName)
 Push back a new parameter.
template<typename... Args>
ObjectType operator() (Args...args) const
 Instanciate a type with the template and set values for a number of its parameters.

Friends

bool operator== (const ObjectTypeTemplate &a, const ObjectTypeTemplate &b)
bool operator< (const ObjectTypeTemplate &a, const ObjectTypeTemplate &b)

Detailed Description

Template for a type.

A type template is defined by a unique name and a number of named parameters


Constructor & Destructor Documentation

ObjectTypeTemplate::ObjectTypeTemplate ( const std::string &  name,
const std::vector< std::string > &  parameterNames 
)
ObjectTypeTemplate::ObjectTypeTemplate ( const std::string &  name)

Member Function Documentation

void ObjectTypeTemplate::addParameter ( const std::string &  parameterName)

Push back a new parameter.

Check if the template has the name "". Types when constructed by default have a null template.

bool ObjectTypeTemplate::isParameterPrivate ( int  index) const

Check if the parameter is private.

If a paramater is private it should not be displayed on screen

Raise an exception if out of bounds

const std::string& ObjectTypeTemplate::name ( ) const

Get the name used as a unique identifiers.

Get the number of parameters.

template<typename... Args>
ObjectType ObjectTypeTemplate::operator() ( Args...  args) const [inline]

Instanciate a type with the template and set values for a number of its parameters.

const std::string& ObjectTypeTemplate::parameterName ( int  index) const

Get the name of a parameter given its name.

Raise an exception if out of bounds

int ObjectTypeTemplate::parameterNumber ( const std::string &  name) const

Get the index of a parameter given its name.

Returns -1 if no parameter of this name exists


Friends And Related Function Documentation

bool operator< ( const ObjectTypeTemplate a,
const ObjectTypeTemplate b 
) [friend]
bool operator== ( const ObjectTypeTemplate a,
const ObjectTypeTemplate b 
) [friend]

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