Go to the documentation of this file.
2 #define _OME_OBJECT_H "$Id: OMEobject.h 452 2020-07-23 20:19:23Z geoff $"
50 virtual bool isThread()
const {
return (
false); }
68 const uint32_t hashIndx,
const OMEoid &objRefData,
69 const uint32_t argc,
const OMEarray &argv,
const uint32_t signature,
70 const OMEtype *fromObject =
nullptr,
72 const OMEoid *notify =
nullptr,
73 const int inheritanceLevel = -1,
const int mustBeAtLevel = -1) = 0;
79 const uint32_t hashIndx,
const OMEoid &objRefData,
80 const uint32_t argc,
const OMEarray &argv,
const uint32_t signature,
82 const int inheritanceLevel = -1);
87 atomicIncrement_uint64(&
totalTicks, tickCount);
121 const bool always =
false) :
methodName(methodNm) {
164 const OMEtype *fromObject =
nullptr,
172 const uint32_t verID = 0,
const OMEstring *nmSpace =
nullptr,
179 const uint32_t verID = 0,
const OMEstring *nmSpace =
nullptr);
192 const OMEstring &methodName,
const uint32_t hashIndx,
193 const uint32_t argc,
const OMEarray &argv,
194 const uint32_t signature = 0,
const int inheritanceLevel = -1,
195 const int mustBeAtLevel = -1);
198 const uint32_t hashIndx,
const OMEoid &objRefData,
199 const uint32_t argc,
const OMEarray &argv,
200 const uint32_t signature = 0,
201 const OMEtype *fromObject =
nullptr,
203 const OMEoid *notify =
nullptr,
const int inheritanceLevel = -1,
204 const int mustBeAtLevel = -1)
override;
210 uint32_t exitStatus,
bool wasPreemptable);
217 const OMEstring &className,
const bool always =
false);
220 const OMEstring &className,
const bool always =
false);
223 const bool always =
false);
OMEoid * defaultOID
Definition: OMEobject.h:28
OMEtype thisMethod
Definition: OMEthread.h:36
OMEstring * condenseIntoString(bool includeVersionID)
Serialize all OMEencodeBufferElement items into a single string.
Definition: OMEencode.cpp:75
Ïúíþ ð Ø ˜ ˜ __text __TEXT € __apple_names __DWARF __apple_objc __DWARF __apple_namespac__DWARF H X __apple_types __DWARF l
Definition: tmp3.o.cpp:1
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
Definition: OMEthread.cpp:470
#define OMEdebugThreadDelete
Definition: OMEdebugInfo.h:21
int OMEterminateThreadsOnObject(const OMEobject *obj)
Definition: OMEexecQueue.cpp:591
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.
Definition: OMEobject.cpp:610
#define OME_DELETE_OBJECT(ptr)
Definition: OMEmanifests.h:159
#define OME_ERROR_DUPLICATE_OBJECT
Definition: OMEerror.h:20
uint_fast16_t inheritListTotal() const
Definition: OMEclass.h:111
const OMEassoc & getObjectACL() const
Definition: OMEoid.h:285
OMEclass * OMEdefineNewClass(const OMEstring &nmSpaceArg, const OMEstring &classNameArg, const uint32_t verID, const uint32_t iSize, const bool unique, int *errCode, const CreateInstanceFP csRoutine, const DeleteInstanceFP dsRoutine)
Create new class entry.
Definition: OMEnamespace.cpp:198
const char s[]
Definition: t.cpp:4
@ OME_CRITICAL_SECTION_OID_REFERENCE
Definition: OMEmutex.h:42
SMV_StandaloneNumeric< uint32_t > OMEdebugFlag("debugFlag")
NativeMethodFP function
Definition: OMEmethod.h:49
void setProxyObject(const OMEoid &proxy, const OMEstring &method)
Set object Id of meta/proxy object.
Definition: OMEoid.h:275
int invocationLevel
Definition: OMEthread.h:35
uint32_t totalThreadCount
Definition: OMEobject.h:144
OME_FAST_CALL int listMethodInfo(OMEassoc &result) const
Definition: OMEclass.cpp:333
void OMEstartCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:217
OME_FAST_CALL int returnReply(const OMEtype &result)
Definition: OMEthread.cpp:730
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.
Definition: OMEobject.cpp:542
uint32_t activeThreadCount
Definition: OMEobject.h:143
const OMEtype & getThisObject() const OME_ALWAYS_INLINE
Definition: OMEthread.h:152
#define OME_INVOKE_TRIVIAL_NATIVE
Definition: OMEmethod.h:14
OMEthreadStates getThreadState() const OME_ALWAYS_INLINE
Definition: OMEthread.h:119
@ OME_THREAD_TERMINATED
thread is terminated
Definition: OMEthread.h:23
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
const OMEoid & getThisOID() const OME_ALWAYS_INLINE
Definition: OMEthread.h:154
_STD deque< OMEthreadP > queuedThreads
Definition: OMEobject.h:142
Implements text and binary string storage.
Definition: OMEstring.h:305
OME type encoding routines.
OME_FAST_CALL OMEinvocationData * findMethodImplementation(const uint32_t signature, const OMEstring &methodName, const uint32_t indx=0) const
Definition: OMEclass.cpp:321
Buffer into which OMEtype data is encoded.
Definition: OMEencode.h:54
int setStorageDescription(const struct OMEinstanceVarDescr *desc)
Definition: OMEclass.cpp:224
bool OMEcheckACL(const OMEassoc &acl, const OMEstring &methodName, const OMEthread *threadData)
Definition: OMEobjACL.cpp:173
bool indexExists(const uint32_t i) const
Definition: OMEarray.h:202
@ OME_CRITICAL_SECTION_METHOD_INVOKE
Definition: OMEmutex.h:40
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
OME_DLL_EXPORT uint32_t OMEhash(const unsigned char *data, const uint32_t len) NONNULL_PARAMETERS(1)
Fast 32-bit hash over a buffer.
Definition: OMEhash.cpp:13
Base class and abstract interface for an object within a FARGOS/VISTA Object Management Environment.
Definition: OMEobject.h:22
static int Object_delete(OMEthread *)
Definition: OMEobject.cpp:215
const char * className
Definition: OMEnamespace.h:88
void * createInstanceData()
Allocate and initialize storage for instance variables.
Definition: OMEclass.cpp:113
const OMEstring & OMEshareConstant(const OMEstring &stringConstant)
Definition: OMEnamespace.cpp:338
class OMEoid * oid
Definition: OMEbaseType.h:297
const typedef void * OMEstringInROM
Points to immovable, read-only string data.
Definition: OMEstring.h:68
OMEstring methodName
Definition: OMEobject.h:116
#define OMEdebugMethodInvocations
Definition: OMEdebugInfo.h:18
OME_FAST_CALL int importInstanceData(void *iData, const OMEtype &data) const
Definition: OMEclass.cpp:691
class OMEstring * s
Definition: OMEbaseType.h:299
OME_FAST_CALL void addOIDref(OMEoidStorageInternal *ref)
Definition: OMEobject.cpp:123
uint32_t classVersionID
Definition: OMEoid.h:29
OMEtype argv
Definition: OMEthread.h:38
STREAMTYPE & outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent=0, uint8_t includeTypePrefix=OME_DEFAULT_COMPLEX_OUTPUT_MODE) const
Output an OMEarray to an output stream.
Definition: OMEarray.h:275
int32_t i
Definition: OMEbaseType.h:285
OMEoidStorageInternal * oidReferences
Definition: OMEobject.h:35
Meta data record to describe an instance variable of a class.
Definition: OMEnamespace.h:76
OMEthread * releaseThread()
Definition: OMEthread.cpp:1126
uint32_t instanceID
Definition: OMEobject.h:33
OME_FAST_CALL int sendMessage(const OMEstring &methodName, const OMEarray &argv, OMEoid &destObj)
OME_FAST_CALL void addTickCount(const int64_t tickCount) const OME_ALWAYS_INLINE
Add tick counts to per-object statistics.
Definition: OMEobject.h:86
void outputOnStream(std::ostream &o=std::cout) const
Definition: OMEthread.cpp:1172
const char * sourceFileName
Definition: OMEthread.h:84
FARGOS/VISTA Object Management Environment class description.
Definition: OMEclass.h:24
void deleteInstanceData(void *iData)
Delete instance variable storage.
Definition: OMEclass.cpp:128
void suspendThread()
Definition: OMEthread.cpp:1086
OME_FAST_CALL void noteThreadTerminated(class OMEthread *, bool modified, uint32_t exitStatus, bool wasPreemptable)
Definition: OMEobject.cpp:763
Define method implementation.
Definition: OMEnamespace.h:86
const char * nameSpace
Definition: OMEnamespace.h:87
int resolveLinkages(OMEstring *missingClassName=nullptr, uint32_t *missingClassVersionID=nullptr)
Attempt to resolve inheritance tree.
Definition: OMEclass.cpp:428
Base class for reference-counted data.
Definition: OMErefCount.h:31
const OMEoid & getDefaultOID()
Returns read-only reference to object's default object Id.
Definition: OMEobject.cpp:113
OMEclass * OMEfindClassDescription(const OMEstring &className, const uint32_t verID, const OMEstring *nmSpace)
Definition: OMEnamespace.cpp:165
OMEtype argc
Definition: OMEthread.h:37
const OMEarray emptyArray
Definition: OMEobject.cpp:30
uint32_t signature
Definition: OMEnamespace.h:91
Identifies an instance of an OME process.
Definition: OMEprocInfo.h:19
#define OME_ERROR_NO_SUCH_METHOD
Definition: OMEerror.h:17
uint32_t hashIndex
OMEhash(className)
Definition: OMEclass.h:57
OME_FAST_CALL void setMetaObject(const OMEoid *obj)
Attach an meta object to the object.
Definition: OMEobject.h:59
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.
Definition: OMEobject.cpp:833
#define WITH_DATE_TIME_LEVEL
log as $date_time $log_level $msg
Definition: logging_api.hpp:2877
void * data
Definition: OMEnamespace.h:97
const char srcID[]
Definition: catSym.c:17
@ OME_STRING
Definition: OMEmanifests.h:85
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.
Definition: OMEobject.cpp:156
#define OMEdebugLogLevel3
Definition: OMEdebugInfo.h:35
_STD deque< OMEallowEntryP > allowedMethods
Definition: OMEobject.h:141
OME_FAST_CALL OMEtype * extractInstanceData(const void *iData, bool annotate) const
Definition: OMEclass.cpp:617
~OMEallowEntry()
Definition: OMEobject.h:127
OME_FAST_CALL int generateException(uint_fast32_t argc, const OMEarray &argv) const
Definition: OMEthread.cpp:1197
OME_DLL_EXPORT void INIT_DECLARE_OMEobject()
Definition: OMEobject.cpp:1355
Implements an ordered list of OMEtype elements.
Definition: OMEset.h:64
OMEthread * unblockNextThread()
Definition: OMEobject.cpp:925
int sourceLineNumber
Definition: OMEthread.h:83
int64_t OMEmillisecondsSinceBoot()
Obtain the number of milliseconds since boot of local FARGOS/VISTA Object Management Environment proc...
Definition: OMEprocInfo.cpp:93
#define OMEdebugIncludeArguments
Definition: OMEdebugInfo.h:22
void dropActiveThreadReference()
Definition: OMEobject.cpp:793
int invocationLevel
Definition: OMEobject.h:117
~OMEobjectInstance()
Definition: OMEobject.cpp:515
static int convertExternalReferences(const OMEoidID *id, class OMEobject *o)
Definition: OMEoidIntStub.cpp:108
#define OME_EXPECT_TRUE(expr)
Annotation macro for conditional expression expected to be true.
Definition: compiler_hints.h:541
void ** instanceData
Definition: OMEobject.h:140
const OMEtype & getReplyOID()
Definition: OMEthread.h:125
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.
Definition: OMEclass.cpp:501
@ OME_OID
Definition: OMEmanifests.h:84
#define OMEdebugAlways
Definition: OMEdebugInfo.h:39
OME_FAST_CALL void getOIDdata(OMEoidID *idInfo) const
Definition: OMEobject.cpp:105
#define EMIT_CONDITIONAL_MESSAGE(lvl)
Create LogMessageRecord context for content that will be emitted to the default log manager only if e...
Definition: logging_api.hpp:2816
int OMEdefineNewMethod(const OMEmethodDefinition &definitionRecord)
Definition: OMEnamespace.cpp:248
const OMEclass * classInfo
Pointer to class description.
Definition: OMEobject.h:37
uint32_t totalSlices
Definition: OMEobject.h:30
OMEcallStack * callStack
Definition: OMEthread.h:74
const OMEstring & getNameSpaceName() const
Definition: OMEclass.cpp:249
static OME_FAST_CALL OMEoid * importObject(const OMEstring &data, bool duplicate, OMEtype *errInfo=nullptr)
Import an object from its encoded image.
Definition: OMEobject.cpp:1010
OMEoid * metaObject
Pointer to meta-object.
Definition: OMEobject.h:38
Interface to an internal OME object.
Definition: OMEoid.h:324
OMEallowEntry * OMEallowEntryP
Definition: OMEobject.h:130
OME fundamental type implementation.
#define NOTE_DEFAULT_NLM(s)
Declare the default message within a DEFINE_NLM_MESSAGE() block.
Definition: OMEdebugInfo.h:314
void getObjectOID(OMEoidID *result) const
Definition: OMEoid.h:290
const OMEarray & getVariableDescriptions() const
Definition: OMEclass.cpp:238
OME_FAST_CALL OMEclass * getClassAtLevel(uint_fast16_t level) const
Definition: OMEclass.cpp:184
uint32_t ui
Definition: OMEbaseType.h:286
virtual bool isThread() const
Returns a Boolean indicating if the object is representing a thread.
Definition: OMEobject.h:50
OME_FAST_CALL uint_fast16_t listAllowedMethods(OMEarray &result) const
Definition: OMEobject.cpp:937
#define DEFINE_NLM_MESSAGE(Lvl, MessID, AppName)
Define an Native Language Message.
Definition: OMEdebugInfo.h:318
OMEthisProcessInfo OMEcurrentProcessInfo
Automatic instantiation of OMEthisProcessInfo. When properly linked, the C++ static constructor mecha...
Definition: OMEprocInfo.cpp:217
const char srcID[] OME_USED
Definition: tick_time.cpp:24
uint32_t classHashIndex
Definition: OMEoid.h:30
bool resolved() const
Definition: OMEclass.h:107
Subclass of OMEobject that provides access to a local object.
Definition: OMEobject.h:135
OME_FAST_CALL int64_t getTickCount() const OME_ALWAYS_INLINE
Return number of elapsed time in ticks spent executing object's methods.
Definition: OMEobject.h:94
virtual ~OMEobject()
Definition: OMEobject.cpp:69
OME_FAST_CALL bool threadAllowed(OMEthread *thread, const OMEallowEntry *entry=0)
Definition: OMEobject.cpp:957
uint_fast32_t elementCount() const OME_ALWAYS_INLINE
Definition: OMEarray.h:247
uint32_t versionID
Definition: OMEclass.h:56
OMEstring className
Definition: OMEclass.h:55
OMEentityID birthplace
Definition: OMEoid.h:31
int OILsetExternalMetaObject(OMEthread *thread, OMEtype &result, const OMEtype &meta, const OMEtype &method, const OMEtype &target)
Definition: OMEobject.cpp:1336
@ OME_SET
Definition: OMEmanifests.h:89
#define NEXT_NLM_PARAM
Define value for next positional parameter.
Definition: OMEdebugInfo.h:337
OME_FAST_CALL uint32_t getSliceCount() const OME_ALWAYS_INLINE
Return number of time slices allocated to object's methods.
Definition: OMEobject.h:99
OMEentityID id
Definition: OMEprocInfo.h:68
OME_FAST_CALL void deleteThisObject(const OMEoid &objRefData, const OMEthread *fromThread)
Request deletion of an object.
Definition: OMEobject.cpp:1321
void OMEendCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:236
OME_FAST_CALL void removeOIDref(OMEoidStorageInternal *ref)
Definition: OMEobject.cpp:131
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
#define OME_ALWAYS_INLINE
Tell the compiler to alway inline a function, regardless of optimization level.
Definition: compiler_hints.h:364
Record to describe the implementation of the method of an OME class.
Definition: OMEmethod.h:35
const char * methodName
Definition: OMEnamespace.h:90
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 o...
Definition: OMEobject.cpp:1250
uint_fast32_t getNextInstanceID()
Definition: OMEclass.h:118
#define OME_FAST_CALL
Definition: compiler_hints.h:468
static void defineOMEobjectClass()
Definition: OMEobject.cpp:481
OME_DLL_EXPORT uint32_t OMEmethodSignature(const int argc, const uint32_t types[], uint32_t *anyMask=nullptr)
Compute 32-bit signature of a method's arguments.
Definition: OMEsignature.cpp:15
void noteReferencedObjectDeleted(OMEoidID *entity)
Definition: OMEoidInt.cpp:50
#define _STD
Definition: OMEmanifests.h:146
OMEallowEntry(const OMEstring &methodNm, const int level, const bool always=false)
Definition: OMEobject.h:120
OME debug and profiling interfaces.
bool isExternal() const OME_ALWAYS_INLINE
Definition: OMEoid.h:300
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.
Definition: OMEobject.cpp:1170
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, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, const int inheritanceLevel=-1, const int mustBeAtLevel=-1)=0
Invoke method against an object.
#define OME_DLL_EXPORT
Definition: compiler_hints.h:464
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
int_fast32_t dropReference()
Definition: OMErefCount.cpp:144
Public interface to an OME thread.
Definition: OMEthread.h:60
#define LOG_ENDLINE
Closing clause for text line output using << operators.
Definition: logging_api.hpp:2956
Public interface to an OME Object Identifier.
Definition: OMEoid.h:196
@ OME_ANY
Definition: OMEmanifests.h:93
Record to track methods that can be invoked upon an object.
Definition: OMEobject.h:113
void dropThisObjectReference() OME_ALWAYS_INLINE
Definition: OMEthread.h:159
OME_FAST_CALL void * getInstanceData() const
Definition: OMEthread.cpp:1036
uint32_t type
Definition: OMEbaseType.h:304
OME_FAST_CALL OMEthread * unblockQueuedThread(const OMEallowEntry *entry=nullptr)
Definition: OMEobject.cpp:906
#define OME_ERROR_NOT_AUTHORIZED
Definition: OMEerror.h:18
#define OMEdebugLogLevel2
Definition: OMEdebugInfo.h:34
OMEobjectInstance(OMEclass *classData)
Definition: OMEobject.cpp:498
uint32_t instanceIndex
Definition: OMEoid.h:28
#define OME_CORE_CALL
Definition: compiler_hints.h:472
@ OME_ARRAY
Definition: OMEmanifests.h:86
#define OME_ERROR_BAD_DATA
Definition: OMEerror.h:21
class OMEassoc * assoc
Definition: OMEbaseType.h:296
OME_FAST_CALL uint32_t getInvocationCount() const OME_ALWAYS_INLINE
Return number of methods invoked against object.
Definition: OMEobject.h:104
#define AND_OUTPUT_NLM(o, t)
Render NLM data to an output stream.
Definition: OMEdebugInfo.h:327
bool permanent
Definition: OMEobject.h:118
class OMEthread * OMEthreadP
Definition: OMEobject.h:16
const OMEtype & getUserID() const OME_ALWAYS_INLINE
Definition: OMEthread.h:146
OMEobject(OMEclass *classData)
Definition: OMEobject.cpp:56
union OMEinvocationData::@30 code
#define OMEdebugBlockedInvocations
Definition: OMEdebugInfo.h:25
Fundamental elements of an OME object identifier.
Definition: OMEoid.h:27
#define OME_INVOKE_OIL2_NATIVE
Definition: OMEmethod.h:12
const class OMEobject * getInstanceInMemory() const
Return object information record.
Definition: OMEoid.h:280
@ OME_ASSOC
Definition: OMEmanifests.h:87
OMEoidStorageInternal * nextRefToSameObject
Definition: OMEoid.h:334
uint32_t totalInvocations
Definition: OMEobject.h:32
uint64_t totalTicks
Definition: OMEobject.h:29
OMEentityID * entityID
Definition: OMEobject.h:34
void noteObjectModified() OME_ALWAYS_INLINE
Definition: OMEthread.h:191
OME_FAST_CALL void * getInstanceDataAtLevel(uint_fast16_t lvl) const OME_ALWAYS_INLINE
Return pointer to instance variables.
Definition: OMEobject.h:187
#define LOG_CERR(lvl)
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
Definition: logging_api.hpp:3014
#define AND_ASSIGN_INTO(v)
Store an NLM into an OMEtype variable.
Definition: OMEdebugInfo.h:332