FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEmanifests.h
Go to the documentation of this file.
1 #ifndef _OME_MANIFESTS_H
2 #define _OME_MANIFESTS_H "$Id: OMEmanifests.h 312 2020-03-21 21:25:35Z geoff $"
4 
6 # include <stdint.h>
8 
13 #if __SIZEOF_POINTER__ == 4
14 #define OME_size_t uint32_t
15 #define OME_ssize_t int32_t
16 #else
17 #define OME_size_t uint64_t
18 #define OME_ssize_t int64_t
19 #endif
20 
21 # ifdef __GNUC__
22 /* GNU C++ Compiler */
23 
24 /*
25  GNU C/C++ includes bit-sized typedefs for most common value ranges.
26  These should be safer to use than short, int and long
27  as we can't be sure of the absolute sizes of these on all platforms
28  (e.g. does sizeof(int)==32 or 64 on 64-bit systems?)
29 */
30 # include <sys/types.h>
31 
32 # if (__linux__ == 1) || (__OpenBSD__ == 1)
33 typedef int16_t int16;
34 typedef u_int16_t uint16; /* non-standard */
35 typedef int32_t int32;
36 typedef u_int32_t uint32; /* non-standard */
37 typedef int64_t int64;
38 # endif
39 
40 # if __sun__ == 1 && __SVR4 == 1
41 // Sun Solaris uses ISO definitions...
42 typedef int16_t int16;
43 typedef uint16_t uint16;
44 typedef int32_t int32;
45 typedef uint32_t uint32;
46 typedef int64_t int64;
47 # endif
48 
49 # if sun == 1 && __SVR4 == 1
50 # include <sys/types.h>
51 /* Sun Solaris uses ISO definitions... */
52 typedef int16_t int16;
53 typedef uint16_t uint16;
54 typedef int32_t int32;
55 typedef uint32_t uint32;
56 typedef int64_t int64;
57 # endif
58 
59 # ifdef _WIN32
60 typedef short int16;
61 typedef unsigned short uint16;
62 typedef long int32;
63 typedef unsigned long uint32;
64 typedef __int64 int64;
65 # endif
66 
67 /* end if __GNUC__ */
68 # else
69 
70 /* NOT __GNUC__ */
71 # define __attribute__(arg) /* nothing */
72 
73 # endif /* end if not __GNUC__ */
74 
75 # define OME_NAMESPACE OMElibrary
76 
77 enum OMEtypes_t {
78  OME_NIL = 0,
79  OME_INT32 = 1,
80  OME_INT = 1,
81  OME_INT64 = 2,
82  OME_FLOAT = 3,
83  OME_DOUBLE = 4,
84  OME_OID = 5,
85  OME_STRING = 6,
86  OME_ARRAY = 7,
87  OME_ASSOC = 8,
89  OME_SET = 10,
90  OME_NLM = 11,
91  OME_FIXED = 12,
92  OME_POINTER = 13,
93  OME_ANY = 14,
96  OME_UINT32 = 17,
97  OME_UINT64 = 18,
98  OME_UINT16 = 19,
99  OME_UINT8 = 20,
102 };
103 
105 #if __cplusplus >= 201703
106  : uint8_t
107 #endif
108 {
111  OME_OUTPUT_NEWLINE = (1 << 2),
114 
117 };
118 
119 
120 /* Constants to share between OMElistInterfaces() and OMEioDescriptor. */
121 # define OME_IO_READ 1
122 # define OME_IO_WRITE 2
123 # define OME_IO_RESERVED0 4 /* ever used? */
124 # define OME_IO_LISTEN 8
125 # define OME_IO_CONNECT 16
126 # define OME_IO_CREATE 32
127 # define OME_IO_MUST_EXIST 64
128 # define OME_IO_TRUNCATE 128
129 # define OME_IO_APPEND 256
130 # define OME_IO_NONBLOCKING 512
131 # define OME_IO_DATAGRAM 1024
132 # define OME_IO_RAW 2048
133 # define OME_IO_MULTICAST 4096
134 
135 /*
136  Microsoft Visual C++ defines _STD as either std:: or ::
137  HP/SGI's STL defines __STD (note two underscores vs. 1) as either std or blank
138  We use the Microsoft convention and define _STD when using the HP/SGI STL
139 */
140 # ifndef _STD
141 # ifdef __STD
142 /* g++-v2 */
143 # define _STD __STD::
144 # else
145 /* g++-v3 */
146 # define _STD std::
147 # endif
148 # endif
149 
151 extern const unsigned char OMEbase64alphabet[];
152 
154 extern const unsigned char OMEhexDigits[];
155 
156 
157 # ifndef O_CHECK_NULL_POINTER
158 /* NOTE: delete of null pointers is technically legal */
159 # define OME_DELETE_OBJECT(ptr) delete ptr
160 # define OME_DELETE_OBJECT_VECTOR(ptr) delete[] ptr
161 # else
162 # define OME_DELETE_OBJECT(ptr) \
163  if (ptr) delete ptr
164 # define OME_DELETE_OBJECT_VECTOR(ptr) \
165  if (ptr) delete[] ptr
166 # endif
167 
168 #endif
169 /* vim: set expandtab shiftwidth=4 tabstop=4: */
OMEreadLicenseFile
OMEstring * OMEreadLicenseFile(OMEstring *retFileName, const OMEstring &licFileName, const char *searchPath)
Definition: OMElicense.cpp:395
OME_ITERATOR
@ OME_ITERATOR
Definition: OMEmanifests.h:88
OMEencodeBuffer::condenseIntoString
OMEstring * condenseIntoString(bool includeVersionID)
Serialize all OMEencodeBufferElement items into a single string.
Definition: OMEencode.cpp:75
OMEprocInfo.h
OME process information implementation.
OME_NLM
@ OME_NLM
Definition: OMEmanifests.h:90
l
Ïúíþ ð Ø ˜ ˜ __text __TEXT € __apple_names __DWARF __apple_objc __DWARF __apple_namespac__DWARF H X __apple_types __DWARF l
Definition: tmp3.o.cpp:1
OME_ERROR_CRYPTO_INTEGRITY2
@ OME_ERROR_CRYPTO_INTEGRITY2
Definition: OMEcrypto.h:85
OMEinitNewCipher
int OMEinitNewCipher(const OMEstring &initVector)
Definition: aesCover.cpp:29
OME_FLOAT
@ OME_FLOAT
Definition: OMEmanifests.h:82
OME_ERROR_CRYPTO_WRONG_USER
@ OME_ERROR_CRYPTO_WRONG_USER
Definition: OMEcrypto.h:84
OMEoil2StackCreate
void * OMEoil2StackCreate(const OMEinvocationData *mInfo)
Creates a stack for an OIL2 method.
Definition: copyIntrp.cpp:39
OME_DISABLE_QUOTE_OUTPUT
@ OME_DISABLE_QUOTE_OUTPUT
Definition: OMEmanifests.h:110
OMEdefineNewClass
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
OME_ERROR_CRYPTO_DECODE_FAILED
@ OME_ERROR_CRYPTO_DECODE_FAILED
Definition: OMEcrypto.h:79
OMEnameSpaceGroup
Mapping table to class implementations within a namespace.
Definition: OMEnamespace.h:18
OMEmakeSHA1hash
OMEstring * OMEmakeSHA1hash(const OMEstring &message)
Compute Secure Hash Algorithm 1 over an OMEstring.
Definition: pkRoutines.cpp:83
OME_POINTER
@ OME_POINTER
Definition: OMEmanifests.h:92
OMEfunctions.h
OME utility functions.
OMEioObjects.h
OMEinvocationData::signature
uint32_t signature
Definition: OMEmethod.h:44
OME_UINT16
@ OME_UINT16
Definition: OMEmanifests.h:98
OME_ERROR_CRYPTO_BAD_VERSION
@ OME_ERROR_CRYPTO_BAD_VERSION
Definition: OMEcrypto.h:76
OMEinvocationData::invocationMode
uint32_t invocationMode
Definition: OMEmethod.h:47
OMEoil2StackDelete
void OMEoil2StackDelete(const OMEinvocationData *mInfo, void *data)
Deletes a stack associated with an OIL2 method.
Definition: copyIntrp.cpp:51
OMEinvocationData::data
void * data
Definition: OMEmethod.h:50
OMEassoc
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
OME_ERROR_CRYPTO_INTEGRITY1
@ OME_ERROR_CRYPTO_INTEGRITY1
Definition: OMEcrypto.h:78
OMEstring
Implements text and binary string storage.
Definition: OMEstring.h:305
OMEencode.h
OME type encoding routines.
OMEclass::findMethodImplementation
OME_FAST_CALL OMEinvocationData * findMethodImplementation(const uint32_t signature, const OMEstring &methodName, const uint32_t indx=0) const
Definition: OMEclass.cpp:321
OMEencodeBuffer
Buffer into which OMEtype data is encoded.
Definition: OMEencode.h:54
OMEfreeEncryptionKey
int OMEfreeEncryptionKey(int useKey)
Definition: aesCover.cpp:111
OMEclass::setStorageDescription
int setStorageDescription(const struct OMEinstanceVarDescr *desc)
Definition: OMEclass.cpp:224
OMEarray::indexExists
bool indexExists(const uint32_t i) const
Definition: OMEarray.h:202
OME_ERROR_CRYPTO_INIT_FAILED
@ OME_ERROR_CRYPTO_INIT_FAILED
Definition: OMEcrypto.h:82
OMEnameSpaceGroup::findClass
OME_FAST_CALL OMEclass * findClass(const OMEstring &name, const uint32_t verID=0) const
Definition: OMEnamespace.cpp:130
OMEtype::value
union OMEtype::@26 value
OME_SHA1_HASH_LEN_IN_BYTES
@ OME_SHA1_HASH_LEN_IN_BYTES
Definition: OMEcrypto.h:16
OME_LAST_TYPE_INDEX
@ OME_LAST_TYPE_INDEX
Definition: OMEmanifests.h:101
OMEencryptString
int OMEencryptString(int useCipher, int useKey, const OMEstring &input, OMEstring &result)
Definition: aesCover.cpp:124
WARNING_DAYS
#define WARNING_DAYS
Definition: OMElicense.cpp:14
OMEtype
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
OMEhash
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
OMEassoc::indexExists
bool indexExists(const ASSOC_HASH_KEY_t i) const
Definition: OMEassoc.h:226
OME_DOUBLE
@ OME_DOUBLE
Definition: OMEmanifests.h:83
OMEmakePublicKey
OMEstring * OMEmakePublicKey(const OMEstring &privateKey)
Definition: pkRoutines.cpp:192
OMEtype_OutputFlags_t
OMEtype_OutputFlags_t
Definition: OMEmanifests.h:104
OMEstring::determineCharacterSet
void determineCharacterSet()
Definition: OMEstring.h:391
OMEshareConstant
const OMEstring & OMEshareConstant(const OMEstring &stringConstant)
Definition: OMEnamespace.cpp:338
OMEmakeSessionKeyFromPublicKey
OMEstring * OMEmakeSessionKeyFromPublicKey(const OMEstring &publicKey, OMEstring &randomDataInSessionKeyOut)
Definition: pkRoutines.cpp:255
OMEloadVersion1Encodings
void OMEloadVersion1Encodings()
Definition: encodeVer1.cpp:631
OMEmethod
Description of an OME method.
Definition: OMEmethod.h:82
OME_UINT32
@ OME_UINT32
Definition: OMEmanifests.h:96
OME_ERROR_CRYPTO_WRONG_HOST
@ OME_ERROR_CRYPTO_WRONG_HOST
Definition: OMEcrypto.h:83
OMEtype::s
class OMEstring * s
Definition: OMEbaseType.h:299
OMEinvocationData::setStorageDescription
int setStorageDescription(const struct OMEinstanceVarDescr *desc)
Definition: OMEmethod.cpp:69
ldUtils.h
OMEthisProcessInfo::hostName
OMEstring hostName
Definition: OMEprocInfo.h:67
FILE_TYPE_LOCALIZED_V1
#define FILE_TYPE_LOCALIZED_V1
Definition: OMElicense.cpp:19
OMEdecryptString
int OMEdecryptString(int useCipher, int useKey, const OMEstring &input, OMEstring &result)
Definition: aesCover.cpp:179
OMEcore.h
OMEgetLicenseAttribute
OMEtype * OMEgetLicenseAttribute(const OMEstring &attrName, OMEstring *retFileName)
Definition: OMElicense.cpp:521
OMEtype::i
int32_t i
Definition: OMEbaseType.h:285
OMEtype::array
class OMEarray * array
Definition: OMEbaseType.h:294
OMEclass::findMethod
OME_FAST_CALL OMEmethodP findMethod(const OMEstring &methodName, const uint32_t indx=0) const
Definition: OMEclass.cpp:294
OME_INVOKE_OIL2_INTERPRET
#define OME_INVOKE_OIL2_INTERPRET
Definition: OMEmethod.h:11
OMEclass
FARGOS/VISTA Object Management Environment class description.
Definition: OMEclass.h:24
OME_ERROR_NO_SUCH_CLASS
#define OME_ERROR_NO_SUCH_CLASS
Definition: OMEerror.h:15
OMEinvocationData::localGlobals
OMEarray localGlobals
Definition: OMEmethod.h:55
OMEclass::resolveLinkages
int resolveLinkages(OMEstring *missingClassName=nullptr, uint32_t *missingClassVersionID=nullptr)
Attempt to resolve inheritance tree.
Definition: OMEclass.cpp:428
OMEdefaultInstanceCreate
void * OMEdefaultInstanceCreate(const OMEclass *cInfo)
Definition: OMEclass.cpp:79
OMEinvocationData::constantTable
OMEarray constantTable
Definition: OMEmethod.h:54
OME_ERROR_CRYPTO_DECODE_ARRAY
@ OME_ERROR_CRYPTO_DECODE_ARRAY
Definition: OMEcrypto.h:80
OMEinvocationData::anyMask
uint32_t anyMask
Definition: OMEmethod.h:45
srcID
const char srcID[]
Definition: catSym.c:17
OMEoil2Interp.h
OME_STRING
@ OME_STRING
Definition: OMEmanifests.h:85
OME_OUTPUT_NEWLINE
@ OME_OUTPUT_NEWLINE
Definition: OMEmanifests.h:111
OME_INT
@ OME_INT
Definition: OMEmanifests.h:80
OMEdecryptSessionKeyWithPrivateKey
OMEstring * OMEdecryptSessionKeyWithPrivateKey(const OMEstring &privateKey, const OMEstring &data)
Definition: pkRoutines.cpp:296
OMEmakePrivateKey
OMEstring * OMEmakePrivateKey(const OMEstring &secretPhrase)
Definition: pkRoutines.cpp:156
OMEdefineNewEncryptKey
int OMEdefineNewEncryptKey(const OMEstring &key)
Definition: aesCover.cpp:95
OMEinvocationData::stackSize
uint32_t stackSize
Definition: OMEmethod.h:46
OMEdefineNewDecryptKey
int OMEdefineNewDecryptKey(const OMEstring &key)
Definition: aesCover.cpp:103
OMEcrypto.h
LEN_LICENSE_MAGIC
#define LEN_LICENSE_MAGIC
Definition: OMElicense.cpp:16
OMEtype::encode
int encode(class OMEencodeBuffer *) const
Add the encoding of an OMEtype into an OMEencodeBuffer.
Definition: OMEencode.cpp:189
OMEclass::addMethod
int addMethod(OMEmethodP)
Add method implementation.
Definition: OMEclass.cpp:277
OME_NIL
@ OME_NIL
Definition: OMEmanifests.h:78
OME_EXPECT_TRUE
#define OME_EXPECT_TRUE(expr)
Annotation macro for conditional expression expected to be true.
Definition: compiler_hints.h:541
OME_OID
@ OME_OID
Definition: OMEmanifests.h:84
OMEinvocationData::deleteStackRoutine
DeleteStackFP deleteStackRoutine
Definition: OMEmethod.h:53
OMEtypes_t
OMEtypes_t
Definition: OMEmanifests.h:77
OMEdefaultInstanceDelete
void OMEdefaultInstanceDelete(const OMEclass *cInfo, void *data)
Definition: OMEclass.cpp:99
OMEbase64ToBinary
OMEstring * OMEbase64ToBinary(const OMEstring &source)
Convert base-64 encoded text to its binary representation.
Definition: OMEbase64.cpp:156
OME_UINT64
@ OME_UINT64
Definition: OMEmanifests.h:97
OMEfindNameSpace
OMEnameSpaceGroup * OMEfindNameSpace(const OMEstring &name, int *errCode)
Definition: OMEnamespace.cpp:38
OME_ARRAY_SUBSCRIPT_t
#define OME_ARRAY_SUBSCRIPT_t(v)
Definition: OMEarray.h:293
OME_INIT_VEC_LEN_IN_HEX_BYTES
@ OME_INIT_VEC_LEN_IN_HEX_BYTES
Definition: OMEcrypto.h:14
OMEtype.h
OME fundamental type implementation.
OMEstring::midstr
OMEstring * midstr(size_t offset, size_t len) const
Definition: OMEstring.h:521
OMEerror.h
OME error codes.
OMEtype::ui
uint32_t ui
Definition: OMEbaseType.h:286
OMEstring::length
size_t length() const
Definition: OMEstring.h:401
OMEconvertAbsoluteToLocalRelativeTime
OME_DLL_EXPORT uint32_t OMEconvertAbsoluteToLocalRelativeTime(const OMEtype &tData)
Convert an OME absolute time reference to a local relative time.
Definition: OMEtime.cpp:152
OMEinvocationData::createStackRoutine
CreateStackFP createStackRoutine
Definition: OMEmethod.h:52
FILE_TYPE_LICENSE_V2
#define FILE_TYPE_LICENSE_V2
Definition: OMElicense.cpp:18
OMEcurrentProcessInfo
OMEthisProcessInfo OMEcurrentProcessInfo
Automatic instantiation of OMEthisProcessInfo. When properly linked, the C++ static constructor mecha...
Definition: OMEprocInfo.cpp:217
OME_USED
const char srcID[] OME_USED
Definition: tick_time.cpp:24
OMEfindFileInDirectory
OMEstring * OMEfindFileInDirectory(const OMEstring &fileName, const OMEarray &dirNames)
Search for a file located within a list of directories specified as elements of an OMEarray.
Definition: OMEfindFile.cpp:292
OMEgetLocalizedData
OMEtype * OMEgetLocalizedData(const OMEstring &fileSuffix, const OMEstring &attrName, const OMEstring &signingKey)
Definition: OMElicense.cpp:589
OME_FORCE_QUOTES_IN_CONTAINER_OUTPUT
@ OME_FORCE_QUOTES_IN_CONTAINER_OUTPUT
Definition: OMEmanifests.h:112
_OME_UNUSED_16
@ _OME_UNUSED_16
Definition: OMEmanifests.h:95
OMEarray::elementCount
uint_fast32_t elementCount() const OME_ALWAYS_INLINE
Definition: OMEarray.h:247
_OME_UNUSED_15
@ _OME_UNUSED_15
Definition: OMEmanifests.h:94
OMEfreeCipher
int OMEfreeCipher(int useCipher)
Definition: aesCover.cpp:56
OMEgetUserName
OMEstring * OMEgetUserName()
Return the name of the user associated with the process.
Definition: OMEprocInfo.cpp:285
OME_SET
@ OME_SET
Definition: OMEmanifests.h:89
OMEdefOIL2func
Record to define the implementation of an OIL2 function.
Definition: OMEthread.h:287
compiler_hints.h
Compiler-specific macros to provide performance-related hints.
OME_EXPECT_FALSE
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
OMEinvocationData
Record to describe the implementation of the method of an OME class.
Definition: OMEmethod.h:35
OMEmethod::addImplementation
void addImplementation(OMEinvocationData *impl)
Definition: OMEmethod.cpp:96
OME_UINT8
@ OME_UINT8
Definition: OMEmanifests.h:99
OMEgetSigningFile
OMEtype * OMEgetSigningFile(const OMEstring &secret, const OMEstring &logicalDomain, bool isPublic)
Definition: OMElicense.cpp:648
OME_FIXED
@ OME_FIXED
Definition: OMEmanifests.h:91
OME_ERROR_CRYPTO_BAD_DATA
@ OME_ERROR_CRYPTO_BAD_DATA
Definition: OMEcrypto.h:81
OMEarray
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
OMEthread
Public interface to an OME thread.
Definition: OMEthread.h:60
LOG_ENDLINE
#define LOG_ENDLINE
Closing clause for text line output using << operators.
Definition: logging_api.hpp:2956
OMEbase64alphabet
const unsigned char OMEbase64alphabet[]
Definition: OMEbase64.cpp:20
OME_ANY
@ OME_ANY
Definition: OMEmanifests.h:93
OMEmakeRandomKey
OMEstring * OMEmakeRandomKey(int32_t bits=1024)
Generate a random sequence of bits.
Definition: pkRoutines.cpp:46
OMEtype::type
uint32_t type
Definition: OMEbaseType.h:304
OME_DEFAULT_COMPLEX_OUTPUT_MODE
@ OME_DEFAULT_COMPLEX_OUTPUT_MODE
Definition: OMEmanifests.h:116
OMEclass::inheritFromClass
int inheritFromClass(const OMEstring &nameSpace, const OMEstring &name, const uint32_t verID=0, const bool unique=false)
Definition: OMEclass.cpp:349
OMEinvocationData::next
class OMEinvocationData * next
Definition: OMEmethod.h:43
OME_ARRAY
@ OME_ARRAY
Definition: OMEmanifests.h:86
OME_ERROR_BAD_DATA
#define OME_ERROR_BAD_DATA
Definition: OMEerror.h:21
OMEarray::ARRAY_SUBSCRIPT_t
OMEarrayStorage::ARRAY_SUBSCRIPT_t ARRAY_SUBSCRIPT_t
Definition: OMEarray.h:90
OMEtype::assoc
class OMEassoc * assoc
Definition: OMEbaseType.h:296
OMEtype
#define OMEtype
Definition: tmp.o.cpp:396
OME_OUTPUT_TYPENAME
@ OME_OUTPUT_TYPENAME
Definition: OMEmanifests.h:109
OMEinvocationData::code
union OMEinvocationData::@30 code
OMEhexDigits
const unsigned char OMEhexDigits[]
Definition: OMEstring.cpp:19
OME_ASSOC
@ OME_ASSOC
Definition: OMEmanifests.h:87
OME_DEFAULT_OUTPUT_MODE
@ OME_DEFAULT_OUTPUT_MODE
Definition: OMEmanifests.h:115
OMEparsePathSpecification
OMEarray * OMEparsePathSpecification(const OMEstring &spec)
Parse a list of directories specified by a string path into an sequence of OMEarray elements.
Definition: OMEfindFile.cpp:236
OME_ESCAPE_UNPRINTABLE
@ OME_ESCAPE_UNPRINTABLE
Definition: OMEmanifests.h:113
OME_INIT_VEC_LEN_IN_BITS
@ OME_INIT_VEC_LEN_IN_BITS
Definition: OMEcrypto.h:13
OME_INT32
@ OME_INT32
Definition: OMEmanifests.h:79
OME_INT64
@ OME_INT64
Definition: OMEmanifests.h:81
OMEloadOIL2
int OMEloadOIL2(OMEthread *thread, OMEtype &result, const OMEtype &data, const OMEtype &justList)
Definition: OMEld.cpp:198
LOG_CERR
#define LOG_CERR(lvl)
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
Definition: logging_api.hpp:3014
OME_ERROR_CRYPTO_BAD_MAGIC
@ OME_ERROR_CRYPTO_BAD_MAGIC
Definition: OMEcrypto.h:77
logging_api.hpp
FARGOS Logging API.
Generated: Tue Jul 28 2020 16:03:25
Support Information