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

Public interface to an OME thread. More...

#include <OMEthread.h>

+ Inheritance diagram for OMEthread:

Public Member Functions

virtual bool isThread () const override
 Returns a Boolean indicating if the object is representing a thread. More...
 
bool inCalledMethod () const OME_PURE_FUNCTION
 
void clearResultPending () OME_ALWAYS_INLINE
 
void setResultPending () OME_ALWAYS_INLINE
 
bool replyStillPending () const OME_ALWAYS_INLINE
 
void setTickInterval (class OMEtickInterval *interval) OME_ALWAYS_INLINE
 
void noteThreadState (const OMEthreadStates s) OME_ALWAYS_INLINE
 
OMEthreadStates getThreadState () const OME_ALWAYS_INLINE
 
void noteThreadPriority (int p) OME_ALWAYS_INLINE
 
int getThreadPriority () const OME_ALWAYS_INLINE
 
const OMEtypegetReplyOID ()
 
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, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, const int inheritanceLevel=-1, const int mustBeAtLevel=-1) override
 Invoke method against an object. More...
 
OME_FAST_CALL void callRoutine (const OMEinvocationData *routine, const int level, const OMEstring &methodName, const int srcArgc, const OMEarray &srcArgv)
 
void exitRoutine ()
 
const OMEtypegetUserID () const OME_ALWAYS_INLINE
 
const OMEstringgetUserName () const
 
OME_FAST_CALL int setUserID (const OMEstring &userID, const OMEstring &pwInfo)
 
const OMEtypegetThisObject () const OME_ALWAYS_INLINE
 
const OMEoidgetThisOID () const OME_ALWAYS_INLINE
 
void dropThisObjectReference () OME_ALWAYS_INLINE
 
bool validReferenceToObject () OME_ALWAYS_INLINE
 
OME_FAST_CALL void * getInstanceData () const
 
OME_FAST_CALL void setPC (uint32_t pc) OME_ALWAYS_INLINE
 
uint32_t getPC () const OME_ALWAYS_INLINE
 
void setErrorCode (OMEtype &rc) OME_ALWAYS_INLINE
 
OMEtypegetErrorCode () OME_ALWAYS_INLINE
 
const OMEtypegetReplyResult () const OME_ALWAYS_INLINE
 
OME_FAST_CALL int returnReply (const OMEtype &result)
 
OME_FAST_CALL int returnReply (const uint32_t result)
 
OME_FAST_CALL int returnReply (const int32_t result)
 
OME_FAST_CALL int returnReply (const float result)
 
OME_FAST_CALL int returnReply (const OMEoid &result)
 
OME_FAST_CALL void threadNowTerminated (uint32_t exitStatus, bool dontDelete=false)
 
void noteObjectModified () OME_ALWAYS_INLINE
 
void noteLineNumber (int line, const char *fileName=nullptr) OME_ALWAYS_INLINE
 
void setAsPreemptable ()
 
OMEthreadreleaseThread ()
 
void suspendThread ()
 
void terminateThread ()
 
void yieldSlice ()
 
void executeSlice ()
 
uint32_t getMethodType () const OME_ALWAYS_INLINE
 
OME_FAST_CALL int sendMessage (const OMEstring &methodName, const uint32_t hashIndx, const uint32_t argc, const OMEarray &argv, const OMEtype &destObj, const OMEtype *fromObj=nullptr) const
 
OME_FAST_CALL int sendMessage (const OMEtype &methodName, const uint32_t hashIndx, const OMEtype &argv, const OMEtype &destObj, const OMEtype &fromObj, const OMEtype &timeout)
 
OME_FAST_CALL int sendMessageWithSetArgument (const OMEtype &methodName, const uint32_t hashIndx, const OMEtype &argSet, const OMEtype &destObj, const OMEtype &fromObj, const int32_t timeout)
 
OME_FAST_CALL int sendMessageAndWait (const OMEstring &methodName, const uint32_t hashIndx, const uint32_t argc, const OMEarray &argv, const OMEtype &destObj)
 
OME_FAST_CALL int callMethodWithSetArgument (const OMEtype &methodName, const uint32_t hashIndx, const OMEtype &argSet)
 
OME_FAST_CALL int generateException (uint_fast32_t argc, const OMEarray &argv) const
 
OME_FAST_CALL int generateException (const char *exceptionType) const
 
OME_FAST_CALL int generateException (const char *exceptionType, const OMEstring &methName) const
 
void outputOnStream (std::ostream &o=std::cout) const
 
- Public Member Functions inherited from OMEobject
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 void defineOMEthreadClass ()
 

Public Attributes

OMEcallStackcallStack
 
OMEthreadStates threadState
 
int threadPriority
 
OMEtype threadContext
 
OMEtype fromObject
 
OMEtype replyResult
 
OMEthreadfromThreadInstance
 
