FARGOS/VISTA Object Management Environment Core
..
|
Subclass of OMEobject that provides access to a local object. More...
#include <OMEobject.h>
Public Member Functions | |
OME_FAST_CALL void | deleteThisObject (const OMEoid &objRefData, const OMEthread *fromThread) |
Request deletion of an object. More... | |
OME_FAST_CALL void * | getInstanceDataAtLevel (uint_fast16_t lvl) const OME_ALWAYS_INLINE |
Return pointer to instance variables. More... | |
const OME_FAST_CALL OMEinvocationData * | findRoutine (int *retGraphLevel, const OMEstring &methodName, const uint32_t hashIndx, const uint32_t argc, const OMEarray &argv, const uint32_t signature=0, const int inheritanceLevel=-1, const int mustBeAtLevel=-1) |
Locate a method implementation. More... | |
virtual OME_FAST_CALL OMEthread * | invokeMethod (int *errRet, const OMEstring &methodName, const uint32_t hashIndx, const OMEoid &objRefData, const uint32_t argc, const OMEarray &argv, const uint32_t signature=0, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, const int inheritanceLevel=-1, const int mustBeAtLevel=-1) override |
Invoke method on an object. More... | |
OME_FAST_CALL int | sendMessage (const OMEstring &methodName, const OMEarray &argv, OMEoid &destObj) |
OME_FAST_CALL void | noteThreadTerminated (class OMEthread *, bool modified, uint32_t exitStatus, bool wasPreemptable) |
void | dropActiveThreadReference () |
OME_FAST_CALL uint_fast16_t | listAllowedMethods (OMEarray &result) const |
OME_FAST_CALL void | allowMethod (const OMEthread *thread, const OMEstring &methodName, const OMEstring &className, const bool always=false) |
Allow a method to be invoked while another method is active. More... | |
OME_FAST_CALL void | allowMethod (const OMEstring &methodName, const OMEstring &className, const bool always=false) |
Allow a method to be invoked while another method is active. More... | |
OME_FAST_CALL void | allowMethod (const OMEstring &methodName, const int level=-1, const bool always=false) |
Allow a method to be invoked while another method is active. More... | |
![]() | |
virtual bool | isThread () const |
Returns a Boolean indicating if the object is representing a thread. More... | |
OME_FAST_CALL void | getOIDdata (OMEoidID *idInfo) const |
const OMEoid & | getDefaultOID () |
Returns read-only reference to object's default object Id. More... | |
OME_FAST_CALL void | setMetaObject (const OMEoid *obj) |
Attach an meta object to the object. More... | |
OME_FAST_CALL OMEthread * | invokeMethodAndWaitForReply (int *errRet, const OMEstring &methodName, const uint32_t hashIndx, const OMEoid &objRefData, const uint32_t argc, const OMEarray &argv, const uint32_t signature, OMEthread *fromThread, const int inheritanceLevel=-1) |
Perform RPC-style method invocation against an object. More... | |
OME_FAST_CALL void | addTickCount (const int64_t tickCount) const OME_ALWAYS_INLINE |
Add tick counts to per-object statistics. More... | |
OME_FAST_CALL int64_t | getTickCount () const OME_ALWAYS_INLINE |
Return number of elapsed time in ticks spent executing object's methods. More... | |
OME_FAST_CALL uint32_t | getSliceCount () const OME_ALWAYS_INLINE |
Return number of time slices allocated to object's methods. More... | |
OME_FAST_CALL uint32_t | getInvocationCount () const OME_ALWAYS_INLINE |
Return number of methods invoked against object. More... | |
![]() | |
OMEreferenceCount () | |
virtual | ~OMEreferenceCount () |
void | addReadOnlyReference () |
int_fast32_t | dropReference () |
virtual OMEreferenceCount * | deepCopy () const |
OMEreferenceCount * | getUniqueReference () |
int_fast32_t | totalReferences () const OME_ALWAYS_INLINE |
Static Public Member Functions | |
static int | Object_delete (OMEthread *) |
static void | defineOMEobjectClass () |
static OME_FAST_CALL OMEoid * | createObject (OMEclass *objClass, const OMEassoc &acl, const uint32_t argc, const OMEarray &argv, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, OMEtype *errInfo=nullptr) |
Create an object within the local FARGOS/VISTA Object Managment Environment. More... | |
static OME_FAST_CALL OMEoid * | createObjectOfClass (const uint32_t argc, const OMEarray &argv, const OMEassoc &acl, const OMEstring &name, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, const uint32_t verID=0, const OMEstring *nmSpace=nullptr, OMEtype *errInfo=nullptr) |
Create an object, potentially searching through the OMEnameSpaceGroup list for most current version of the class implementation. More... | |
static OME_FAST_CALL OMEoid * | createObjectOfClass (const uint32_t argc, const OMEarray &argv, const OMEassoc &acl, const OMEstring &name, const OMEstring &user, const OMEstring &pw, const uint32_t verID=0, const OMEstring *nmSpace=nullptr) |
Create object using the credentials of a different user. More... | |
static OME_FAST_CALL OMEoid * | importObject (const OMEstring &data, bool duplicate, OMEtype *errInfo=nullptr) |
Import an object from its encoded image. More... | |
Protected Member Functions | |
OMEobjectInstance (OMEclass *classData) | |
~OMEobjectInstance () | |
![]() | |
OMEobject (OMEclass *classData) | |
virtual | ~OMEobject () |
![]() | |
void | lockMe () |
void | unlockMe () |
Private Member Functions | |
OME_FAST_CALL bool | threadAllowed (OMEthread *thread, const OMEallowEntry *entry=0) |
OMEthread * | unblockNextThread () |
OME_FAST_CALL OMEthread * | unblockQueuedThread (const OMEallowEntry *entry=nullptr) |
Private Attributes | |
void ** | instanceData |
_STD deque< OMEallowEntryP > | allowedMethods |
_STD deque< OMEthreadP > | queuedThreads |
uint32_t | activeThreadCount |
uint32_t | totalThreadCount |
Additional Inherited Members | |
![]() | |
const OMEclass * | classInfo |
Pointer to class description. More... | |
OMEoid * | metaObject |
Pointer to meta-object. More... | |
![]() | |
uint32_t | totalInvocations |
uint32_t | instanceID |
OMEentityID * | entityID |
OMEoidStorageInternal * | oidReferences |
![]() | |
int32_t | references |
int32_t | mutexID |
Subclass of OMEobject that provides access to a local object.
Fundamental base class for all objects hosted by a FARGOS/VISTA Object Management Environment.
|
protected |
Referenced by createObject(), and importObject().
|
protected |
void OMEobjectInstance::allowMethod | ( | const OMEstring & | methodName, |
const int | level = -1 , |
||
const bool | always = false |
||
) |
Allow a method to be invoked while another method is active.
References activeThreadCount, allowedMethods, OMEobject::classInfo, OMEclass::inheritListTotal(), OMEmethodDefinition::methodName, OME_CRITICAL_SECTION_METHOD_INVOKE, OMEendCriticalSection(), OMEstartCriticalSection(), queuedThreads, OMEthread::releaseThread(), and unblockQueuedThread().
void OMEobjectInstance::allowMethod | ( | const OMEstring & | methodName, |
const OMEstring & | className, | ||
const bool | always = false |
||
) |
Allow a method to be invoked while another method is active.
References OMEmethodDefinition::className.
void OMEobjectInstance::allowMethod | ( | const OMEthread * | thread, |
const OMEstring & | methodName, | ||
const OMEstring & | className, | ||
const bool | always = false |
||
) |
Allow a method to be invoked while another method is active.
References OMEmethodDefinition::className.
Referenced by importObject().
|
static |
Create an object within the local FARGOS/VISTA Object Managment Environment.
References AND_ASSIGN_INTO, AND_OUTPUT_NLM, OMEobject::classInfo, OMEclass::className, DEFINE_NLM_MESSAGE, OMEclass::getNameSpaceName(), OMEclass::inheritListTotal(), invokeMethod(), NEXT_NLM_PARAM, NOTE_DEFAULT_NLM, OME_EXPECT_FALSE, OMEdebugLogLevel3, OMEobjectInstance(), OMEclass::resolved(), OMEclass::resolveLinkages(), and OMEclass::versionID.
Referenced by createObjectOfClass().
|
static |
Create object using the credentials of a different user.
References AND_OUTPUT_NLM, createObject(), DEFINE_NLM_MESSAGE, OMEreferenceCount::dropReference(), NEXT_NLM_PARAM, NOTE_DEFAULT_NLM, OME_EXPECT_FALSE, OMEdebugLogLevel3, and OMEfindClassDescription().
|
static |
Create an object, potentially searching through the OMEnameSpaceGroup list for most current version of the class implementation.
References AND_ASSIGN_INTO, AND_OUTPUT_NLM, createObject(), DEFINE_NLM_MESSAGE, NEXT_NLM_PARAM, NOTE_DEFAULT_NLM, OME_EXPECT_FALSE, OMEdebugAlways, OMEdebugLogLevel2, and OMEfindClassDescription().
Referenced by OMEcreateObject().
|
static |
References OMEdefineNewClass(), and OMEstringInROM.
void OMEobjectInstance::deleteThisObject | ( | const OMEoid & | objRefData, |
const OMEthread * | fromThread | ||
) |
Request deletion of an object.
References OMEobject::classInfo, OMEclass::inheritListTotal(), and invokeMethod().
void OMEobjectInstance::dropActiveThreadReference | ( | ) |
References activeThreadCount, OMEthread::callStack, OMEthread::getThreadState(), LOG_CERR, LOG_ENDLINE, OME_CRITICAL_SECTION_METHOD_INVOKE, OME_THREAD_TERMINATED, OMEdebugBlockedInvocations, OMEdebugFlag, OMEendCriticalSection(), OMEstartCriticalSection(), OMEthread::releaseThread(), OMEcallStack::thisMethod, and unblockNextThread().
Referenced by OMEthread::setAsPreemptable().
const OMEinvocationData * OMEobjectInstance::findRoutine | ( | int * | retGraphLevel, |
const OMEstring & | methodName, | ||
const uint32_t | hashIndx, | ||
const uint32_t | argc, | ||
const OMEarray & | argv, | ||
const uint32_t | signature = 0 , |
||
const int | inheritanceLevel = -1 , |
||
const int | mustBeAtLevel = -1 |
||
) |
Locate a method implementation.
References OMEobject::classInfo, OMEclass::className, OMEclass::findMethodImplementation(), OMEclass::getClassAtLevel(), OMEclass::getSearchOrder(), OMEclass::inheritListTotal(), LOG_CERR, LOG_ENDLINE, OMEmethodDefinition::methodName, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OMEmethodSignature(), and OMEmethodDefinition::signature.
Referenced by OMEthread::callMethodWithSetArgument(), and invokeMethod().
|
inline |
Return pointer to instance variables.
References instanceData.
Referenced by OMEthread::getInstanceData(), and importObject().
|
static |
Import an object from its encoded image.
References allowMethod(), AND_ASSIGN_INTO, AND_OUTPUT_NLM, OMEoidID::birthplace, OMEobject::classInfo, OMEclass::className, OMEoidStorage::convertExternalReferences(), OMEmethodDefinition::data, DEFINE_NLM_MESSAGE, OMEarray::elementCount(), EMIT_CONDITIONAL_MESSAGE, OMEobject::entityID, OMEclass::getClassAtLevel(), getInstanceDataAtLevel(), OMEclass::getNameSpaceName(), OMEoid::getObjectACL(), OMEoid::getObjectOID(), OMEtype::i, OMEclass::importInstanceData(), OMEarray::indexExists(), OMEclass::inheritListTotal(), OMEobject::instanceID, OMEoidID::instanceIndex, OMEoid::isExternal(), l, LOG_CERR, LOG_ENDLINE, NEXT_NLM_PARAM, NOTE_DEFAULT_NLM, OMEtype::oid, OME_ARRAY, OME_ERROR_BAD_DATA, OME_ERROR_DUPLICATE_OBJECT, OME_EXPECT_FALSE, OME_OID, OME_STRING, OMEdebugAlways, OMEdebugLogLevel2, OMEdebugLogLevel3, OMEfindClassDescription(), OMEobjectInstance(), OMEclass::resolved(), OMEclass::resolveLinkages(), OMEtype::s, OMEtype::type, OMEtype::value, OMEclass::versionID, and WITH_DATE_TIME_LEVEL.
Referenced by OILimportObject().
|
overridevirtual |
Invoke method on an object.
Implements OMEobject.
References activeThreadCount, OMEobject::classInfo, OMEclass::className, OMEinvocationData::code, findRoutine(), OMEinvocationData::function, OMEthread::generateException(), OMEoid::getObjectACL(), OMEthread::getThreadState(), OMEthread::getUserID(), OMEclass::hashIndex, OMEobject::instanceID, LOG_CERR, LOG_ENDLINE, OMEmethodDefinition::methodName, OME_CRITICAL_SECTION_METHOD_INVOKE, OME_ERROR_NO_SUCH_METHOD, OME_ERROR_NOT_AUTHORIZED, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OME_THREAD_TERMINATED, OMEcheckACL(), OMEdebugFlag, OMEdebugIncludeArguments, OMEdebugMethodInvocations, OMEendCriticalSection(), OMEmillisecondsSinceBoot(), OMEstartCriticalSection(), OMEarray::outputOnStream(), OMEthread::releaseThread(), OMEmethodDefinition::signature, OMEthread::sourceFileName, OMEthread::sourceLineNumber, threadAllowed(), OMEobject::totalInvocations, and totalThreadCount.
Referenced by createObject(), and deleteThisObject().
uint_fast16_t OMEobjectInstance::listAllowedMethods | ( | OMEarray & | result | ) | const |
void OMEobjectInstance::noteThreadTerminated | ( | class OMEthread * | thread, |
bool | modified, | ||
uint32_t | exitStatus, | ||
bool | wasPreemptable | ||
) |
References OMEthread::callStack, OMEobject::classInfo, OMEclass::hashIndex, instanceData, OMEobject::instanceID, LOG_CERR, LOG_ENDLINE, OME_CRITICAL_SECTION_METHOD_INVOKE, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OME_SET, OMEdebugFlag, OMEdebugThreadDelete, OMEendCriticalSection(), OMEstartCriticalSection(), s, OMEcallStack::thisMethod, and totalThreadCount.
|
static |
References OMEthread::getInstanceData(), OME_EXPECT_FALSE, OME_SET, and s.
OME_FAST_CALL int OMEobjectInstance::sendMessage | ( | const OMEstring & | methodName, |
const OMEarray & | argv, | ||
OMEoid & | destObj | ||
) |
|
private |
References _STD, allowedMethods, OMEthread::callStack, OMEcallStack::invocationLevel, OMEallowEntry::invocationLevel, OMEallowEntry::methodName, OMEallowEntry::permanent, and OMEcallStack::thisMethod.
Referenced by invokeMethod(), and unblockQueuedThread().
|
private |
References _STD, and queuedThreads.
Referenced by dropActiveThreadReference().
|
private |
References _STD, queuedThreads, and threadAllowed().
Referenced by allowMethod().
|
private |
Referenced by allowMethod(), dropActiveThreadReference(), and invokeMethod().
|
private |
Referenced by allowMethod(), listAllowedMethods(), and threadAllowed().
|
private |
Referenced by getInstanceDataAtLevel(), and noteThreadTerminated().
|
private |
Referenced by allowMethod(), unblockNextThread(), and unblockQueuedThread().
|
private |
Referenced by invokeMethod(), and noteThreadTerminated().
![]() | Generated: Fri Jul 31 2020 18:19:16
Support Information |