IlsObjectType
 
IlsObjectType
Category 
Dynamic view-related class (server side)
Inheritance Path 
IlsObjectType
Description 
An IlsObjectType object defines the runtime visibility and access of a server object type (a subtype of the class IlsObject or IlsEntity). Such an object is implicitly created within the server model interpreter by the static initialization of data encapsulated in macros such as ILS_OBJECT_BEGIN/ILS_OBJECT_END or 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.
Library 
<mvserver>
Header File
#include <ilserver/rtmodel.h>
Synopsis 
class IlsObjectType{
public:
const IlsString& getName();
IlsObjectConstructor getObjectConstructor();
IlsBoolean hasParent(const IlsString& parent) const;
IlsObjectType*const*const getParents(int& dim)const;
IlsRelationDef*const getRelation
(const IlsString& relationNm) const;
IlsRelationDef*const* getRelations(int& dim)const;
IlsAttributeDef*const getAttribute
(const IlsString& attributeNm) const;
IlsAttributeDef*const* getAttributes(int& dim)const;
IlsFunctionDef*const getFunction
(const IlsString& functionNm) const;
IlsFunctionDef*const* getFunctions(int& dim)const;
const IlsAttributeDef* getIdentifier() const;
IlsBoolean isDynamicType();
IlsBoolean isViewType()const;
IlsBoolean isSubtypeOf(const IlsString& superClass) const;
IlsBoolean isExported() const;
void setExported(IlsBoolean b);
};
Member Functions 
const IlsString& getName();
This member function returns the name of the object type.
IlsObjectConstructor getObjectConstructor();
This member function returns the function used by the server to instantiate the object type.
IlsBoolean hasParent(const IlsString& parent) const;
This member function returns IlsTrue if the object type inherits directly or transitively from the parent type and the argument parent is also a runtime accessible type. Otherwise, the function returns IlsFalse.
IlsObjectType*const*const getParents(int& dim) const;
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.
IlsRelationDef*const getRelation(const IlsString& relationNm) const;
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* getRelations(int& dim) const;
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.
IlsAttributeDef*const getAttribute(const IlsString& attributeNm) const;
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* getAttributes(int& dim) const;
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.
IlsFunctionDef*const getFunction(const IlsString& functionNm) const;
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* getFunctions(int& dim) const;
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* getIdentifier() const;
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.
IlsBoolean isDynamicType();
This member function returns IlsTrue if the type has been declared as a dynamic type.
Notes:  
1. Dynamic-view types are not dynamic types.
2. The member function
IlsBoolean isDynamic() const;
is deprecated. Use the function IlsObjectType::isViewType, documented below, instead.
IlsBoolean isViewType()const;
This member function returns IlsTrue if the object type is a dynamic-view type or IlsFalse otherwise.
IlsBoolean isSubtypeOf(const IlsString& superClass) const;
This member function returns IlsTrue if the type is a subclass of superClass.
IlsBoolean isExported() const;
This member function returns IlsTrue if this element of the server model interpreter is exported. By default, all model interpreter elements are exported.
void setExported(IlsBoolean b);
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.
See Also 
ILS_ENTITY_BEGIN/ILS_ENTITY_END, IlsModelInterpreter, ILS_OBJECT_BEGIN/ILS_OBJECT_END

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.