OMEtype threadErrorCode
 
int sourceLineNumber
 
const char * sourceFileName
 
class OMEtickIntervaltickInterval
 
- Public Attributes inherited from OMEobject
const OMEclassclassInfo
 Pointer to class description. More...
 
OMEoidmetaObject
 Pointer to meta-object. More...
 

Private Member Functions

 OMEthread (const OMEinvocationData *routine, const int level, const OMEoid &obj, const OMEstring &methodName, const uint32_t srcArgc, const OMEarray &srcArgv, const OMEtype *fromObj=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notifyObj=nullptr)
 
 OMEthread (const OMEstring &user, const OMEstring &pw)
 
virtual ~OMEthread ()
 
void createReplyOID ()
 
OME_FAST_CALL void setReplyResult (const OMEtype &arg, bool sameThread=false)
 

Private Attributes

OMEtypereplyOID
 
OMEthreadControllerthreadController
 
OMEoidnotifyWhenDead
 
OMEtype userInfo
 
bool modifiedObject
 
bool preemptable
 
bool resultPending
 

Friends

class OMEobjectInstance
 
class OMEthreadExecQueue
 

Additional Inherited Members

- Protected Member Functions inherited from OMEobject
 OMEobject (OMEclass *classData)
 
virtual ~OMEobject ()
 
- Protected Member Functions inherited from OMEreferenceCount
void lockMe ()
 
void unlockMe ()
 
- 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

Public interface to an OME thread.

Logical thread within FARGOS/VISTA Object Management Environment.

Constructor & Destructor Documentation

◆ OMEthread() [1/2]

OMEthread::OMEthread ( const OMEinvocationData routine,
const int  level,
const OMEoid obj,
const OMEstring methodName,
const uint32_t  srcArgc,
const OMEarray srcArgv,
const OMEtype fromObj = nullptr,
const OMEthread fromThread = nullptr,
const OMEoid notifyObj = nullptr 
)
private

◆ OMEthread() [2/2]

OMEthread::OMEthread ( const OMEstring user,
const OMEstring pw 
)
private

◆ ~OMEthread()

OMEthread::~OMEthread ( )
privatevirtual

Member Function Documentation

◆ callMethodWithSetArgument()

◆ callRoutine()

void OMEthread::callRoutine ( const OMEinvocationData routine,
const int  level,
const OMEstring methodName,
const int  srcArgc,
const OMEarray srcArgv 
)

◆ clearResultPending()

void OMEthread::clearResultPending ( )
inline

References resultPending.

◆ createReplyOID()

void OMEthread::createReplyOID ( )
private

◆ defineOMEthreadClass()

void OMEthread::defineOMEthreadClass ( )
static

◆ dropThisObjectReference()

void OMEthread::dropThisObjectReference ( )
inline

◆ executeSlice()

void OMEthread::executeSlice ( )

◆ exitRoutine()

void OMEthread::exitRoutine ( )

◆ generateException() [1/3]

int OMEthread::generateException ( const char *  exceptionType) const

References generateException().

◆ generateException() [2/3]

int OMEthread::generateException ( const char *  exceptionType,
const OMEstring methName 
) const

References generateException().

◆ generateException() [3/3]

◆ getErrorCode()

OMEtype& OMEthread::getErrorCode ( )
inline

References threadErrorCode.

◆ getInstanceData()

◆ getMethodType()

uint32_t OMEthread::getMethodType ( ) const
inline

◆ getPC()

uint32_t OMEthread::getPC ( ) const
inline

◆ getReplyOID()

const OMEtype& OMEthread::getReplyOID ( )
inline

◆ getReplyResult()

const OMEtype& OMEthread::getReplyResult ( ) const
inline

References replyResult.

◆ getThisObject()

const OMEtype& OMEthread::getThisObject ( ) const
inline

◆ getThisOID()

◆ getThreadPriority()

int OMEthread::getThreadPriority ( ) const
inline

◆ getThreadState()

◆ getUserID()

const OMEtype& OMEthread::getUserID ( ) const
inline

References userInfo.

Referenced by getUserName(), and OMEobjectInstance::invokeMethod().

◆ getUserName()

◆ inCalledMethod()

bool OMEthread::inCalledMethod ( ) const

◆ invokeMethod()

OMEthread * 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,
const OMEtype fromObject = nullptr,
const OMEthread fromThread = nullptr,
const OMEoid notify = nullptr,
const int  inheritanceLevel = -1,
const int  mustBeAtLevel = -1 
)
overridevirtual

◆ isThread()

virtual bool OMEthread::isThread ( ) const
inlineoverridevirtual

Returns a Boolean indicating if the object is representing a thread.

Indicates if entity is an object or thread.

Return values
0indicates an object.
1indicates a thread.

Reimplemented from OMEobject.

◆ noteLineNumber()

