Wallaroo
0.8
|
#include <part.h>
Public Member Functions | |
virtual | ~Part () |
void | Wire (const std::string &dependency, const cxx0x::shared_ptr< Part > &part) |
template<typename T > | |
void | SetAttribute (const std::string &attribute, const T &value) |
bool | MultiplicitiesOk () const |
virtual void | Init () |
template<> | |
void | SetAttribute (const std::string &attribute, const std::string &value) |
Protected Member Functions | |
RegToken | RegistrationToken () |
Friends | |
template<class T1 , class T2 > | |
class | Class |
template<typename T , typename P , template< typename X > class Ownership> | |
class | Collaborator |
template<class T > | |
class | Attribute |
This class represents a "part" that owns dependencies (collaborators) and attributes. You can link its dependencies to other parts using the method Part::Wire and assign a value to its attributes using the method SetAttribute, but wallaroo provides mechanisms more flexible for these tasks (i.e., the DSL constructs "use().as().of()" and "set_attribute().of().to()" and the configuration files).
|
inlinevirtual |
|
inlinevirtual |
This method get called by Catalog::Init(). If you have work to be done for the initialization of your class, you should implement this method in the derived class. This is useful if you want to do your initialization after collaborators are been wired and attributes set. Keep in mind that in the constructor the wiring has not be performed yet.
|
inline |
Check the multiplicity of its collaborators.
|
inlineprotected |
|
inline |
Assign a value to an attribute of the Part.
attribute | The name of the attribute. |
value | The value to assign. |
ElementNotFound | If attribute does not exist in this part. |
WrongType | If value has not a type compatible with the attribute. |
|
inline |
Assign a value to a string attribute of the part.
attribute | The name of the attribute. |
value | The value to assign. |
ElementNotFound | If attribute does not exist in this part. |
|
inline |
Link the dependency dependency
of this part into the Part part
.
ElementNotFound | If dependency does not exist in this part. |
WrongType | If part has not a type compatible with the dependency. |
|
friend |
|
friend |
|
friend |