#include <Property.hpp>
Public Types | |
| enum | AssocPos { NoAssoc, First, Second } |
| enum | AssocLevel { None, Weak, Strong } |
Public Member Functions | |
| Property (const std::string &name) | |
| virtual | ~Property () |
| template<class Self, class Type> Property & | getMethod (Self *self, const Type &(Self::*method)() const) |
| template<class Self, class Type> Property & | getMethod (Self *self, const Type &(Self::*method)()) |
| template<class Self, class Type> Property & | getMethod (Self *self, Type *(Self::*method)()) |
| template<class Self, class Type> Property & | setMethod (Self *self, void(Self::*method)(const Type &)) |
| template<class Self, class Type> Property & | setMethod (Self *self, void(Self::*method)(Type *)) |
| template<class Self, class Type> Property & | addMethod (Self *self, void(Self::*method)(const Type &)) |
| template<class Self, class Type> Property & | addMethod (Self *self, void(Self::*method)(Type *)) |
| template<class Self, class Type> Property & | removeMethod (Self *self, void(Self::*method)(const Type &)) |
| template<class Self, class Type> Property & | removeMethod (Self *self, void(Self::*method)(Type *)) |
| template<class Self> Property & | clearMethod (Self *self, void(Self::*method)()) |
| Property & | assoc (Association *assoc, AssocPos pos, AssocLevel level) |
| const std::string & | name () const |
| virtual bool | canGet () const |
| virtual bool | canSet () const |
| virtual bool | canAdd () const |
| virtual bool | canRemove () const |
| virtual bool | canClear () const |
| virtual Object * | get () |
| virtual void | set (Object *value) |
| virtual void | add (Object *value) |
| virtual void | remove (Object *value) |
| virtual void | clear () |
| Association * | association () |
| AssocPos | position () const |
| AssocLevel | level () const |
|
|
The AssocLevel defines the level of aggregation used in an association. It is analagous to Model::AggregationKind, but we need simpler identities here. The relation is either Weak or Strong. Note that this simply denotes containment semantics for properties. Properties with strong associations denote the containment tree. |
|
|
The AssocPos enumeration defines the position of the property in relation to an associated association. The property could be either first or second. Note that the NoAssoc is used in cases where we want to denote strong ownership of an element that has no corresponding association such as structures and class attributes. |
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
This method is used to relate an association with the property. Using this, clients can access the desired association and related information (such as the end location - first or second) without having to refer to the metamodel. Note that this method should never be called outside the constructor of defining classes. To access the association information, use the association() method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
Return the name of the property. |
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
1.3.8