void OMEthread::noteLineNumber ( int  line,
const char *  fileName = nullptr 
)
inline

◆ noteObjectModified()

void OMEthread::noteObjectModified ( )
inline

References modifiedObject.

Referenced by OMEoil2Interpreter().

◆ noteThreadPriority()

void OMEthread::noteThreadPriority ( int  p)
inline

References threadPriority.

◆ noteThreadState()

void OMEthread::noteThreadState ( const OMEthreadStates  s)
inline

◆ outputOnStream()

◆ releaseThread()

◆ replyStillPending()

bool OMEthread::replyStillPending ( ) const
inline

References resultPending.

◆ returnReply() [1/5]

int OMEthread::returnReply ( const float  result)

References returnReply().

◆ returnReply() [2/5]

int OMEthread::returnReply ( const int32_t  result)

References returnReply().

◆ returnReply() [3/5]

int OMEthread::returnReply ( const OMEoid result)

References returnReply().

◆ returnReply() [4/5]

◆ returnReply() [5/5]

int OMEthread::returnReply ( const uint32_t  result)

References returnReply().

◆ sendMessage() [1/2]

int OMEthread::sendMessage ( const OMEstring methodName,
const uint32_t  hashIndx,
const uint32_t  argc,
const OMEarray argv,
const OMEtype destObj,
const OMEtype fromObj = nullptr 
) const

◆ sendMessage() [2/2]

int OMEthread::sendMessage ( const OMEtype methodName,
const uint32_t  hashIndx,
const OMEtype argv,
const OMEtype destObj,
const OMEtype fromObj,
const OMEtype timeout 
)

◆ sendMessageAndWait()

int OMEthread::sendMessageAndWait ( const OMEstring methodName,
const uint32_t  hashIndx,
const uint32_t  argc,
const OMEarray argv,
const OMEtype destObj 
)

◆ sendMessageWithSetArgument()

int OMEthread::sendMessageWithSetArgument ( const OMEtype methodName,
const uint32_t  hashIndx,
const OMEtype argSet,
const OMEtype destObj,
const OMEtype fromObj,
const int32_t  timeout 
)

◆ setAsPreemptable()

◆ setErrorCode()

void OMEthread::setErrorCode ( OMEtype rc)
inline

References threadErrorCode.

◆ setPC()

OME_FAST_CALL void OMEthread::setPC ( uint32_t  pc)
inline

◆ setReplyResult()

void OMEthread::setReplyResult ( const OMEtype arg,
bool  sameThread = false 
)
private

◆ setResultPending()

void OMEthread::setResultPending ( )
inline

References resultPending.

◆ setTickInterval()

void OMEthread::setTickInterval ( class OMEtickInterval interval)
inline

◆ setUserID()

int OMEthread::setUserID ( const OMEstring userID,
const OMEstring pwInfo 
)

References OMEstring::length(), and userInfo.

Referenced by becomePseudoUser(), and becomeUser().

◆ suspendThread()

◆ terminateThread()

◆ threadNowTerminated()

void OMEthread::threadNowTerminated ( uint32_t  exitStatus,
bool  dontDelete = false 
)

◆ validReferenceToObject()

bool OMEthread::validReferenceToObject ( )
inline

◆ yieldSlice()

void OMEthread::yieldSlice ( )

Friends And Related Function Documentation

◆ OMEobjectInstance

friend class OMEobjectInstance
friend

◆ OMEthreadExecQueue

friend class OMEthreadExecQueue
friend

Member Data Documentation

◆ callStack

◆ fromObject

OMEtype OMEthread::fromObject

Referenced by outputOnStream(), and returnReply().

◆ fromThreadInstance

OMEthread* OMEthread::fromThreadInstance

Referenced by returnReply().

◆ modifiedObject

bool OMEthread::modifiedObject
private

Referenced by noteObjectModified().

◆ notifyWhenDead

OMEoid* OMEthread::notifyWhenDead
private

Referenced by threadNowTerminated().

◆ preemptable

bool OMEthread::preemptable
private

Referenced by setAsPreemptable().

◆ replyOID

OMEtype* OMEthread::replyOID
private

Referenced by createReplyOID(), and getReplyOID().

◆ replyResult

OMEtype OMEthread::replyResult

Referenced by getReplyResult(), and setReplyResult().

◆ resultPending

bool OMEthread::resultPending
private

◆ sourceFileName

◆ sourceLineNumber

◆ threadContext

OMEtype OMEthread::threadContext

◆ threadController

◆ threadErrorCode

◆ threadPriority

int OMEthread::threadPriority

◆ threadState

◆ tickInterval

◆ userInfo

OMEtype OMEthread::userInfo
private

Referenced by getUserID(), and setUserID().


The documentation for this class was generated from the following files:
Generated: Fri Jul 31 2020 18:19:16
Support Information