Defines the runtime visibility and access of a server object type (a subtype of the class IlsObject
or IlsEntity
).
More...
#include <ilserver/rtmodel.h>
Inherits IlsPropertyManager, and IlsRightsDef.
Public Member Functions | |
const IlsAttributeDef * | getAttribute (const IlsString &attributeNm) const |
Gets an attribute definition. More... | |
IlsAttributeDef const ** | getAttributes (int &dim) const |
Gets all attribute definitions. More... | |
const IlsFunctionDef * | getFunction (const IlsString &name) const |
Gets a function definition. More... | |
IlsFunctionDef const ** | getFunctions (int &dim) const |
Gets all functions definitions. More... | |
const IlsAttributeDef * | getIdentifier () const |
Get the definition of the attribute declared as identifier. More... | |
const IlsString & | getName () const |
Returns the name of the object type. | |
IlsObjectConstructor | getObjectConstructor () const |
Returns the function used by the server to instantiate the object type. | |
IlsObjectType const *const * | getParents (int &dim) const |
Gets direct parent types. More... | |
const IlsRelationDef * | getRelation (const IlsString &relationNm) const |
Gets a relation definition. More... | |
IlsRelationDef const ** | getRelations (int &dim) const |
Gets all relations definitions. More... | |
IlsBoolean | hasParent (const IlsString &rtParentType) const |
Check is a type is a parent of this object type. More... | |
IlsBoolean | isDynamicType () const |
Returns IlsTrue if the type has been declared as a dynamic type. | |
IlsBoolean | isExported () const |
Returns IlsTrue if this element of the server model interpreter is exported. More... | |
IlsBoolean | isSubtypeOf (const IlsString &superClass) const |
Returns IlsTrue if the type is a subclass of superClass. | |
IlsBoolean | isViewType () const |
Returns IlsTrue if the object type is a dynamic-view type or IlsFalse otherwise. | |
void | setExported (IlsBoolean b) |
Changes exportation mode of the object type. More... | |
Friends | |
class | IlsModelInterpreter |
Defines the runtime visibility and access of a server object type (a subtype of the class IlsObject
or IlsEntity
).
Library: mvserver
Such an object is implicitly created within the server model interpreter by the static initialization of data encapsulated in macros such as
or ILS_OBJECT_BEGIN()
/ILS_OBJECT_END()
ILS_ENTITY_BEGIN()
/ILS_ENTITY_END()
. It is used internally by this interpreter to check and preprocess the part of a dynamic view type specification that relates to the server object type. It is transparent to the developer. However, it can be used when an application needs to introspect the server model at runtime.
Note that when an object type is declared using these macros, an implicit unary relation on itself, named this
, is declared to the runtime model. An extra attribute (rpStatus
) is also declared although it does not correspond to any real attribute in the class.
const IlsAttributeDef* IlsObjectType::getAttribute | ( | const IlsString & | attributeNm | ) | const |
Gets an attribute definition.
This member function returns the definition of the attribute named attributeNm declared on the object type or on a parent type – directly or transitively. This function returns the null pointer when no attribute with this name is declared on the object type.
IlsAttributeDef const** IlsObjectType::getAttributes | ( | int & | dim | ) | const |
Gets all attribute definitions.
This member function returns an array of constant pointers to the attribute definitions directly declared on the object type. The argument dim is assigned the dimension of this array. The array must be deleted by the caller.
This function does not return attributes declared in superclasses. The implicit rpStatus
attribute is also present in the returned array.
const IlsFunctionDef* IlsObjectType::getFunction | ( | const IlsString & | name | ) | const |
Gets a function definition.
This member function returns the definition of the function named functionNm
declared on the object type or on a parent type – directly or transitively. This function returns the null pointer when no function with this name is declared on the object type.
IlsFunctionDef const** IlsObjectType::getFunctions | ( | int & | dim | ) | const |
Gets all functions definitions.
This member function returns an array of constant pointers to the function definitions declared directly on the object type. The argument dim is assigned to the dimension of this array.
The array must be deleted by the caller.
const IlsAttributeDef* IlsObjectType::getIdentifier | ( | ) | const |
Get the definition of the attribute declared as identifier.
This member function returns the definition of the attribute declared as the identifier of the object type. If no identifier is found on this class, an identifier attribute is looked up in superclasses.
IlsObjectType const* const* IlsObjectType::getParents | ( | int & | dim | ) | const |
Gets direct parent types.
This member function returns an array of constant pointers to the direct parent types. The argument dim
sets the size of this array. The array must not to be deleted by the caller.
const IlsRelationDef* IlsObjectType::getRelation | ( | const IlsString & | relationNm | ) | const |
Gets a relation definition.
This member function returns the definition of the relation named relationNm, declared on the object type or on a parent type – directly or transitively. This function returns the null pointer when no relation with this name is declared on the object type.
IlsRelationDef const** IlsObjectType::getRelations | ( | int & | dim | ) | const |
Gets all relations definitions.
This member function returns an array of constant pointers to the relation definitions declared directly on the object type. The argument dim is assigned to the dimension of this array. The array must be deleted by the caller.
The implicit unary relation on itself, named this
, is taken into account when this array is returned.
IlsBoolean IlsObjectType::hasParent | ( | const IlsString & | rtParentType | ) | const |
Check is a type is a parent of this object type.
This member function returns IlsTrue
if the object type inherits directly or transitively from the parent type and the argument rtParentType is also a runtime accessible type. Otherwise, the function returns IlsFalse
.
IlsBoolean IlsObjectType::isExported | ( | ) | const |
Returns IlsTrue
if this element of the server model interpreter is exported.
By default, all model interpreter elements are exported.
void IlsObjectType::setExported | ( | IlsBoolean | b | ) |
Changes exportation mode of the object type.
Use this member function to export an element of the server model interpreter or to cancel exportation. Non-exported elements are not seen in Rogue Wave Server Studio.