FARGOS/VISTA Object Management Environment Core
..
|
FARGOS/VISTA Object Management Environment class description. More...
#include <OMEclass.h>
Public Member Functions | |
OMEclass (OMEnameSpaceGroup *nameSpace, const OMEstring &name, const uint32_t verID, const uint32_t iSize, const bool unique=0, const CreateInstanceFP csRoutine=OMEdefaultInstanceCreate, const DeleteInstanceFP dsRoutine=OMEdefaultInstanceDelete) | |
~OMEclass () | |
void | setMetaObject (const OMEoid &obj) |
void | setMetaObject (const OMEtype &obj) |
int | addMethod (OMEmethodP) |
Add method implementation. More... | |
OME_FAST_CALL OMEmethodP | findMethod (const OMEstring &methodName, const uint32_t indx=0) const |
OME_FAST_CALL OMEinvocationData * | findMethodImplementation (const uint32_t signature, const OMEstring &methodName, const uint32_t indx=0) const |
OME_FAST_CALL int | listMethodInfo (OMEassoc &result) const |
int | setStorageDescription (const struct OMEinstanceVarDescr *desc) |
uint_fast16_t | setStorageDescription (const OMEarray &oil2Data) |
int | inheritFromClass (const OMEstring &nameSpace, const OMEstring &name, const uint32_t verID=0, const bool unique=false) |
int | inheritFromClass (const char *nameSpace, const char *name, const uint32_t verID=0, const bool unique=false) |
bool | resolved () const |
bool | permitInheritOfUniqueCopy () const |
uint_fast16_t | inheritListTotal () const |
OME_FAST_CALL OMEclass * | getClassAtLevel (uint_fast16_t level) const |
const OME_FAST_CALL unsigned char * | getSearchOrder (uint8_t *count, const int_fast16_t startLevel=-1) const NONNULL_CLASS_PARAMETERS(2) |
Get table of indexes that specify class search order. More... | |
uint_fast32_t | getNextInstanceID () |
const OMEarray & | getVariableDescriptions () const |
const OMEstring & | getNameSpaceName () const |
bool | doesInheritFrom (const OMEclass *aClass, OMEstring *fromClassName=nullptr, uint32_t *fromClassVerID=nullptr) const |
int | resolveLinkages (OMEstring *missingClassName=nullptr, uint32_t *missingClassVersionID=nullptr) |
Attempt to resolve inheritance tree. More... | |
void * | createInstanceData () |
Allocate and initialize storage for instance variables. More... | |
void | deleteInstanceData (void *iData) |
Delete instance variable storage. More... | |
OME_FAST_CALL OMEtype * | extractInstanceData (const void *iData, bool annotate) const |
OME_FAST_CALL int | importInstanceData (void *iData, const OMEtype &data) const |
template<typename STREAMTYPE > | |
STREAMTYPE & | dumpClassData (STREAMTYPE &o=std::cout) const |
Public Attributes | |
OMEstring | className |
uint32_t | versionID |
uint32_t | hashIndex |
OMEhash(className) More... | |
uint32_t | instanceSize |
required storage in bytes More... | |
OMEoid * | metaObject |
Private Member Functions | |
bool | inheritsFrom (const OMEclass *aClass, const OMEstring *baseClassName=nullptr, const uint32_t *baseClassVerID=nullptr) const |
void | buildInheritanceGraph (uint_fast16_t *count, class OMEinheritGraphNode *l[]) |
uint8_t | computeSearchOrder (uint8_t searchList[], const int_fast16_t startLevel=-1, const uint8_t currentCount=0) const |
int | addMethodName (OMEstring &name, OMEmethodP methodRecord) |
Private Attributes | |
class OMEnameSpaceGroup * | nameSpaceInfo |
class OMEinheritEntry * | inheritList |
std::map< uint32_t, OMEmethodP > | methodTable |
bool | resolvedFlag |
bool | forceInheritUnique |
uint32_t | instanceCount |
uint_fast16_t | classInstanceTotal |
class OMEinheritGraphNode ** | classInstances |
uint8_t * | searchOrderLists |
CreateInstanceFP | storageCreateRoutine |
DeleteInstanceFP | storageDeleteRoutine |
struct OMEinstanceVarDescr const * | varDescRec |
OMEarray | variableDescriptions |
FARGOS/VISTA Object Management Environment class description.
OMEclass::OMEclass | ( | OMEnameSpaceGroup * | nameSpace, |
const OMEstring & | name, | ||
const uint32_t | verID, | ||
const uint32_t | iSize, | ||
const bool | unique = 0 , |
||
const CreateInstanceFP | csRoutine = OMEdefaultInstanceCreate , |
||
const DeleteInstanceFP | dsRoutine = OMEdefaultInstanceDelete |
||
) |
OMEclass::~OMEclass | ( | ) |
int OMEclass::addMethod | ( | OMEmethodP | methodRecord | ) |
Add method implementation.
References addMethodName(), OMEreferenceCount::addReadOnlyReference(), className, and OMEmethod::methodName.
Referenced by OMEdefineNewMethod().
|
private |
References _STD, OMEmethod::addImplementation(), OMEmethod::methodName, methodTable, and OMEhash().
Referenced by addMethod().
|
private |
References inheritList.
Referenced by resolveLinkages().
|
private |
References classInstances, and classInstanceTotal.
Referenced by resolveLinkages().
void * OMEclass::createInstanceData | ( | ) |
Allocate and initialize storage for instance variables.
The class-specific instance variable allocation is called.
void OMEclass::deleteInstanceData | ( | void * | iData | ) |
Delete instance variable storage.
The class-specific deconstructor is called to delete the instance variables and deallocate associated storage.
iData | is a pointer to the base of the instance variable storage. It will have previously been obtained by a call to createInstanceData(). |
bool OMEclass::doesInheritFrom | ( | const OMEclass * | aClass, |
OMEstring * | fromClassName = nullptr , |
||
uint32_t * | fromClassVerID = nullptr |
||
) | const |
References className, doesInheritFrom(), inheritList, OMEfindClassDescription(), and versionID.
Referenced by doesInheritFrom().
STREAMTYPE & OMEclass::dumpClassData | ( | STREAMTYPE & | o = std::cout | ) | const |
References classInstances, classInstanceTotal, className, hashIndex, resolvedFlag, and versionID.
OMEtype * OMEclass::extractInstanceData | ( | const void * | iData, |
bool | annotate | ||
) | const |
References getVariableDescriptions(), OMEarray::indexExists(), OMEtype::initializeAsType(), OME_ARRAY, and OME_ASSOC.
References _STD, className, OMEstring::length(), OMEmethod::methodName, methodTable, OMEhash(), and OMEstring::substr().
Referenced by findMethodImplementation(), and OMEdefineNewMethod().
OMEinvocationData * OMEclass::findMethodImplementation | ( | const uint32_t | signature, |
const OMEstring & | methodName, | ||
const uint32_t | indx = 0 |
||
) | const |
References OMEmethod::findImplementationWithSignature(), and findMethod().
Referenced by OMEobjectInstance::findRoutine().
OME_FAST_CALL OMEclass * OMEclass::getClassAtLevel | ( | uint_fast16_t | level | ) | const |
References classInstances.
Referenced by OMEobjectInstance::findRoutine(), and OMEobjectInstance::importObject().
const OMEstring & OMEclass::getNameSpaceName | ( | ) | const |
References OMEnameSpaceGroup::getNameSpace(), and nameSpaceInfo.
Referenced by OMEobjectInstance::createObject(), and OMEobjectInstance::importObject().
|
inline |
References instanceCount.
Referenced by OMEobject::OMEobject().
const unsigned char * OMEclass::getSearchOrder | ( | uint8_t * | count, |
const int_fast16_t | startLevel = -1 |
||
) | const |
Get table of indexes that specify class search order.
count | points to a location into which the number of class entries returned is stored. |
startLevel | is used to indicate the number of levels to be selected. If -1, the value is determined from the class description. |
References classInstanceTotal, and searchOrderLists.
Referenced by OMEobjectInstance::findRoutine().
const OMEarray & OMEclass::getVariableDescriptions | ( | ) | const |
References OMEconvertToStorageDescription(), varDescRec, and variableDescriptions.
Referenced by extractInstanceData(), importInstanceData(), and OMEdefaultInstanceCreate().
int OMEclass::importInstanceData | ( | void * | iData, |
const OMEtype & | data | ||
) | const |
References getVariableDescriptions(), OMEarray::indexExists(), OME_ARRAY, OME_ASSOC, OME_ERROR_BAD_DATA, and OMEtype::type.
Referenced by OMEobjectInstance::importObject().
|
inline |
References inheritFromClass().
int OMEclass::inheritFromClass | ( | const OMEstring & | nameSpace, |
const OMEstring & | name, | ||
const uint32_t | verID = 0 , |
||
const bool | unique = false |
||
) |
References inheritList, instanceCount, and resolvedFlag.
Referenced by inheritFromClass().
|
inline |
|
private |
int OMEclass::listMethodInfo | ( | OMEassoc & | result | ) | const |
References _STD, OMEmethod::listMethodInfo(), OMEmethod::methodName, and methodTable.
|
inline |
References forceInheritUnique.
|
inline |
References resolvedFlag.
Referenced by OMEobjectInstance::createObject(), and OMEobjectInstance::importObject().
int OMEclass::resolveLinkages | ( | OMEstring * | missingClassName = nullptr , |
uint32_t * | missingClassVersionID = nullptr |
||
) |
Attempt to resolve inheritance tree.
missingClassName | is an optional parameter which defaults to a null pointer. |
missingClassVersionID | is an optional parameter which defaults to a null pointer. If a inherited class cannot be resolved, the OMEstring pointed to by missingClassName will be filled in with the name of the missing class and the location pointed to by missingClassVerID will be filled with the version Id. |
0 | indicates success. |
OME_ERROR_NO_SUCH_CLASS | indicates a required class was not found. |
OME_ERROR_CIRCULAR_INHERITANCE | indicates an attempt was made to inherit from a class which inherits in some way from a class that inherits it. |
References buildInheritanceGraph(), classInstances, classInstanceTotal, computeSearchOrder(), inheritList, MAX_INHERIT_TOTAL, OME_ERROR_CIRCULAR_INHERITANCE, OME_ERROR_NO_SUCH_CLASS, OMEfindClassDescription(), resolvedFlag, and searchOrderLists.
Referenced by OMEobjectInstance::createObject(), and OMEobjectInstance::importObject().
|
inline |
References metaObject.
Referenced by OILsetClassMetaObject().
|
inline |
References metaObject, OMEtype::oid, OME_OID, OMEtype::type, and OMEtype::value.
uint_fast16_t OMEclass::setStorageDescription | ( | const OMEarray & | oil2Data | ) |
References OMEconvertToStorageDescription(), and variableDescriptions.
int OMEclass::setStorageDescription | ( | const struct OMEinstanceVarDescr * | desc | ) |
References varDescRec.
|
private |
Referenced by computeSearchOrder(), dumpClassData(), getClassAtLevel(), OMEclass(), resolveLinkages(), and ~OMEclass().
|
private |
Referenced by computeSearchOrder(), dumpClassData(), getSearchOrder(), inheritListTotal(), OMEclass(), resolveLinkages(), and ~OMEclass().
OMEstring OMEclass::className |
Referenced by OMEnameSpaceGroup::addClass(), addMethod(), OMEobjectInstance::createObject(), doesInheritFrom(), dumpClassData(), OMEnameSpaceGroup::findClass(), findMethod(), OMEobjectInstance::findRoutine(), OMEobjectInstance::importObject(), OMEthread::invokeMethod(), and OMEobjectInstance::invokeMethod().
|
private |
Referenced by OMEclass(), and permitInheritOfUniqueCopy().
uint32_t OMEclass::hashIndex |
|
private |
Referenced by buildInheritanceGraph(), doesInheritFrom(), inheritFromClass(), OMEclass(), resolveLinkages(), and ~OMEclass().
|
private |
Referenced by getNextInstanceID(), inheritFromClass(), and OMEclass().
uint32_t OMEclass::instanceSize |
required storage in bytes
Referenced by OMEclass(), and OMEdefaultInstanceCreate().
OMEoid* OMEclass::metaObject |
Referenced by OMEclass(), setMetaObject(), and ~OMEclass().
|
private |
Referenced by addMethodName(), findMethod(), listMethodInfo(), and ~OMEclass().
|
private |
Referenced by getNameSpaceName(), and OMEclass().
|
private |
Referenced by dumpClassData(), inheritFromClass(), OMEclass(), resolved(), and resolveLinkages().
|
private |
Referenced by getSearchOrder(), OMEclass(), resolveLinkages(), and ~OMEclass().
|
private |
Referenced by OMEclass().
|
private |
Referenced by OMEclass().
|
private |
Referenced by getVariableDescriptions(), OMEclass(), and setStorageDescription().
|
mutableprivate |
Referenced by getVariableDescriptions(), and setStorageDescription().
uint32_t OMEclass::versionID |
![]() | Generated: Tue Jul 28 2020 16:03:27
Support Information |