Wallaroo  0.8
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
wallaroo::Class< P1, P2 > Class Template Reference

#include <class.h>

Public Types

typedef cxx0x::shared_ptr< PartPtr
 
typedef cxx0x::function< Ptr(const
P1 &p1, const P2 &p2) > 
FactoryMethod
 

Public Member Functions

Ptr NewInstance (const P1 &p1, const P2 &p2) const
 

Static Public Member Functions

static Class ForName (const std::string &name)
 

Friends

template<class T , class T1 , class T2 >
class Registration
 

Detailed Description

template<class P1, class P2>
class wallaroo::Class< P1, P2 >

This is the description of a class derived from wallaroo::Part having a constructor that takes two parameters of type P1 and P2. The class provides a method to get an instance of the described class. It also provides a static registry containing all the instances of this class, and methods to register and retrieve them.

Member Typedef Documentation

template<class P1, class P2>
typedef cxx0x::function< Ptr( const P1& p1, const P2& p2 ) > wallaroo::Class< P1, P2 >::FactoryMethod
template<class P1, class P2>
typedef cxx0x::shared_ptr< Part > wallaroo::Class< P1, P2 >::Ptr

Member Function Documentation

template<class P1, class P2>
static Class wallaroo::Class< P1, P2 >::ForName ( const std::string &  name)
inlinestatic

Return the Class< P1, P2 > registered with the name name.

template<class P1, class P2>
Ptr wallaroo::Class< P1, P2 >::NewInstance ( const P1 &  p1,
const P2 &  p2 
) const
inline

Create an instance of the class described by this object.

Parameters
p1The first parameter to pass to the constructor
p2The second parameter to pass to the constructor
Returns
A shared_ptr to the new instance (or the empty shared_ptr if the descriptor is not valid)

Friends And Related Function Documentation

template<class P1, class P2>
template<class T , class T1 , class T2 >
friend class Registration
friend

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