|
| IlsOwns (OwnerType &owner, COwnedTypePR target=(OwnedType *) 0, IlsRelationId identifier=IlsDefaultRelationId, IlsActivity activity=IlsModel::GetDefaultActivity(), IlsBoolean mandatory=IlsTrue) |
| Constructor. More...
|
|
virtual | ~IlsOwns () |
| This destructor cuts the relation.
|
|
Myself & | clear () |
|
virtual void | cut (ILS_CUT_DIRECTIVE=ILS_ALL) |
|
IlsRelationId | getIdentifier () const |
| Returns the relation identifier.
|
|
OwnerType & | getOwner () const |
|
COwnedTypePR | getValueQuietly () const |
|
IlsBoolean | isMandatory () |
| Returns IlsTrue if a relation is mandatory. Otherwise, it returns IlsFalse . More...
|
|
Myself & | set (COwnedTypePR target, ILS_CUT_DIRECTIVE=ILS_ALL, IlsBoolean avoid_notify=IlsFalse) |
|
|
These operators let you use ownership relations as if they were pointers.
|
| operator COwnedTypePR () |
|
OwnedType & | operator* () |
|
IlsBoolean | operator! () |
| This logical not operator returns IlsTrue if the relation is null.
|
|
OwnedType * | operator-> () |
| This dereference operator returns the target of the relation. More...
|
|
IlsBoolean | operator== (Myself &rhs) |
|
IlsBoolean | operator== (COwnedTypePR rhs) |
| Checks whether the relation is equal to the specified smart pointer.
|
|
IlsBoolean | operator!= (Myself &rhs) |
| Checks whether the relation is not equal to another relation.
|
|
IlsBoolean | operator!= (COwnedTypePR rhs) |
|
|
OwnedTypeP | getOldValue () |
| During a notification phase, this member function returns a smart pointer to the object that was the target of the relation before the notification phase.
|
|
IlsBoolean | isModified () |
| During a notification phase, this member function returns IlsTrue only if the relation has been modified since the last notification phase.
|
|
IlsRelationId | getIdentifier () const |
|
IlsBoolean | isMandatory () |
| Returns IlsTrue if the relation is mandatory. Otherwise, it returns IlsFalse . When a relation is mandatory, a cut applied to the target of the relation is propagated to its origin. By default, the function returns IlsFalse for n-ary relations and IlsTrue for unary relations.
|
|
virtual IlsViewed * | getIdentifiedElement (const IlsString &id) const |
| This virtual member function is used to retrieve an identified object from the relation. More...
|
|
virtual IlsBoolean | hasElement (IlsViewed &) const |
| This virtual member function returns IlsTrue if the element is a target of the relation or IlsFalse otherwise.
|
|
IlsBoolean | isViewed () |
| This member function returns IlsTrue if at least one regular view (as opposed to a multithreaded view) subscribes to the relation. More...
|
|
virtual void | onSubscribe (IlsView &) |
| This empty virtual member function is called each time a view subscribes to the relation.
|
|
virtual void | onUnsubscribe (IlsView &) |
| This empty virtual member function is called each time the subscription of a view to the relation is canceled.
|
|
template<class OwnerType, class OwnedType>
class IlsOwns< OwnerType, OwnedType >
One-to-one ownership relation.
- Template Parameters
-
OwnerType | Class that contains the relation. The OwnerType must derive directly or transitively from IlsObject or IlsEntity . Derivation must be public. |
OwnedType | Class of the target of the relation. The OwnedType must derive directly or transitively from IlsObject . Derivation must be public. |
Library: server
Server lets you declare ownership relations among object classes. Ownership relations are relations in which one particular object is owned by at most one other object, called the owner. With Rogue Wave Server, you can define one-to-one relations, in which the owner owns only one other object, and one-to-many relations, in which the owner owns several objects. One-to-one ownership relations are declared inside the owner class as instances of the class template IlsOwns
.
- See also
IlsException
, IlsEntity
, IlsObject
, IlsOwnsList
, IlsOwnsDynamicArray
, IlsOwnsFixedArray
, IlsOwnsSet
, IlsUses
, IlsUsesList
, IlsUsesSet
.
template<class OwnerType , class OwnedType >
Returns IlsTrue
if a relation is mandatory. Otherwise, it returns IlsFalse
.
When a relation is mandatory, a cut applied to the target of this relation is propagated to its origin. By default, the function returns IlsTrue
.