FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEobjectInstance Class Referencefinal

Subclass of OMEobject that provides access to a local object. More...

#include <OMEobject.h>

+ Inheritance diagram for OMEobjectInstance:

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 OMEinvocationDatafindRoutine (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 OMEthreadinvokeMethod (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...
 
- Public Member Functions inherited from OMEobject
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 OMEoidgetDefaultOID ()
 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 OMEthreadinvokeMethodAndWaitForReply (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...
 
- Public Member Functions inherited from OMEreferenceCount
 OMEreferenceCount ()
 
virtual ~OMEreferenceCount ()
 
void addReadOnlyReference ()
 
int_fast32_t dropReference ()
 
virtual OMEreferenceCountdeepCopy () const
 
OMEreferenceCountgetUniqueReference ()
 
int_fast32_t totalReferences () const OME_ALWAYS_INLINE
 

Static Public Member Functions

static int Object_delete (OMEthread *)
 
static void defineOMEobjectClass ()
 
static OME_FAST_CALL OMEoidcreateObject (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 OMEoidcreateObjectOfClass (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 OMEoidcreateObjectOfClass (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 OMEoidimportObject (const OMEstring &data, bool duplicate, OMEtype *errInfo=nullptr)
 Import an object from its encoded image. More...
 

Protected Member Functions

 OMEobjectInstance (OMEclass *classData)
 
 ~OMEobjectInstance ()
 
- Protected Member Functions inherited from OMEobject
 OMEobject (OMEclass *classData)
 
virtual ~OMEobject ()
 
- Protected Member Functions inherited from OMEreferenceCount
void lockMe ()
 
void unlockMe ()
 

Private Member Functions

OME_FAST_CALL bool threadAllowed (OMEthread *thread, const OMEallowEntry *entry=0)
 
OMEthreadunblockNextThread ()
 
OME_FAST_CALL OMEthreadunblockQueuedThread (const OMEallowEntry *entry=nullptr)
 

Private Attributes

void ** instanceData
 
_STD deque< OMEallowEntryPallowedMethods
 
_STD deque< OMEthreadPqueuedThreads
 
uint32_t activeThreadCount
 
uint32_t totalThreadCount
 

Additional Inherited Members

- Public Attributes inherited from OMEobject
const OMEclassclassInfo
 Pointer to class description. More...
 
OMEoidmetaObject
 Pointer to meta-object. More...
 
- Protected Attributes inherited from OMEobject
uint32_t totalInvocations
 
uint32_t instanceID
 
OMEentityIDentityID
 
OMEoidStorageInternaloidReferences
 
- Protected Attributes inherited from OMEreferenceCount
int32_t references
 
int32_t mutexID
 

Detailed Description

Subclass of OMEobject that provides access to a local object.

Fundamental base class for all objects hosted by a FARGOS/VISTA Object Management Environment.

Constructor & Destructor Documentation

◆ OMEobjectInstance()

OMEobjectInstance::OMEobjectInstance ( OMEclass classData)
protected

Referenced by createObject(), and importObject().

◆ ~OMEobjectInstance()

OMEobjectInstance::~OMEobjectInstance ( )
protected

Member Function Documentation

◆ allowMethod() [1/3]

void OMEobjectInstance::allowMethod ( const OMEstring methodName,
const int  level = -1,
const bool  always = false 
)

◆ allowMethod() [2/3]

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.

◆ allowMethod() [3/3]

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().

◆ createObject()

OMEoid * OMEobjectInstance::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 
)
static

Create an object within the local FARGOS/VISTA Object Managment Environment.

Note
This is the low-level interface and is not normally used by programmers. The ability to specify the OMEclass record can prevent redundant searches for the class implementation.

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().

◆ createObjectOfClass() [1/2]

OMEoid * OMEobjectInstance::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 
)
static

◆ createObjectOfClass() [2/2]

OMEoid * OMEobjectInstance::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 
)
static

Create an object, potentially searching through the OMEnameSpaceGroup list for most current version of the class implementation.

Note
This is the interface most commonly-used by C++ programmers.

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().

◆ defineOMEobjectClass()

void OMEobjectInstance::defineOMEobjectClass ( )
static

◆ deleteThisObject()

void OMEobjectInstance::deleteThisObject ( const OMEoid objRefData,
const OMEthread fromThread 
)

Request deletion of an object.

References OMEobject::classInfo, OMEclass::inheritListTotal(), and invokeMethod().

◆ dropActiveThreadReference()

◆ findRoutine()

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 
)

◆ getInstanceDataAtLevel()

OMEobjectInstance::getInstanceDataAtLevel ( uint_fast16_t  lvl) const
inline

Return pointer to instance variables.

References instanceData.

Referenced by OMEthread::getInstanceData(), and importObject().

◆ importObject()

◆ invokeMethod()

◆ listAllowedMethods()

uint_fast16_t OMEobjectInstance::listAllowedMethods ( OMEarray result) const

◆ noteThreadTerminated()

◆ Object_delete()

int OMEobjectInstance::Object_delete ( OMEthread thread)
static

◆ sendMessage()

OME_FAST_CALL int OMEobjectInstance::sendMessage ( const OMEstring methodName,
const OMEarray argv,
OMEoid destObj 
)

◆ threadAllowed()

◆ unblockNextThread()

OMEthread * OMEobjectInstance::unblockNextThread ( )
private

References _STD, and queuedThreads.

Referenced by dropActiveThreadReference().

◆ unblockQueuedThread()

OMEthread * OMEobjectInstance::unblockQueuedThread ( const OMEallowEntry entry = nullptr)
private

References _STD, queuedThreads, and threadAllowed().

Referenced by allowMethod().

Member Data Documentation

◆ activeThreadCount

uint32_t OMEobjectInstance::activeThreadCount
private

◆ allowedMethods

_STD deque<OMEallowEntryP> OMEobjectInstance::allowedMethods
private

◆ instanceData

void** OMEobjectInstance::instanceData
private

◆ queuedThreads

_STD deque<OMEthreadP> OMEobjectInstance::queuedThreads
private

◆ totalThreadCount

uint32_t OMEobjectInstance::totalThreadCount
private

The documentation for this class was generated from the following files:
Generated: Tue Jul 28 2020 16:03:27
Support Information