55#define PACK __attribute__ ((packed))
73#define Q_SOCK_STREAM -1
98enum ClassAccess :
unsigned char {
105#if defined _MSC_VER || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
108#define _Q_WINDOWS64 1
114 #define DLLEXPORT __declspec(dllexport)
116 #define DLLEXPORT __declspec(dllimport)
122 #define QLLDx(a) "%" #a "I64d"
123 #define QORE_DIR_SEP '\\'
124 #define QORE_DIR_SEP_STR "\\"
125 #define QORE_PATH_SEP ';'
126 #define QORE_PATH_SEP_STR ";"
127 #include <winsock2.h>
129 #ifdef HAVE_GCC_VISIBILITY
130 #define DLLEXPORT __attribute__ ((visibility("default")))
131 #define DLLLOCAL __attribute__ ((visibility("hidden")))
138 #define QLLDx(a) "%" #a "lld"
139 #define QORE_DIR_SEP '/'
140 #define QORE_DIR_SEP_STR "/"
141 #define QORE_PATH_SEP ':'
142 #define QORE_PATH_SEP_STR ":"
145#define _Q_MAKE_STRING(x) #x
146#define MAKE_STRING_FROM_SYMBOL(x) _Q_MAKE_STRING(x)
155class QoreBuiltinMethod;
158class QoreExternalFunction;
159class QoreExternalGlobalVar;
166typedef std::vector<const QoreClass*> class_vec_t;
167typedef std::vector<std::pair<const TypedHashDecl*, const QoreNamespace*>> hashdecl_vec_t;
168typedef std::vector<const QoreExternalFunction*> func_vec_t;
169typedef std::vector<const QoreNamespace*> ns_vec_t;
170typedef std::vector<std::pair<const QoreExternalGlobalVar*, const QoreNamespace*>> gvar_vec_t;
171typedef std::vector<std::pair<const QoreExternalConstant*, const QoreNamespace*>> const_vec_t;
175 DLLLOCAL
void operator()(T* ptr) {
182 DLLLOCAL
void operator()(T* ptr) {
189 DLLLOCAL
void operator()(T* ptr) {
200 DLLLOCAL
bool operator()(
const char* s1,
const char* s2)
const {
201 return strcmp(s1, s2) < 0;
208 DLLLOCAL
bool operator()(
const char* s1,
const char* s2)
const {
209 return strcasecmp(s1, s2) < 0;
216 DLLLOCAL
bool operator()(std::string s1, std::string s2)
const {
217 return strcasecmp(s1.c_str(), s2.c_str()) < 0;
223 DLLLOCAL
bool operator()(
const char* s1,
const char* s2)
const {
224 return !strcmp(s1, s2);
230 DLLLOCAL
bool operator()(
const char* s1,
const char* s2)
const {
231 return !strcasecmp(s1, s2);
238 DLLLOCAL
bool operator()(
const char s1,
const char s2)
const {
250 DLLLOCAL
void clear() {
252 std::vector<char*>::clear();
the base class for all data to be used as private data of Qore objects
Definition AbstractPrivateData.h:44
The base class for all value and parse types in Qore expression trees.
Definition AbstractQoreNode.h:57
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition ExceptionSink.h:50
defines a Qore-language class
Definition QoreClass.h:310
deserialization context object used in builtin deserializer methods
Definition common.h:328
DLLEXPORT QoreValue deserializeContainer(const char *index, ExceptionSink *xsink)
returns the container corresponding to the given serialization index
DLLEXPORT QoreValue deserializeValue(const QoreValue val, ExceptionSink *xsink)
deserializes the given data value and returns the deserialized value
DLLEXPORT int64 getFlags() const
Returns the current deserialization flag bitfield.
external wrapper class for constants
Definition QoreReflection.h:200
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition QoreHashNode.h:51
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition QoreListNode.h:52
a method in a QoreClass
Definition QoreClass.h:143
contains constants, classes, and subnamespaces in QoreProgram objects
Definition QoreNamespace.h:65
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition QoreObject.h:61
serialization context object used in builtin serializer methods
Definition common.h:283
DLLEXPORT int serializeHash(const QoreHashNode &h, std::string &index, ExceptionSink *xsink)
Serializes the given hash and returns the serialization index.
DLLEXPORT int serializeObject(const QoreObject &obj, std::string &index, ExceptionSink *xsink)
Serializes the given object and returns the serialization index.
DLLEXPORT int64 getFlags() const
Returns the current serialization flag bitfield.
DLLEXPORT void addModule(const char *module)
Adds a module to be loaded when the data is deserialized.
DLLEXPORT int serializeList(const QoreListNode &l, std::string &index, ExceptionSink *xsink)
Serializes the given list and returns the serialization index.
DLLEXPORT QoreValue serializeValue(const QoreValue val, ExceptionSink *xsink)
Serializes the given value and returns a serialized value representing the value to be serialized.
typed hash declaration
Definition TypedHashDecl.h:44
non-thread-safe vector for storing "char*" that you want to delete
Definition common.h:244
for char less-than comparisons
Definition common.h:236
for simple c-string case-insensitive less-than comparisons
Definition common.h:206
for simple c-string less-than comparisons
Definition common.h:198
for std::string case-insensitive less-than comparisons
Definition common.h:214
QoreValue(* q_external_method_t)(const QoreMethod &method, const void *ptr, QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures
Definition common.h:393
constexpr size_t QSF_INCLUDE_STATIC_CLASS_VARS
Serialization flag; include static class vars.
Definition common.h:272
void(* q_external_destructor_t)(const QoreClass &thisclass, const void *ptr, QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures with the new generic calling convention and...
Definition common.h:456
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode)
Definition common.h:76
DLLEXPORT const char * type_get_name(const QoreTypeInfo *t)
returns the type name for an opaqua QoreTypeInfo ptr
uint64_t q_rt_flags_t
runtime code execution flags
Definition common.h:269
DLLEXPORT long long q_atoll(const char *str)
returns an integer value for a string
QoreValue(* q_external_static_method_t)(const QoreMethod &method, const void *ptr, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for external static methods
Definition common.h:406
QoreValue(* q_func_n_t)(const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures
Definition common.h:355
void(* q_copy_t)(QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures
Definition common.h:465
constexpr size_t QDF_STATIC_CLASS_VARS
Deserialization flag: deserialize static class vars.
Definition common.h:275
void(* q_system_constructor_t)(QoreObject *self, int code, va_list args)
the type used for builtin QoreClass system constructor method signatures
Definition common.h:438
QoreValue(* q_method_n_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures
Definition common.h:378
std::set< int > int_set_t
set of integers
Definition common.h:88
void(* q_external_constructor_t)(const QoreMethod &method, const void *ptr, QoreObject *self, const QoreListNode *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition common.h:426
std::vector< const QoreTypeInfo * > type_vec_t
vector of type information for parameter lists
Definition common.h:257
unsigned q_trid_t
type for thread resource IDs (unique within a single running qore library process)
Definition common.h:503
qore_license_t
qore library and module license type identifiers
Definition common.h:91
@ QL_GPL
code to be used under the GPL license
Definition common.h:92
@ QL_LGPL
code to be used under the LGPL license
Definition common.h:93
@ QL_MIT
code to be used under the MIT license
Definition common.h:94
void(* q_destructor_t)(QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures
Definition common.h:446
void(* q_external_copy_t)(const QoreClass &thisclass, const void *ptr, QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures with the new generic calling convention
Definition common.h:476
unsigned qore_classid_t
used for the unique class ID for QoreClass objects
Definition common.h:85
std::vector< std::string > name_vec_t
vector of parameter names for parameter lists
Definition common.h:263
void(* q_deserializer_t)(QoreObject &self, const QoreHashNode *sdata, QoreDeserializationContext &context, ExceptionSink *xsink)
the type used for builtin QoreClass deserializer method signatures
Definition common.h:498
intptr_t qore_offset_t
used for offsets that could be negative
Definition common.h:82
size_t qore_size_t
used for sizes (same range as a pointer)
Definition common.h:79
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition common.h:266
QoreValue(* q_external_func_t)(const void *ptr, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures for external functions
Definition common.h:367
void(* q_constructor_n_t)(QoreObject *self, const QoreListNode *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition common.h:414
std::vector< QoreValue > arg_vec_t
vector of value information for default argument lists
Definition common.h:260
constexpr size_t QDF_MERGE_STATIC_CLASS_VARS
Deserialization flag: deserialize and merge static class vars; implies QDF_STATIC_CLASS_VARS.
Definition common.h:278
The main value class in Qore, designed to be passed by value.
Definition QoreValue.h:279
functor template for calling free() on pointers
Definition common.h:174
functor template for deleting elements
Definition common.h:181
functor template for dereferencing elements
Definition common.h:188