Go to the documentation of this file.
2 #define _OME_OID_H "$Id: OMEoid.h 406 2020-07-12 05:07:33Z geoff $"
34 template <
typename STREAMTYPE>
inline STREAMTYPE &
operator<<(STREAMTYPE &o,
const OMEoidID &data)
92 template <
typename STREAMTYPE>
static STREAMTYPE &
OMEdumpOIDchain(STREAMTYPE &outputStream);
98 const OMEstring *encodedData,
size_t *offset,
104 bool externalOnly =
false);
122 std::cerr <<
"OMEoidStorage default init\n";
177 std::cerr <<
"OIDstorage::deepCopy called!\n";
185 template <
typename STREAMTYPE> STREAMTYPE &
outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent = 0,
186 bool fullInfo =
false)
const;
223 return (data->encodeOID(bfr));
229 if (this->data == arg.
data) {
248 if (data == arg.
data) {
251 return (*data == *arg.
data);
257 if (data == arg.
data) {
260 return (*data != *arg.
data);
282 return (data->getInstanceInMemory());
287 return (data->getObjectACL());
292 data->getObjectOID(result);
297 return (getInstanceInMemory() == obj);
308 template <
typename STREAMTYPE> STREAMTYPE &
outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent = 0,
309 bool fullInfo =
false)
const
311 data->outputOnStream(outputStream, indent, fullInfo);
312 return (outputStream);
316 template <
typename STREAMTYPE>
inline STREAMTYPE &
operator<<(STREAMTYPE &outputStream,
const OMEoid &data)
319 return (outputStream);
342 void noteReferencedObjectDeleted(
OMEoidID *entity);
345 void doDestructorImplementation()
OME_USED;
351 doDestructorImplementation();
367 if (acl != arg.
acl) {
378 if (acl != arg.
acl) {
390 return (*
this == *p);
399 return (*
this != *p);
404 return (objectRecord);
408 template <
typename STREAMTYPE> STREAMTYPE &outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent = 0,
409 bool fullInfo =
false)
const;
432 template <
typename STREAMTYPE> STREAMTYPE &
outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent = 0,
433 bool fullInfo =
false)
const;
440 pagerObject =
new OMEoid(pager);
441 encapsulationMethodName = method;
446 *method = &encapsulationMethodName;
447 return (pagerObject);
466 int rc = memcmp(&oidData, &(p->
oidData),
sizeof(oidData));
476 int rc = memcmp(&oidData, &(p->
oidData),
sizeof(oidData));
Abstract interface for storage of OMEoid objects that hides the internal vs. external implementation.
Definition: OMEoid.h:48
OMEoid & operator=(const OMEoid *arg)
Assignment of OMEoid pointer.
Definition: OMEoid.h:238
OMEoidStorage * ownedBy
Definition: OMEoid.h:335
OME reference count implementation.
OMEstring * condenseIntoString(bool includeVersionID)
Serialize all OMEencodeBufferElement items into a single string.
Definition: OMEencode.cpp:75
OME process information implementation.
@ OME_NLM
Definition: OMEmanifests.h:90
virtual void setProxyObject(const OMEoid &pager, const OMEstring &method) override
Definition: OMEoid.h:437
@ OME_FLOAT
Definition: OMEmanifests.h:82
#define OME_DELETE_OBJECT(ptr)
Definition: OMEmanifests.h:159
const OMEassoc & getObjectACL() const
Definition: OMEoid.h:70
const OMEassoc & getObjectACL() const
Definition: OMEoid.h:285
OMEoid & operator=(const OMEoid &arg)
Assignment of OMEoid reference.
Definition: OMEoid.h:227
const char s[]
Definition: t.cpp:4
virtual const class OMEobject * getInstanceInMemory() const =0
class OMEoidStorageBase * storageRef
Definition: OMEoid.h:128
@ OME_CRITICAL_SECTION_OID_REFERENCE
Definition: OMEmutex.h:42
OMEstring encapsulationMethodName
Definition: OMEoid.h:422
void setProxyObject(const OMEoid &proxy, const OMEstring &method)
Set object Id of meta/proxy object.
Definition: OMEoid.h:275
virtual OMEreferenceCount * deepCopy() const override
Definition: OMEoid.h:175
uint32_t hostNameHash
Definition: OMEprocInfo.h:24
void OMEstartCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:217
uint32_t bootTime
Definition: OMEprocInfo.h:22
~OMEoidStorage()
Definition: OMEoid.cpp:150
bool operator!=(const OMEoidStorage &arg) const
Definition: OMEoid.cpp:184
const class OMEoid * getProxyObject(const OMEstring **method) const
Get object Id of meta/proxy object.
Definition: OMEoid.h:270
OME object identifier implementation.
uint32_t processID
Definition: OMEprocInfo.h:23
~OMEoid()
Definition: OMEoid.cpp:343
bool operator!=(const OMEoidStorage &arg) const
Definition: OMEoid.h:470
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
OMEoid(OMEoidStorage *s)
Definition: OMEoid.cpp:337
void removeLink()
Definition: OMEoid.cpp:132
#define _OME_OID_H
Definition: tmp.o.cpp:971
const class OMEobject * getInstanceInMemory() const
Definition: OMEoid.h:169
Implements text and binary string storage.
Definition: OMEstring.h:305
virtual OMEstring * encodeOID(const class OMEencodeBuffer *bfr) const =0
OME type encoding routines.
Buffer into which OMEtype data is encoded.
Definition: OMEencode.h:54
OMEoidID oidData
Definition: OMEoid.h:421
@ OME_CHARSET_UNICODE
Definition: OMEstring.h:31
OMEoidStorage * data
Definition: OMErefCount.h:82
bool operator!=(const OMEoid &arg) const
Definition: OMEoid.h:254
@ OME_CHARSET_ASCII
Definition: OMEstring.h:28
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
bool indexExists(const ASSOC_HASH_KEY_t i) const
Definition: OMEassoc.h:226
Base class and abstract interface for an object within a FARGOS/VISTA Object Management Environment.
Definition: OMEobject.h:22
@ OME_DOUBLE
Definition: OMEmanifests.h:83
@ external
Definition: OMEoid.h:90
static int OMEdecodeOID(uint_fast32_t version, const OMEstring *encodedData, size_t *offset, OMEoidID *resultOID, OMEassoc **resultACL)
Definition: OMEoid.cpp:282
OMEstring * encodeOID(const class OMEencodeBuffer *bfr) const
Definition: OMEoid.h:144
virtual void getObjectOID(OMEoidID *result) const override
Definition: OMEoid.h:450
int connectToDatabase(OMEthread *thread, OMEtype &result, const OMEtype &id, const OMEtype &dsn, const OMEtype &name, const OMEtype &passwd)
Definition: OMEodbcInt.cpp:823
class OMEstring * s
Definition: OMEbaseType.h:299
OMEoidStorageExternal(const OMEoidID *data, const OMEassoc &acl)
Definition: OMEoid.cpp:208
int allocateDatabaseConnection(OMEthread *thread, OMEtype &result)
Definition: OMEodbcInt.cpp:793
uint32_t classVersionID
Definition: OMEoid.h:29
bool objectIsLocal() const
bool operator!=(const OMEoidStorageInternal &arg) const
Definition: OMEoid.h:373
friend class OMEoid
Definition: OMEoid.h:81
int32_t i
Definition: OMEbaseType.h:285
class OMEarray * array
Definition: OMEbaseType.h:294
OMEoid(const OMEoid &org)
Definition: OMEoid.h:210
Templated type-specific reference to a reference-counted object.
Definition: OMErefCount.h:79
int getResultTable(OMEthread *thread, OMEtype &result, const OMEtype &id)
Definition: OMEodbcInt.cpp:896
virtual void getObjectOID(OMEoidID *result) const =0
void addLink()
Definition: OMEoid.cpp:117
Base class for reference-counted data.
Definition: OMErefCount.h:31
Identifies an instance of an OME process.
Definition: OMEprocInfo.h:19
void convertInternalToExternalRef(const OMEoidID *entity, const class OMEoidStorageInternal *checkPtr)
Definition: OMEoidInt.cpp:175
bool operator==(const OMEoidStorage &arg) const
Definition: OMEoid.cpp:164
const char srcID[]
Definition: catSym.c:17
@ OME_STRING
Definition: OMEmanifests.h:85
OMErefType
Definition: OMEoid.h:87
void noteCharacterSet(uint_fast8_t c)
Definition: OMEstring.h:386
int executeStatement(OMEthread *thread, OMEtype &result, const OMEtype &id)
Definition: OMEodbcInt.cpp:882
bool operator!=(const OMEoidStorage &arg) const
Definition: OMEoid.h:393
OMEoid * deepCopy() const
Definition: OMEoid.h:263
Reference-counted link to OMEoidStorageBase object.
Definition: OMEoid.h:79
OMEassoc acl
Definition: OMEoid.h:50
int encode(class OMEencodeBuffer *) const
Add the encoding of an OMEtype into an OMEencodeBuffer.
Definition: OMEencode.cpp:189
static int convertExternalReferences(const OMEoidID *id, class OMEobject *o)
Definition: OMEoidIntStub.cpp:108
OMEoidStorage * nextInChain
Definition: OMEoid.h:110
The standard mechanism for attaching external processes to a FARGOS/VISTA Object Management Environme...
Definition: OMEapi.h:83
@ OME_NIL
Definition: OMEmanifests.h:78
@ OME_DEFAULT_CHARSET
Definition: OMEstring.h:35
#define OME_EXPECT_TRUE(expr)
Annotation macro for conditional expression expected to be true.
Definition: compiler_hints.h:541
@ OME_OID
Definition: OMEmanifests.h:84
STREAMTYPE & operator<<(STREAMTYPE &o, const OMEoidID &data)
Definition: OMEoid.h:34
uint_fast8_t getCharacterSet() const
Definition: OMEstring.h:396
void setOwningRecord(OMEoidStorage *rec) OME_ALWAYS_INLINE
Definition: OMEoid.h:337
OME associative array implementation.
virtual const class OMEobject * getInstanceInMemory() const override
Definition: OMEoid.h:455
Interface to an internal OME object.
Definition: OMEoid.h:324
OME fundamental type implementation.
static OMEoidStorage * startOfChain
Definition: OMEoid.h:109
void getObjectOID(OMEoidID *result) const
Definition: OMEoid.h:290
STREAMTYPE & outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent=0, bool fullInfo=false) const
Definition: OMEoutputOnStream.h:253
size_t length() const
Definition: OMEstring.h:401
OMEthisProcessInfo OMEcurrentProcessInfo
Automatic instantiation of OMEthisProcessInfo. When properly linked, the C++ static constructor mecha...
Definition: OMEprocInfo.cpp:217
const OMEassoc & getObjectACL() const
Definition: OMEoid.h:154
const char srcID[] OME_USED
Definition: tick_time.cpp:24
uint32_t classHashIndex
Definition: OMEoid.h:30
OMEoid * pagerObject
Definition: OMEoid.h:423
virtual const OMEoid * getProxyObject(const OMEstring **method) const override
Definition: OMEoid.h:444
void addReadOnlyReference()
Definition: OMErefCount.cpp:139
virtual OMEstring * encodeOID(const class OMEencodeBuffer *bfr) const override
Definition: OMEoid.cpp:330
OMEentityID birthplace
Definition: OMEoid.h:31
@ OME_SET
Definition: OMEmanifests.h:89
#define ntohl(x)
Definition: tmp.o.cpp:3101
const class OMEobject * objectRecord
Definition: OMEoid.h:331
Record to define the implementation of an OIL2 function.
Definition: OMEthread.h:287
STREAMTYPE & outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent=0, bool fullInfo=false) const
Definition: OMEoid.h:308
static OMEoidStorage * findReference(const OMEoidID *id, const OMEassoc *acl=nullptr, OMEoidStorage **sameEntity=nullptr, bool externalOnly=false)
Definition: OMEoidIntStub.cpp:76
@ internal
Definition: OMEoid.h:89
OMEentityID id
Definition: OMEprocInfo.h:68
~OMEoidStorageExternal()
Definition: OMEoid.cpp:236
void OMEendCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:236
bool operator==(const OMEoid &arg) const
Definition: OMEoid.h:245
void getObjectOID(OMEoidID *arg) const
Definition: OMEoid.h:149
#define OME_ALWAYS_INLINE
Tell the compiler to alway inline a function, regardless of optimization level.
Definition: compiler_hints.h:364
int prepareStatement(OMEthread *thread, OMEtype &result, const OMEtype &id, const OMEtype &statement, const OMEtype ¶ms)
Definition: OMEodbcInt.cpp:864
class OMEtype * OMEbaseTypeP
Definition: OMEoid.h:22
void dropReference(C *newData=nullptr) OME_ALWAYS_INLINE
Definition: OMErefCount.h:91
@ OME_CHARSET_BINARY
Definition: OMEstring.h:30
static OMEstring * OMEencodeOID(const OMEoidID &, const OMEassoc &, int encodingVersion)
Definition: OMEoid.cpp:242
uint32_t getEncodeVersion() const
Get version Id of encoding version.
Definition: OMEencode.h:96
void setProxyObject(const class OMEoid &proxy, const OMEstring &method)
Definition: OMEoid.h:164
@ OME_FIXED
Definition: OMEmanifests.h:91
bool operator==(const OMEoidStorage &arg) const
Definition: OMEoid.h:384
const class OMEoid * getProxyObject(const OMEstring **method) const
Definition: OMEoid.h:159
OME debug and profiling interfaces.
bool isExternal() const OME_ALWAYS_INLINE
Definition: OMEoid.h:300
#define OME_DLL_EXPORT
Definition: compiler_hints.h:464
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
Public interface to an OME thread.
Definition: OMEthread.h:60
const int ARG_IGNORED
Definition: OMEodbcInt.cpp:14
Public interface to an OME Object Identifier.
Definition: OMEoid.h:196
virtual ~OMEoidStorageBase()
Definition: OMEoid.h:57
OMEstring * encodeOID(const class OMEencodeBuffer *bfr) const
Definition: OMEoid.h:221
uint32_t type
Definition: OMEbaseType.h:304
virtual const class OMEobject * getInstanceInMemory() const override
Definition: OMEoid.h:402
@ _NOT_SET
Definition: OMEoid.h:88
OMEoidStorage * prevInChain
Definition: OMEoid.h:111
int listDatabases(OMEthread *thread, OMEtype &result, const OMEtype &id)
Definition: OMEodbcInt.cpp:811
bool operator==(const OMEoidStorage &arg) const
Definition: OMEoid.h:460
Interface to an external OME object.
Definition: OMEoid.h:415
uint32_t instanceIndex
Definition: OMEoid.h:28
OMEoidStorageBase(const OMEassoc &aclData)
Definition: OMEoid.h:52
@ OME_ARRAY
Definition: OMEmanifests.h:86
void convertExternalToInternalRef(OMEobject *b)
Definition: OMEoidInt.cpp:205
virtual void setProxyObject(const class OMEoid &proxy, const OMEstring &method)=0
@ OME_CHARSET_EBCDIC
Definition: OMEstring.h:29
class OMEassoc * assoc
Definition: OMEbaseType.h:296
#define OMEtype
Definition: tmp.o.cpp:396
OMEoidStorage()
Definition: OMEoid.h:119
virtual const class OMEoid * getProxyObject(const OMEstring **method) const =0
bool refersTo(const class OMEobject *obj) const OME_ALWAYS_INLINE
Definition: OMEoid.h:295
#define htonl(x)
Definition: tmp.o.cpp:3098
friend class OMEoidStorageExternal
Definition: OMEoid.h:83
Fundamental elements of an OME object identifier.
Definition: OMEoid.h:27
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
OMErefType referenceType
Definition: OMEoid.h:134
OME_DLL_EXPORT void INIT_DECLARE_OMEodbcInt()
Definition: OMEodbcInt.cpp:908
static STREAMTYPE & OMEdumpOIDchain(STREAMTYPE &outputStream)
Internal dereferencing element used by OMEoid.
Definition: OMEoid.cpp:97
bool operator==(const OMEoidStorageInternal &arg) const
Definition: OMEoid.h:362
@ OME_INT32
Definition: OMEmanifests.h:79
@ OME_INT64
Definition: OMEmanifests.h:81
int closeDatabaseConnection(OMEthread *thread, OMEtype &result, OMEtype &id)
Definition: OMEodbcInt.cpp:803