Base class for component side representation objects. More...
#include <ilserver/rp.h>
Public Member Functions | |
virtual void | afterInit () |
Called immediately after an object has been created when a representation object is instantiated by the Server. More... | |
virtual void | onRmRepresentation () |
Called when the representation that owns the representation object is destroyed and invokes in turn the representation object destructor. More... | |
IlsBoolean | setConstAttribute (IlsRpAttributeId) |
Sets the value of a constant attribute for a representation object. More... | |
void | setConstAttributes () |
Sets the value of the constant attributes of a representation object. More... | |
virtual IlsBoolean | setMapping (const IlsRpObject &cousin) |
Associates a new representation object with an existing Server object. More... | |
Accessors | |
virtual IlsString | getLabel () const |
Returns the label of the representation object. More... | |
IlsRpObjectId | getId () const |
Returns the identifier of the representation object. More... | |
IlsRpAttributeId | getAttributeId (const IlsString &label) const |
Returns an attribute identifier from its name. More... | |
IlsRpAttributeId | getAttributeId (const IlsString &label, int index) const |
Returns an indexed attribute identifier from its name and its index. More... | |
IlsMvDataType | getAttributeType (IlsRpAttributeId) const |
Returns the attribute type of a given attribute. More... | |
const IlsRpObjModel * | getModel () const |
Returns a pointer to the runtime representation object model associated with the representation object. More... | |
IlsRepresentation * | getRepresentation () const |
Returns a pointer to the representation that owns the representation object. More... | |
IlsBoolean | isEditable (IlsRpAttributeId id, IlsEditRights::Value right=IlsEditRights::DEFAULT_EDIT) const |
Returns IlsTrue if the attribute id has the editing rights specified by the variable right. | |
IlsBoolean | isLocalHRef (IlsRpAttributeId id) |
Returns IlsTrue if the attribute id is a local hyper-reference – in other words, a hyper-reference that has no associated relation. | |
IlsMvRef | getReference () const |
Returns a reference object that identifies a representation object in the server-to-component protocol. More... | |
Transaction Control from Component to Server | |
virtual void | beginC2SUpdate (IlsRpUpdateType) |
Initializes a set of updates on the representation object. More... | |
void | beginC2SUpdate () |
Initializes a set of updates on the representation object. More... | |
IlsBoolean | isInC2SUpdate () |
Returns IlsTrue between a call to beginC2SUpdate() and a call to either endC2SUpdate() or discardC2SUpdate() . Otherwise, it returns IlsFalse . | |
virtual void | endC2SUpdate () |
Commits updates performed on the representation object. More... | |
virtual void | discardC2SUpdate () |
Discards the modifications currently stored in the representation object update buffer. | |
Opening a view | |
virtual void | openView (const IlsString &viewName, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse) |
Requests the server to open the view viewName on the server object associated with its corresponding representation object. More... | |
virtual void | openView (const IlsString &viewName, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resultIndex, IlsBoolean force=IlsFalse) |
Identical to the previous one except that Server executes a call to the representation object function ackOpenView() during the acknowledgment rollback of the transaction that includes the call to openView() . More... | |
virtual void | ackOpenView (const IlsMvValue *ackArgv, IlsCbArgNb ackArgc) |
Called by Server to acknowledge or to roll back a call to the second virtual member function openView() (documented above). More... | |
Attribute Editing Functions | |
virtual void | setBoolean (IlsRpAttributeId id, IlsBoolean value) |
Called by the server when the Boolean attribute id has no associated modifier and must be set to value. More... | |
virtual void | setChar (IlsRpAttributeId id, char value) |
Called by the server when the attribute id of type char has no associated modifier and must be set to value. More... | |
virtual void | setShort (IlsRpAttributeId id, short value) |
Called by the server when the id attribute of type short has no associated modifier and must be set to value. More... | |
virtual void | setLong (IlsRpAttributeId id, long value) |
Called by the server when the attribute id of type long has no associated modifier and must be set to value. More... | |
virtual void | setFloat (IlsRpAttributeId id, float value) |
Called by the server when the attribute id of type float has no associated modifier and must be set to value. More... | |
virtual void | setDouble (IlsRpAttributeId id, double value) |
Called by the server when the attribute id of type double has no associated modifier and must be set to value. More... | |
virtual void | setString (IlsRpAttributeId id, const IlsString &value) |
Called by the server when the attribute id of type IlsString has no associated modifier and must be set to value. More... | |
virtual void | setAny (IlsRpAttributeId id, IlsAny value) |
Called by the server when the attribute id of type IlsAny has no associated modifier and must be set to value. More... | |
virtual void | setUserTypeValue (IlsRpAttributeId id, IlsMvUserType &value) |
Called by the server when the attribute id of type IlsMvUserType (or derived) has no associated modifier and must be set to value. More... | |
virtual void | setReference (IlsRpAttributeId id, const IlsRpObject *objectPtr) |
Called by the server when the id attribute has no associated modifier and must reference the object pointed to by objectPtr. More... | |
virtual void | setHRef (IlsRpAttributeId id, const IlsString &hrefLabel) |
called by the server when the label of the hyper-reference id has no associated modifier and must be set to hrefLabel. More... | |
Update Callback Functions (from Component to Server) | |
The following callback functions are used to notify modifications on representation objects to the server. They must not be called if the modifications are requested by the server (see Transaction Control from Component to Server in the | |
virtual void | onSuppress (IlsBoolean isDestroyed=IlsFalse) |
This member function notifies the object destruction to the server. More... | |
virtual void | setRpStatus (IlsRpStatus) |
Requests modification of the representation status of the server object associated with the representation object in the view to which the representation is attached. | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, IlsBoolean value) |
Requests the server to set the IlsBoolean attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, char value) |
Requests the server to set the char attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, short value) |
Requests the server to set the short attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, long value) |
Requests the server to set the long attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, float value) |
Requests the server to set the float attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, double value) |
Requests the server to set the double attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, const IlsString &value) |
Requests the server to set the IlsString attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, IlsAny value) |
Requests the server to set the IlsAny attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, const IlsMvUserType &value) |
Requests the server to set the IlsMvUserType attribute id to value. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, const IlsRpObject &objRef) |
Requests the server to set the attribute id of a reference to another representation object. More... | |
virtual IlsBoolean | onUpdate (IlsRpAttributeId id, const IlsRpObject &newHRefOwner, IlsRpAttributeId newHRef) |
Requests the server to replace the target object of a Server relation with another object. More... | |
virtual IlsBoolean | onNullifyRef (IlsRpAttributeId id) |
Requests the server to reset the reference attribute id to null, so as to notify the server about this modification. More... | |
virtual IlsBoolean | isMatchingRef (IlsRpAttributeId id, const IlsRpObject *newTarget) |
Tests whether the id attribute can be assigned the value of the object pointed to by newTarget . More... | |
virtual IlsBoolean | isMatchingHRef (IlsRpAttributeId id, const IlsRpObject *newHRefOwner, IlsRpAttributeId newHRef) |
Tests whether the id attribute can be assigned the hyper-reference identified by newHRef and belonging to newHRefOwner. More... | |
virtual IlsBoolean | onDereference (IlsRpAttributeId id, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse) |
Opens a view by dereferencing a hyper-reference (see Hyper-References). More... | |
virtual IlsBoolean | onDereference (IlsRpAttributeId id, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resultIndex, IlsBoolean force=IlsFalse) |
Opens a view by dereferencing a hyper-reference (see Hyper-References) with aknowledgement. More... | |
Editing Collections | |
virtual IlsBoolean | onAddToCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId) |
Requests the server to set or add a target to a relation (usually a n-ary relation). More... | |
virtual IlsBoolean | onRmFromCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId, IlsBoolean isDestroyed=IlsFalse) |
Requests the server to remove a target in a relation (usually a n-ary relation). More... | |
virtual IlsBoolean | testCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId) |
Tests whether the representation object can be added to the collection of objects designated by the attribute collectorId and owned by the representation object collectorOwner. More... | |
Callbacks to Member Functions | |
These callbacks are used to execute functions on the Server object to which a representation object is bound. A callback can be asynchronous, synchronous or duplex. A duplex callback is a pair of symmetric asynchronous calls. The result of the original callback performed on the Server object is sent back as an argument to a duplex callback executed on the representation object. To avoid deadlock problems related to synchronous calls, it is strongly recommended to keep a full asynchronous interaction protocol between components and servers. This enables you to choose duplex callbacks whenever possible instead of synchronous callbacks. This mechanism is subject to the following declarations:
| |
virtual IlsBoolean | execAsyncCallback (const IlsString &funNm, IlsMvValue *args=0, IlsCbArgNb argsNb=0, IlsBoolean inTrans=IlsTrue, IlsBoolean freeArgs=IlsFalse) |
Executes an asynchronous call to the function funNm on the Server object that matches the current representation object. More... | |
virtual IlsBoolean | execSyncCallback (const IlsString &funNm, IlsMvValue *args, IlsCbArgNb argsNb, IlsMvValue &result, IlsBoolean freeArgs=IlsFalse) |
Executes a synchronous call to the callback function funNm on the server object that matches the current representation object. More... | |
virtual IlsBoolean | execDuplexCallback (const IlsString &funNm, IlsMvValue *args, IlsCbArgNb argsNb, const IlsString &duplexFunNm, IlsMvValue *duplexArgs=0, IlsCbArgNb duplexNbArgs=0, IlsCbArgNb resultIndex=0, IlsBoolean inTrans=IlsTrue, IlsBoolean freeArgs=IlsFalse) |
Executes an asynchronous call to the function funNm on the server object, the representation object is bound to. More... | |
Protected Member Functions | |
IlsRpObject (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorAttrId, const IlsRpObjModel *model=0, IlsBoolean endUpdate=IlsTrue) | |
Constructor used to create object from a collector. More... | |
IlsRpObject (IlsRepresentation &rp, const IlsRpObjModel &model) | |
Constructor used by the notification engine. More... | |
virtual | ~IlsRpObject () |
Destructor. More... | |
Transaction Control from Server to Component | |
virtual IlsBoolean | beginS2CUpdate (IlsS2CTransStatus transStatus, IlsTransactionId transId) |
Called by the member function IlsRepresentation::beginS2CTransaction() on any representation object involved in the transaction. More... | |
virtual void | beforeDeletion (IlsTransactionId id) |
Called between the beginS2CUpdate() and the endS2CUpdate()` in the transaction that deletes the RpObject. More... | |
virtual void | endS2CUpdate (IlsS2CTransStatus transStatus, IlsTransactionId transId) |
Called when the server has finished updating a representation object after a server-to-component transaction. More... | |
virtual IlsBoolean | ackAttrUpdate (IlsRpAttributeId attrId, IlsS2CTransStatus transStatus, IlsTransactionId transId) |
Called for each attribute involved in a server-to-component transaction, except if the propagation has been aborted (see beginS2CUpdate() above). More... | |
Friends | |
class | IlsMvComponent |
class | IlsRepresentation |
class | IlsRpModelInterpreter |
Base class for component side representation objects.
Library: mvserver
and mvcomp
To create or update representation objects, you use virtual editing member functions. To actually update representation objects, you must either redefine these virtual functions or attach specific editing member functions to the class (see the macros ILS_RP_ATTR_XXX()
,ILS_RP_INDEXED_ATTR_XXX()
). Symmetrically, IlsRpObject
defines a set of callback functions that should be invoked whenever a representation object is directly modified by an application component. These functions are responsible for sending the modifications to the server.
ILS_MEMBER_FUNCTION()
, IlsMvComponent
, IlsMvDataType::Kind
, IlsMvView
, IlsRepresentation
, ILS_RP_ATTR_XXX()
, ILS_RP_DEFAULT_XXX()
, ILS_RP_INDEXED_ATTR_XXX()
, ILS_RP_INDEXED_DEFAULT_XXX()
, ILS_RP_MEMBER_FUNCTION()
, ILS_RP_OBJECT_BEGIN()
/ILS_RP_OBJECT_END()
, ILS_RP_OBJECT_DECL()
, IlsRpObjModel
.
|
protected |
Constructor used by the notification engine.
Each class that derives from IlsRpObject
and that is declared as a representation class must have a constructor that takes both these parameters as arguments and passes them to the base class when it is initialized. For details on how to declare a class as a representation class, see the macros ILS_RP_OBJECT_DECL()
and ILS_RP_OBJECT_BEGIN()
/ILS_RP_OBJECT_END()
.
In this constructor, the representation object has not yet been assigned an identifier. Therefore, it cannot be used to perform component-to-server transactions using callback member functions until the virtual member function afterInit()
has been called.
Even though the preferable way to create a new representation object is through a collector using the constructor described below, you can also use this constructor instead. To notify the server that a new representation object, hence a new server object, has been created, do the following:
IlsRpObject
instance using this constructor, passing the representation and the object model as the parameters. You can retrieve the object model from the representation model associated with the representation by using the member functions IlsRepresentation::getModel()
and IlsRpModel::getObjModel()
.beginC2SUpdate()
(ILS_RP_CREATION
): ILS_RP_CREATION
is the update type to use when a representation object is created on the component side.endC2SUpdate()
to commit the component-to-server transaction.rp | reference to the representation into which the representation object will be inserted. |
model | reference to the associated representation object model. |
|
protected |
Constructor used to create object from a collector.
This constructor must be used when an application component creates a representation object to be inserted into a set of epresentation objects – called a collection – and this collection is owned by another representation object.
collectorOwner | the owner of the collection |
collectorAttrId | the identifier of the attribute that defines the collection |
model | a pointer to a representation object model.
|
If the object model is not compatible with the collector, the exception IlsInvalidCollector
is thrown. Otherwise, this constructor calls the function IlsRpObject::onAddToCollection()
, passing collectorOwner and collectorAttrId as parameters.
endUpdate | When the endUpdate parameter is set to IlsTrue , the function endC2SUpdate is invoked on the object. Otherwise, it is up to the user to invoke it, typically after the object attributes have been set. |
|
protectedvirtual |
Destructor.
The destructor of a representation object is protected. It is invoked by the server via a call to the virtual member function IlsRepresentation::deleteRpObject()
.
A representation object is implicitly destroyed if the representation in which it is contained is itself destroyed, unless the virtual member function IlsRpObject::onRmRepresentation()
has been redefined and returns IlsFalse
. When the object destruction is triggered by a component, this event must be first notified to the server through a call to the IlsRpObject::onSuppress()
function.
|
protectedvirtual |
Called for each attribute involved in a server-to-component transaction, except if the propagation has been aborted (see beginS2CUpdate()
above).
The transStatus and transId parameters are the same as those passed to the beginS2CUpdate()
function.
attrId | the attribute involved |
transStatus | transaction status |
transId | transaction identifier |
IlsTrue
unless redefined. When a notification cycle (transStatus = ILS_S2C_NOTIFY
) or an asynchronous rollback (transStatus = ILS_S2C_SV_ROLLBACK
) is performed, the attribute value is actually modified if the result of this function or of the overriding function is IlsTrue
. If it is IlsFalse
, the attribute value is not modified.
|
virtual |
Called by Server to acknowledge or to roll back a call to the second virtual member function openView()
(documented above).
The default implementation does nothing. It can be overridden.
Reimplemented in IlsSwTable, and IlsSwRow.
|
virtual |
Called immediately after an object has been created when a representation object is instantiated by the Server.
When this method has been called, the representation object has been assigned an identifier and you can use it to perform component-to-server transactions via callback member functions.
Reimplemented in IlsSwTable, IlsSwRow, and IlsSwRepresentation.
|
protectedvirtual |
Called between the beginS2CUpdate() and the
endS2CUpdate()` in the transaction that deletes the RpObject.
The RpObject will be effectively destroyed just after the endS2CUpdate()
in the same transaction.
The default implementation do nothing.
void IlsRpObject::beginC2SUpdate | ( | ) |
Initializes a set of updates on the representation object.
This function initializes a buffer where the updates performed on the representation objects are stored until they are either committed by a call to the function IlsRpObject::endC2SUpdate()
or discarded by a call to the function IlsRpObject::discardC2SUpdate()
.
You must call this member function just before a batch of updates is carried out. If you do not invoke this function explicitly, it will be implicitly called whenever an object is modified (see the member functions IlsRpObject::onUpdate()
described later on).
|
virtual |
Initializes a set of updates on the representation object.
This virtual member function initializes a buffer where the updates performed on the representation objects are stored until they are either committed by a call to the function endC2SUpdate()
or discarded by a call to the function discardC2SUpdate()
.
You should use this function when a representation object is created locally on a component without any collector, with the type ILS_RP_CREATION
passed as the argument to notify the server that a new representation object has been created locally.
|
protectedvirtual |
Called by the member function IlsRepresentation::beginS2CTransaction()
on any representation object involved in the transaction.
The transaction status transStatus is the same as the one passed to the function IlsRepresentation::beginS2CTransaction()
, except that the value of this parameter is set to ILS_S2C_NOTIFY_CREATION when a representation object is created.
This function, which can be overridden, returns IlsTrue
. Its return value, or that of the overriding function, is used to control the execution of the transaction.
IlsTrue
, the notification, acknowledgement or rollback is propagated to each attribute of the representation object involved in the transaction.IlsFalse
, the propagation aborts for this representation object. Reimplemented in IlsSwTable, IlsSwRow, and IlsSwRepresentation.
|
virtual |
Commits updates performed on the representation object.
This member function commits the updates performed on the representation object by flushing the buffer where they are currently stored to the representation object update buffer. For further details, see Transaction Control in the IlsRepresentation
class description.
You must call this member function when a batch of updates has been carried out on the representation object and only if the function IlsRpObject::beginC2SUpdate()
has been previously and explicitly called.
|
protectedvirtual |
Called when the server has finished updating a representation object after a server-to-component transaction.
The parameter values passed to this function are the same as those passed to the previous function IlsRpObject::beginS2CUpdate()
.
The default implementation does nothing.
Reimplemented in IlsSwTable, IlsSwRow, and IlsSwRepresentation.
|
virtual |
Executes an asynchronous call to the function funNm on the Server object that matches the current representation object.
funNm | function name |
args | an array of IlsMvValue objects. |
argsNb | the dimension of the args array. |
inTrans | an IlsBoolean argument, which specifies whether the callback must be executed using the transaction mechanism or not (see Transaction Control in the IlsMvComponent class description). If so, and if no current transaction has been initialized, a new one is implicitly created and committed. By default, the parameter inTrans is set to IlsTrue . |
freeArgs | indicates whether the argument args must be freed by Rogue Wave Server or not. If set to:
|
IlsFalse
when the callback request cannot be sent, which means that the connection has been closed. Otherwise, it returns IlsTrue
.
|
virtual |
Executes an asynchronous call to the function funNm on the server object, the representation object is bound to.
The result the function is sent back through a call to the duplex function duplexFunNm on the representation object.
funNm | function name. |
args | arguments to be passed to the function funNm. |
argsNb | the dimension of the args array. |
duplexFunNm | duplex function name. |
duplexArgs | arguments to be passed to the function duplexFunNm. |
duplexNbArgs | the dimension of the duplexArgs array. |
resultIndex | the index of the arguments of the function duplexFunNm,which will contain the result of the function funNm . |
inTrans | indicates whether the callback must be executed using the transaction mechanism or not (see Transaction Control in the IlsMvComponent class description). If this parameter is set to IlsTrue (default value) and no current transaction has been initialized, a new transaction is implicitly created and committed. |
freeArgs | indicates whether the argument args must be freed by Rogue Wave Server or not. If set to:
|
IlsFalse
when the callback request cannot be sent, which means that the connection has been closed. Otherwise, it returns IlsTrue
.IlsTrue
return value does not mean that the function funNm has been successfully executed.
|
virtual |
Executes a synchronous call to the callback function funNm on the server object that matches the current representation object.
funNm | function name. |
args | an array of IlsMvValue objects. |
argsNb | the dimension of the args array. |
result | a reference assigned by Server to the result of the member function. |
freeArgs | indicates whether the argument args must be freed by Rogue Wave Server or not. If set to:
|
IlsFalse
when the callback request cannot be sent, which means that the connection has been closed. Otherwise, it returns IlsTrue
.When the callback fails, the value of the result parameter remains unchanged.
IlsRpAttributeId IlsRpObject::getAttributeId | ( | const IlsString & | label | ) | const |
Returns an attribute identifier from its name.
This member function takes the label of an attribute attached to the representation object as its argument and returns its identifier.
An attribute identifier is a number that reflects the order in which the attribute appears in a view specification.
Let us consider the following view specification:
The member function returns three different values depending on the arguments you pass:
1
.2
.-1
if label is not a representation object attribute. IlsRpAttributeId IlsRpObject::getAttributeId | ( | const IlsString & | label, |
int | index | ||
) | const |
Returns an indexed attribute identifier from its name and its index.
Let us consider the following view specification:
The member function returns two different values depending on the arguments you pass:
1
, the return value will be 2
.2
, the return value will be 3
.label | identifier of an attribute attached to a representation object. |
index | position of this attribute. |
IlsMvDataType IlsRpObject::getAttributeType | ( | IlsRpAttributeId | ) | const |
Returns the attribute type of a given attribute.
This member function takes as its argument the identifier of an attribute attached to the representation object and returns an enumerated value specifying the attribute type.
IlsRpObjectId IlsRpObject::getId | ( | ) | const |
Returns the identifier of the representation object.
This identifier is used internally by the interaction protocol between the server and the application components. It returns 0 if the representation object has not been associated with a Server object yet.
|
virtual |
Returns the label of the representation object.
This label is unique.
This virtual member function is mainly used by trace mode.
Reimplemented in IlsRepresentation.
const IlsRpObjModel * IlsRpObject::getModel | ( | ) | const |
Returns a pointer to the runtime representation object model associated with the representation object.
This pointer is never null, except when the process exits.
IlsMvRef IlsRpObject::getReference | ( | ) | const |
Returns a reference object that identifies a representation object in the server-to-component protocol.
This reference object can be encapsulated in an instance of IlsMvValue
and sent to the server. At the server level, the member function IlsMvComponentItf::getSvObject()
gets the server object associated with this reference.
IlsRepresentation * IlsRpObject::getRepresentation | ( | ) | const |
Returns a pointer to the representation that owns the representation object.
This pointer is never null, except when the process exits.
|
virtual |
Tests whether the id attribute can be assigned the hyper-reference identified by newHRef and belonging to newHRefOwner.
More specifically, it checks that the resulting updates of the relations on the server side will not impair the type integrity of the Server object model.
|
virtual |
Tests whether the id
attribute can be assigned the value of the object pointed to by newTarget
.
More specifically, it checks that the resulting updates of the relations on the server side will not impair the type integrity of the Server object model.
|
virtual |
Requests the server to set or add a target to a relation (usually a n-ary relation).
The new target is referenced by the representation object to which the function applies. If this representation object is not associated with a Server object yet, the Server object is created on the Server side, and then is assigned as the target of the relation.
If a new representation object is inserted into a collector using the appropriate IlsRpObject
constructor, this function must not be called.
collectorOwner | collector owner |
collectorId | collector id of the relation |
IlsFalse
if the update is not allowed (see the member function IlsRpObject::isEditable()
) or if the resulting updates on the server side might impair the Server object model type integrity (see the member function IlsRpObject::testCollection()
).
|
virtual |
Opens a view by dereferencing a hyper-reference (see Hyper-References) with aknowledgement.
This virtual member function is identical to the previous one except that Server calls the representation object function ackOpenView during the acknowledgement or rollback of the transaction that includes the call to the member function openView()
.
If the transaction is successful, Server also calls the notification function IlsRepresentation::onCreation()
on the new representation.
id | the attribute identifier, which must be a hyper-reference. |
argv | an array of values starting from index 0, which will be passed to the constructor of IlsMvView or of a derived class in order to initialize the view parameter values (see the IlsMvView constructor). |
argc | the number of values set in the array. |
ackArgv | array of IlsMvValue objects that can be null. |
ackArgc | number of arguments in ackArgv array. |
resultIndex | index of the argument in this array that will contain the result of the view opening. This argument is not modified if the including transaction is rolled back. This argument is automatically assigned the value IlsFalse if the including transaction fails or is rolled back. A successful transaction has two effects:
|
force | When set to:
|
IlsFalse
if the attrId
attribute is not a hyper reference or if the hyper-reference is not associated with any view. Otherwise, it returns IlsTrue
.
|
virtual |
Opens a view by dereferencing a hyper-reference (see Hyper-References).
id | the attribute identifier, which must be a hyper-reference. |
argv | an array of values starting from index 0, which will be passed to the constructor of IlsMvView or of a derived class in order to initialize the view parameter values (see the IlsMvView constructor). |
argc | the number of values set in the array. |
force | When set to:
|
IlsFalse
if the attrId
attribute is not a hyper reference or if the hyper-reference is not associated with any view. Otherwise, it returns IlsTrue
.
|
virtual |
Requests the server to reset the reference attribute id to null, so as to notify the server about this modification.
This member function returns IlsFalse
if the modification is not allowed.
|
virtual |
Requests the server to remove a target in a relation (usually a n-ary relation).
The target to be removed is referenced by the representation object to which the function applies.
collectorOwner | collector owner |
collectorId | collector id of the relation |
isDestroyed | when set to:
|
IlsFalse
if the attribute is not a collector or is not editable. See the member function IlsRpObject::isEditable()
.
|
virtual |
Called when the representation that owns the representation object is destroyed and invokes in turn the representation object destructor.
This function can be overridden.
|
virtual |
This member function notifies the object destruction to the server.
This member function should be called before the representation object is destroyed when the object destruction is triggered locally by the application component.
isDestroyed | set to IlsTrue if the representation object is destroyed locally by the component or to IlsFalse if not. |
|
virtual |
Requests the server to set the char
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the IlsMvUserType
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to replace the target object of a Server relation with another object.
The new target object is identified by a hyper-reference.
Before using it, make certain that the resulting changes on the server side are valid. For further details, see the member function IlsRpObject::isMatchingHRef()
.
id | the identifier of an attribute attached to the representation object. This attribute must be a reference or a hyper-reference. See the member functions IlsRpObject::isMatchingRef() and IlsRpObject::isMatchingHRef() for details. On the server side, the path associated with the reference or the hyper-reference indicates the relation whose target must be modified. |
newHRefOwner | a reference to a representation object. |
newHRef | the identifier of an attribute of this object. On the server side, the second and third parameters specify the object that is the new target of the relation. |
IlsFalse
if the modification is not allowed.
|
virtual |
Requests the server to set the attribute id of a reference to another representation object.
It enables the server to be notified about this modification.
The attribute can be a reference (see IlsMvDataType::MV_REF
) or a hyper-reference (see IlsMvDataType::MV_HREF
).
This member function returns IlsFalse
if the modification is not allowed. Before using this function, make certain the resulting changes on the server side are valid. For details, see the member functions IlsRpObject::isMatchingRef()
.
|
virtual |
Requests the server to set the IlsString
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the double
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the float
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the IlsAny
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the IlsBoolean
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the long
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Requests the server to set the short
attribute id to value.
id | attribute id |
value | value to be set |
IlsFalse
if the modification is not allowed (see isEditable()
for details).
|
virtual |
Identical to the previous one except that Server executes a call to the representation object function ackOpenView()
during the acknowledgment rollback of the transaction that includes the call to openView()
.
viewName | view name. |
argv | array of values starting from index 0, which are passed to the constructor of the class IlsMvView or of a derived class in order to initialize the view parameter values (see the IlsMvView constructor). |
argc | number of values set in the array. |
ackArgv | array of IlsMvValue objects that can be null. |
ackArgc | number of arguments in ackArgv array. |
resultIndex | index of the argument in this array that will contain the result of the view opening. This argument is not modified if the including transaction is rolled back. This argument is automatically assigned the value IlsFalse if the including transaction fails or is rolled back. A successful transaction has two effects:
|
force | when set to IlsTrue , a new view is opened, even if the same view has already been opened by the component. If its value is set to IlsFalse , no new view is created and only the member function IlsRepresentation::setSelection() function is called on the representation associated with the view opened. |
|
virtual |
Requests the server to open the view viewName on the server object associated with its corresponding representation object.
viewName | view name. |
argv | array of values starting from index 0, which are passed to the constructor of the class IlsMvView or of a derived class in order to initialize the view parameter values (see the IlsMvView constructor). |
argc | number of values set in the array. |
force | when set to IlsTrue , a new view is opened, even if the same view has already been opened by the component. If its value is set to IlsFalse , no new view is created and only the member function IlsRepresentation::setSelection() function is called on the representation associated with the view opened. |
|
virtual |
Called by the server when the attribute id of type IlsAny
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_XXX()
, ILS_RP_INDEXED_ATTR_XXX()
, ILS_RP_DEFAULT_XXX()
, ILS_RP_INDEXED_DEFAULT_XXX()
.
|
virtual |
Called by the server when the Boolean attribute id has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_BOOLEAN()
, ILS_RP_INDEXED_ATTR_BOOLEAN()
, ILS_RP_DEFAULT_BOOLEAN()
, ILS_RP_INDEXED_DEFAULT_BOOLEAN()
.
|
virtual |
Called by the server when the attribute id of type char
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_CHAR()
, ILS_RP_INDEXED_ATTR_CHAR()
, ILS_RP_DEFAULT_CHAR()
, ILS_RP_INDEXED_DEFAULT_CHAR()
.
IlsBoolean IlsRpObject::setConstAttribute | ( | IlsRpAttributeId | ) |
Sets the value of a constant attribute for a representation object.
The constant attribute is identified by the attribute identifier passed as the parameter. It must have been specified with a literal value in the dynamic-view type specification.
This function can be called on each constant attribute instead of the function setConstAttributes()
documented below whenever you need fine control on the order in which such constant attributes are assigned.
This function returns IlsFalse
if the argument does not identify a constant attribute.
void IlsRpObject::setConstAttributes | ( | ) |
Sets the value of the constant attributes of a representation object.
The constant attributes are those specified with a literal value in the dynamic view type specification. This function is particularly useful when a representation object is created directly on the component side, because in that case, the value of constant attributes is not notified by the server.
|
virtual |
Called by the server when the attribute id of type double
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_DOUBLE()
, ILS_RP_INDEXED_ATTR_DOUBLE()
, ILS_RP_DEFAULT_DOUBLE()
, ILS_RP_INDEXED_DEFAULT_DOUBLE()
.
|
virtual |
Called by the server when the attribute id of type float
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_FLOAT()
, ILS_RP_INDEXED_ATTR_FLOAT()
, ILS_RP_DEFAULT_FLOAT()
, ILS_RP_INDEXED_DEFAULT_FLOAT()
.
|
virtual |
called by the server when the label of the hyper-reference id has no associated modifier and must be set to hrefLabel.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_HREF()
, ILS_RP_INDEXED_ATTR_HREF()
, ILS_RP_DEFAULT_HREF()
, ILS_RP_INDEXED_DEFAULT_HREF()
.
|
virtual |
Called by the server when the attribute id of type long
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_LONG()
, ILS_RP_INDEXED_ATTR_LONG()
, ILS_RP_DEFAULT_LONG()
, ILS_RP_INDEXED_DEFAULT_LONG()
.
|
virtual |
Associates a new representation object with an existing Server object.
This Server object is identified by a "cousin" object that acts as its representation.
This function should be only invoked on an object that was created locally by the component. Such object must not be already associated with a Server object and must not have been previously added to a collector (see the member functions onAddToCollection()
and getId()
).
If those conditions are not met, the mapping is not performed and the function returns IlsFalse
.
setMapping()
has been called.
|
virtual |
Called by the server when the id attribute has no associated modifier and must reference the object pointed to by objectPtr.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_REF()
, ILS_RP_INDEXED_ATTR_REF()
, ILS_RP_DEFAULT_REF()
, ILS_RP_INDEXED_DEFAULT_REF()
.
|
virtual |
Called by the server when the id attribute of type short
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_XXX()
, ILS_RP_INDEXED_ATTR_XXX()
, ILS_RP_DEFAULT_XXX()
, ILS_RP_INDEXED_DEFAULT_XXX()
.
|
virtual |
Called by the server when the attribute id of type IlsString
has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_STRING()
, ILS_RP_INDEXED_ATTR_STRING()
, ILS_RP_DEFAULT_STRING()
, ILS_RP_INDEXED_DEFAULT_STRING()
.
|
virtual |
Called by the server when the attribute id of type IlsMvUserType
(or derived) has no associated modifier and must be set to value.
The default implemetation does nothing.
For details on representation attribute modifiers, see the macros ILS_RP_ATTR_USERTYPE()
, ILS_RP_INDEXED_ATTR_USERTYPE()
, ILS_RP_DEFAULT_USERTYPE()
, ILS_RP_INDEXED_DEFAULT_USERTYPE()
.
Reimplemented in IlsSwTable, and IlsSwRow.
|
virtual |
Tests whether the representation object can be added to the collection of objects designated by the attribute collectorId and owned by the representation object collectorOwner.
More specifically, it checks that the resulting relation updates on the server side will not impair the type integrity of the Server object model.