32 #ifndef _QORE_QORELIBINTERN_H
34 #define _QORE_QORELIBINTERN_H
36 #include "qore/intern/config.h"
40 #include <sys/types.h>
42 #ifdef HAVE_EVP_MAC_CTX_NEW
43 #define OPENSSL_3_PLUS
46 #ifdef HAVE_SYS_STATVFS_H
47 #define Q_HAVE_STATVFS
48 #include <sys/statvfs.h>
52 #ifdef HAVE_EXECINFO_H
55 #ifdef HAVE_ARPA_INET_H
56 #include <arpa/inet.h>
58 #ifdef HAVE_SYS_SOCKET_H
59 #include <sys/socket.h>
64 #ifdef HAVE_NETINET_IN_H
65 #include <netinet/in.h>
67 #ifdef HAVE_ARPA_INET_H
68 #include <arpa/inet.h>
70 #ifdef HAVE_SYS_SOCKET_H
71 #include <sys/socket.h>
76 #ifdef HAVE_ARPA_INET_H
77 #include <arpa/inet.h>
79 #ifdef HAVE_WINSOCK2_H
82 #ifdef HAVE_WS2TCPIP_H
88 #ifdef HAVE_NETINET_TCP_H
89 #include <netinet/tcp.h>
95 #ifdef HAVE_INTTYPES_H
99 #ifndef HAVE_STRCASESTR
100 extern char* strcasestr(
const char* s1,
const char* s2);
104 #define MPFR_USE_INTMAX_T 1
110 #if TARGET_BITS == 64
125 #define NT_SOFTINT -4
126 #define NT_SOFTFLOAT -5
127 #define NT_SOFTNUMBER -6
128 #define NT_SOFTBOOLEAN -7
129 #define NT_SOFTSTRING -8
130 #define NT_SOFTDATE -9
131 #define NT_SOFTLIST -10
132 #define NT_TIMEOUT -11
133 #define NT_INTORFLOAT -12
134 #define NT_INTFLOATORNUMBER -13
135 #define NT_FLOATORNUMBER -14
136 #define NT_SOFTBINARY -15
137 #define NT_HEXBINARY -16
138 #define NT_BASE64BINARY -17
140 #define NT_SOMETHING -101
143 typedef std::set<QoreObject*> obj_set_t;
146 DLLLOCAL
extern int qore_ssl_data_index;
149 enum q_setpub_t :
unsigned char {
155 hashdecl QoreParseContext {
157 LocalVar* oflag =
nullptr;
160 const QoreTypeInfo* typeInfo =
nullptr;
165 DLLLOCAL QoreParseContext(LocalVar* oflag,
QoreProgram* pgm =
getProgram()) : pgm(pgm), oflag(oflag) {
168 DLLLOCAL
int unsetFlags(
int flags) {
174 DLLLOCAL
int setFlags(
int flags) {
181 class QoreParseContextFlagHelper {
183 DLLLOCAL QoreParseContextFlagHelper(QoreParseContext& parse_context) : parse_context(parse_context),
184 pflag(parse_context.pflag) {
187 DLLLOCAL ~QoreParseContextFlagHelper() {
188 if (parse_context.pflag != pflag) {
189 parse_context.pflag = pflag;
193 DLLLOCAL
void unsetFlags(
int flags) {
194 parse_context.pflag &= ~flags;
197 DLLLOCAL
void setFlags(
int flags) {
198 parse_context.pflag |= flags;
202 QoreParseContext& parse_context;
206 class QoreParseContextLvarHelper {
208 DLLLOCAL QoreParseContextLvarHelper(QoreParseContext& parse_context, LVList*& lvars)
209 : parse_context(parse_context), lvars(lvars), lvids(parse_context.lvids) {
210 parse_context.lvids = 0;
213 DLLLOCAL ~QoreParseContextLvarHelper();
216 QoreParseContext& parse_context;
222 DLLLOCAL
int parse_init_value(
QoreValue& val, QoreParseContext& parse_context);
230 DLLLOCAL
bool needs_scan(
const QoreValue& v);
236 hashdecl ParseWarnOptions {
237 int64 parse_options = 0;
240 DLLLOCAL ParseWarnOptions() {
243 DLLLOCAL ParseWarnOptions(
int64 n_parse_options,
int n_warn_mask = 0)
244 : parse_options(n_parse_options), warn_mask(n_warn_mask) {
247 DLLLOCAL
void operator=(
const ParseWarnOptions& pwo) {
248 parse_options = pwo.parse_options;
249 warn_mask = pwo.warn_mask;
252 DLLLOCAL
bool operator==(
const ParseWarnOptions& pwo)
const {
253 return parse_options == pwo.parse_options && warn_mask == pwo.warn_mask;
257 hashdecl QoreProgramLineLocation {
258 int16_t start_line = -1,
262 DLLLOCAL QoreProgramLineLocation(
int sline,
int eline) : start_line(sline ? sline : (eline ? 1 : 0)), end_line(eline) {
263 assert(sline <= 0xffff);
264 assert(eline <= 0xffff);
267 DLLLOCAL QoreProgramLineLocation() {
270 DLLLOCAL QoreProgramLineLocation(
const QoreProgramLineLocation& old) =
default;
272 DLLLOCAL QoreProgramLineLocation(QoreProgramLineLocation&& old) =
default;
275 hashdecl QoreProgramLocation :
public QoreProgramLineLocation {
278 DLLLOCAL QoreProgramLocation() {
281 DLLLOCAL
explicit QoreProgramLocation(
const char* f,
int sline,
int eline,
const char* source,
int offset,
282 const char* lang =
"Qore") :
283 QoreProgramLineLocation(sline, eline), file(f), source(source), lang(lang), offset(offset) {
284 assert(offset <= 0xffff);
287 DLLLOCAL
explicit QoreProgramLocation(
const char* f,
int sline = 0,
int eline = 0) :
288 QoreProgramLineLocation(sline, eline), file(f) {
292 DLLLOCAL QoreProgramLocation(
int sline,
int eline);
294 DLLLOCAL QoreProgramLocation(
const QoreProgramLocation& old) =
default;
296 DLLLOCAL QoreProgramLocation(QoreProgramLocation&& old) =
default;
298 DLLLOCAL
void clear() {
299 start_line = end_line = -1;
305 DLLLOCAL
void toString(
QoreString& str)
const;
307 DLLLOCAL
const char* getFile()
const {
311 DLLLOCAL
const char* getFileValue()
const {
312 return file ? file :
"";
315 DLLLOCAL
const char* getSource()
const {
319 DLLLOCAL
const char* getSourceValue()
const {
320 return source ? source :
"";
323 DLLLOCAL
const char* getLanguage()
const {
327 DLLLOCAL
const char* getLanguageValue()
const {
328 return lang ? lang :
"";
331 DLLLOCAL
void setFile(
const char* f) {
335 DLLLOCAL
void setSource(
const char* s) {
339 DLLLOCAL
void setLanguage(
const char* l) {
343 DLLLOCAL
bool operator<(
const QoreProgramLocation& loc)
const {
344 return start_line < loc.start_line
345 || end_line < loc.end_line
347 || source < loc.source
348 || offset < loc.offset
352 DLLLOCAL
bool operator==(
const QoreProgramLocation& loc)
const {
353 return start_line == loc.start_line
354 && end_line == loc.end_line
356 && source == loc.source
357 && offset == loc.offset
361 DLLLOCAL
bool operator!=(
const QoreProgramLocation& loc)
const {
362 return !(*
this == loc);
366 const char* file =
nullptr;
367 const char* source =
nullptr;
368 const char* lang =
"Qore";
374 DLLLOCAL
extern const QoreProgramLocation loc_builtin;
376 hashdecl QoreCommandLineLocation :
public QoreProgramLocation {
377 DLLLOCAL QoreCommandLineLocation() : QoreProgramLocation(
"<command-line>", 1, 1) {
382 DLLLOCAL
extern QoreCommandLineLocation qoreCommandLineLocation;
385 DLLLOCAL
void parse_error(
const QoreProgramLocation& loc,
const char* fmt, ...);
386 DLLLOCAL
void parseException(
const QoreProgramLocation& loc,
const char* err,
const char* fmt, ...);
387 DLLLOCAL
void parseException(
const QoreProgramLocation& loc,
const char* err,
QoreStringNode* desc);
389 DLLLOCAL
QoreString* findFileInPath(
const char* file,
const char* path);
390 DLLLOCAL
QoreString* findFileInEnvPath(
const char* file,
const char* varname);
391 DLLLOCAL
int qore_find_file_in_path(
QoreString& str,
const char* file,
const char* path);
393 DLLLOCAL
const QoreTypeInfo* getBuiltinUserTypeInfo(
const char* str);
394 DLLLOCAL
const QoreTypeInfo* getBuiltinUserOrNothingTypeInfo(
const char* str);
396 DLLLOCAL
const char* getBuiltinTypeName(
qore_type_t type);
407 #ifdef HAVE_STRTOIMAX
408 static inline long long atoll(
const char* str) {
409 return strtoimax(str, 0, 10);
412 static inline long long atoll(
const char* str) {
414 sscanf(str,
"%lld", &i);
420 #if !defined(HAVE_STRTOLL) && defined(HAVE_STRTOIMAX)
422 #define strtoll strtoimax
430 #ifdef HAVE_OPENSSL_CONST
431 #define OPENSSL_CONST const
433 #define OPENSSL_CONST
436 #ifdef HAVE_X509_GET0_SIGNATURE_CONST
437 #define OPENSSL_X509_GET0_SIGNATURE_CONST const
439 #define OPENSSL_X509_GET0_SIGNATURE_CONST
442 typedef std::set<const AbstractQoreNode*> const_node_set_t;
443 typedef std::set<LocalVar*> lvar_set_t;
445 class LVarSet :
public lvar_set_t {
452 DLLLOCAL LVarSet() : needs_scan(false) {
456 DLLLOCAL
void add(LocalVar* var);
459 DLLLOCAL
bool needsScan()
const {
464 enum obe_type_e { OBE_Unconditional, OBE_Success, OBE_Error };
466 class StatementBlock;
467 typedef std::pair<enum obe_type_e, StatementBlock*> qore_conditional_block_exit_statement_t;
469 typedef std::list<qore_conditional_block_exit_statement_t> block_list_t;
472 typedef std::map<QoreCondition*, int> cond_map_t;
474 #if defined(HAVE_CHECK_STACK_POS)
475 #define QORE_MANAGE_STACK
479 #define DAH_NOCHANGE 0
480 #define DAH_ACQUIRE 1
481 #define DAH_RELEASE 2
484 #define DAH_TEXT(d) (d == DAH_RELEASE ? "RELEASE" : (d == DAH_ACQUIRE ? "ACQUIRE" : "NOCHANGE"))
486 DLLLOCAL
int check_lvalue(
QoreValue n,
bool assign =
true);
488 DLLLOCAL
int check_lvalue_int(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
489 DLLLOCAL
int check_lvalue_float(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
490 DLLLOCAL
int check_lvalue_int_float_number(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
491 DLLLOCAL
int check_lvalue_number(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
493 DLLLOCAL
extern QoreClass* QC_PSEUDOVALUE;
494 DLLLOCAL
extern QoreClass* QC_PSEUDONOTHING;
503 #define Q_SVF_BSIZE 4096
504 #define Q_HAVE_STATVFS
506 unsigned long f_bsize;
507 unsigned long f_frsize;
508 unsigned int f_blocks;
509 unsigned int f_bfree;
510 unsigned int f_bavail;
511 unsigned int f_files;
512 unsigned int f_ffree;
513 unsigned int f_favail;
514 unsigned long f_fsid;
515 unsigned long f_flag;
516 unsigned long f_namemax;
519 f_frsize = f_bsize = Q_SVF_BSIZE;
520 f_blocks = total / Q_SVF_BSIZE;
521 f_bfree = free / Q_SVF_BSIZE;
522 f_bavail = avail / Q_SVF_BSIZE;
524 f_files = f_blocks / 8;
525 f_ffree = f_bfree / 8;
526 f_favail = f_bavail / 8;
532 DLLLOCAL
int statvfs(
const char* path,
struct statvfs* buf);
533 DLLLOCAL
int q_fstatvfs(
const char* filepath,
struct statvfs* buf);
545 for (
auto& i : *value_list) {
566 value_list->push_back(v);
574 class QoreParseListNode;
576 #include "qore/intern/NamedScope.h"
577 #include "qore/intern/QoreTypeInfo.h"
578 #include "qore/intern/ParseNode.h"
579 #include "qore/intern/QoreThreadList.h"
580 #include "qore/intern/lvalue_ref.h"
581 #include "qore/intern/qore_thread_intern.h"
582 #include "qore/intern/Function.h"
583 #include "qore/intern/CallReferenceCallNode.h"
584 #include "qore/intern/CallReferenceNode.h"
585 #include "qore/intern/BuiltinFunction.h"
586 #include "qore/intern/AbstractStatement.h"
587 #include "qore/intern/Variable.h"
588 #include "qore/intern/LocalVar.h"
589 #include "qore/intern/ScopedObjectCallNode.h"
590 #include "qore/intern/NewComplexTypeNode.h"
591 #include "qore/intern/ScopedRefNode.h"
592 #include "qore/intern/ClassRefNode.h"
593 #include "qore/intern/Context.h"
594 #include "qore/intern/BarewordNode.h"
595 #include "qore/intern/SelfVarrefNode.h"
596 #include "qore/intern/StaticClassVarRefNode.h"
597 #include "qore/intern/BackquoteNode.h"
598 #include "qore/intern/ContextrefNode.h"
599 #include "qore/intern/ContextRowNode.h"
600 #include "qore/intern/ComplexContextrefNode.h"
601 #include "qore/intern/FindNode.h"
602 #include "qore/intern/VRMutex.h"
603 #include "qore/intern/VLock.h"
604 #include "qore/intern/QoreException.h"
605 #include "qore/intern/StatementBlock.h"
606 #include "qore/intern/VarRefNode.h"
607 #include "qore/intern/QoreRegexSubst.h"
608 #include "qore/intern/QoreRegex.h"
609 #include "qore/intern/QoreTransliteration.h"
610 #include "qore/intern/ObjectMethodReferenceNode.h"
611 #include "qore/intern/QoreClosureParseNode.h"
612 #include "qore/intern/QoreClosureNode.h"
613 #include "qore/intern/QoreImplicitArgumentNode.h"
614 #include "qore/intern/QoreImplicitElementNode.h"
615 #include "qore/intern/QoreOperatorNode.h"
616 #include "qore/intern/QoreTimeZoneManager.h"
617 #include "qore/intern/ContextStatement.h"
618 #include "qore/intern/SwitchStatement.h"
619 #include "qore/intern/QorePseudoMethods.h"
620 #include "qore/intern/ParseReferenceNode.h"
621 #include "qore/intern/WeakReferenceNode.h"
623 DLLLOCAL
extern std::atomic<bool> qore_initialized;
624 DLLLOCAL
extern std::atomic<bool> qore_shutdown;
625 DLLLOCAL
extern std::atomic<bool> qore_exiting;
627 DLLLOCAL
extern int qore_library_options;
629 #ifndef HAVE_GETHOSTBYADDR_R
636 #define NET_BUFSIZE 1024
639 #ifndef HOSTNAMEBUFSIZE
640 #define HOSTNAMEBUFSIZE 512
643 #ifndef HAVE_LOCALTIME_R
647 #ifndef HAVE_GMTIME_R
651 DLLLOCAL
extern char table64[64];
654 DLLLOCAL
BinaryNode*
parseHex(
const QoreProgramLocation* loc,
const char* buf,
int len);
655 DLLLOCAL
void print_node(FILE* fp,
const QoreValue qv);
656 DLLLOCAL
void delete_global_variables();
657 DLLLOCAL
void init_lib_intern(
char* env[]);
658 DLLLOCAL QoreParseListNode* make_args(
const QoreProgramLocation* loc,
QoreValue arg);
662 DLLLOCAL
void init_qore_types();
663 DLLLOCAL
void delete_qore_types();
665 DLLLOCAL
QoreListNode* stat_to_list(
const struct stat& sbuf);
667 DLLLOCAL
QoreHashNode* statvfs_to_hash(
const struct statvfs& statvfs);
677 DLLLOCAL StaticSystemNamespace();
679 DLLLOCAL ~StaticSystemNamespace();
683 DLLLOCAL
extern StaticSystemNamespace* staticSystemNamespace;
685 class QoreParseListNodeParseInitHelper {
687 DLLLOCAL QoreParseListNodeParseInitHelper(QoreParseListNode* l, QoreParseContext& parse_context) :
688 l(l), parse_context(parse_context) {
695 parse_context.typeInfo =
nullptr;
697 bool err = (bool)parse_init_value(n, parse_context);
704 DLLLOCAL
bool next() {
706 if (pos == (
int)l->size()) {
713 DLLLOCAL
int index() {
717 DLLLOCAL
bool hasError()
const {
722 QoreParseListNode* l;
724 QoreParseContext& parse_context;
728 class QorePossibleListNodeParseInitHelper {
730 DLLLOCAL QorePossibleListNodeParseInitHelper(
QoreValue& n, QoreParseContext& parse_context) :
731 parse_context(parse_context),
737 parse_context.typeInfo =
nullptr;
738 error = parse_init_value(n, parse_context);
742 if (!QoreTypeInfo::parseAccepts(listTypeInfo, parse_context.typeInfo)) {
743 singleTypeInfo = parse_context.typeInfo;
748 DLLLOCAL
bool noArgument()
const {
752 DLLLOCAL
bool next() {
758 if (pos == l->size()) {
765 DLLLOCAL
void parseInit();
767 DLLLOCAL
bool hasError()
const {
772 QoreParseContext& parse_context;
776 const QoreTypeInfo* singleTypeInfo =
nullptr;
780 DLLLOCAL
void raise_nonexistent_method_call_warning(
const QoreProgramLocation* loc,
const QoreClass* qc,
791 class qore_hash_private;
792 class qore_object_private;
795 class hash_assignment_priv {
797 qore_hash_private& h;
799 qore_object_private* o =
nullptr;
801 DLLLOCAL hash_assignment_priv(qore_hash_private& n_h, HashMember* n_om) : h(n_h), om(n_om) {
804 DLLLOCAL hash_assignment_priv(qore_hash_private& n_h,
const char* key,
bool must_already_exist =
false, qore_object_private* obj =
nullptr);
806 DLLLOCAL hash_assignment_priv(
QoreHashNode& n_h,
const char* key,
bool must_already_exist =
false);
808 DLLLOCAL hash_assignment_priv(
QoreHashNode& n_h,
const std::string &key,
bool must_already_exist =
false);
814 DLLLOCAL
void reassign(
const char* key,
bool must_already_exist =
false);
824 DLLLOCAL
bool exists()
const {
841 DLLLOCAL
void qore_machine_backtrace();
843 #ifndef QORE_THREAD_STACK_BLOCK
844 #define QORE_THREAD_STACK_BLOCK 64
847 template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
850 DLLLOCAL ThreadBlock(
const ThreadBlock&);
855 ThreadBlock<T, S1>* prev, * next =
nullptr;
857 DLLLOCAL ThreadBlock(ThreadBlock* prev =
nullptr) : prev(prev) { }
858 DLLLOCAL ~ThreadBlock() { }
859 DLLLOCAL T& get(
int p) {
863 DLLLOCAL
bool frameBoundary(
int p);
866 template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
867 class ThreadLocalDataIterator {
868 typedef ThreadLocalDataIterator<T, S1> self_t;
871 typedef ThreadBlock<T, S1> Block;
874 Block* orig =
nullptr, * curr =
nullptr;
878 DLLLOCAL ThreadLocalDataIterator(Block* n_orig)
879 : orig(n_orig && n_orig->pos ? n_orig : nullptr) {
882 DLLLOCAL ThreadLocalDataIterator() {
885 DLLLOCAL
bool next() {
907 }
while (curr->frameBoundary(pos));
914 return curr->get(pos);
918 template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
919 class ThreadLocalData {
921 typedef ThreadBlock<T, S1> Block;
922 typedef ThreadLocalDataIterator<T, S1> iterator;
926 DLLLOCAL ThreadLocalData() {
931 DLLLOCAL ~ThreadLocalData() {
943 DLLLOCAL
bool empty()
const {
944 return (!curr->pos && !curr->prev);
948 DLLLOCAL
int getFrameCount()
const {
953 int frame_count = -1;
956 DLLLOCAL ThreadLocalData(
const ThreadLocalData&);
960 DLLLOCAL
int q_get_af(
int type);
962 DLLLOCAL
int q_get_raf(
int type);
964 DLLLOCAL
int q_get_sock_type(
int t);
966 class OptHashRefHelper {
976 DLLLOCAL ~OptHashRefHelper() {
997 class VariableBlockHelper {
999 DLLLOCAL VariableBlockHelper();
1000 DLLLOCAL ~VariableBlockHelper();
1003 class ParseOptionMaps {
1005 DLLLOCAL
void doMap(
int64 code,
const char* desc,
const char* dom =
nullptr);
1008 typedef std::map<int64, const char*> pomap_t;
1009 typedef std::map<const char*, int64, ltstr> pormap_t;
1011 pomap_t pomap, dommap;
1012 pormap_t pormap, domrmap;
1014 DLLLOCAL ParseOptionMaps();
1023 DLLLOCAL
extern ParseOptionMaps pomaps;
1027 DLLLOCAL
extern bool q_disable_gc;
1029 DLLLOCAL
QoreValue qore_parse_get_define_value(
const QoreProgramLocation* loc,
const char* str,
QoreString& arg,
1032 #ifndef HAVE_INET_NTOP
1033 DLLLOCAL
const char* inet_ntop(
int af,
const void* src,
char* dst,
size_t size);
1035 #ifndef HAVE_INET_PTON
1036 DLLLOCAL
int inet_pton(
int af,
const char* src,
void* dst);
1044 DLLLOCAL
int check_self_assignment(
const QoreProgramLocation* loc,
QoreValue n, LocalVar* selfid);
1046 DLLLOCAL
void ignore_return_value(QoreSimpleValue& n);
1048 DLLLOCAL
void qore_string_init();
1051 bool with_separator =
false);
1052 DLLLOCAL
QoreListNode* split_intern(
const char* pattern,
size_t pl,
const char* str,
size_t sl,
1057 const QoreString* quote,
bool trim_unquoted, AbstractIteratorHelper* h =
nullptr,
1066 DLLLOCAL
void init_charmaps();
1072 DLLLOCAL
int64 q_clock_getmillis();
1073 DLLLOCAL
int64 q_clock_getmicros();
1074 DLLLOCAL
int64 q_clock_getnanos();
1076 DLLLOCAL
void qore_init_random_salt();
1077 DLLLOCAL
int qore_get_ptr_hash(
QoreString& str,
const void* ptr);
1080 DLLLOCAL
const char* q_find_first_path_sep(
const char* path);
1082 DLLLOCAL
const char* q_find_last_path_sep(
const char* path);
1085 DLLLOCAL
int q_get_mode(
const QoreString& path);
1087 DLLLOCAL
qore_offset_t q_UTF8_get_char_len(
const char* p,
size_t valid_len);
1090 DLLLOCAL
qore_offset_t q_UTF16BE_get_char_len(
const char* p,
size_t valid_len);
1091 DLLLOCAL
qore_offset_t q_UTF16LE_get_char_len(
const char* p,
size_t len);
1099 DLLLOCAL
void* qore_get_in_addr(
struct sockaddr *sa);
1101 DLLLOCAL
size_t qore_get_in_len(
struct sockaddr *sa);
1103 DLLLOCAL
QoreHashNode* get_source_location(
const QoreProgramLocation* loc);
1105 DLLLOCAL
void qore_delete_module_options();
1107 DLLLOCAL
const QoreTypeInfo* qore_get_type_from_string_intern(
const char* str);
DLLEXPORT BinaryNode * parseHex(const char *buf, int len, ExceptionSink *xsink)
parses a string of hex characters and returns a BinaryNode
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:57
holds arbitrary binary data
Definition: BinaryNode.h:41
Holds absolute and relative date/time values in Qore with precision to the microsecond.
Definition: DateTime.h:93
Qore's parse tree/value type for date-time values, reference-counted, dynamically-allocated only.
Definition: DateTimeNode.h:45
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
DLLEXPORT void assimilate(ExceptionSink *xs)
assimilates all entries of the "xs" argument by appending them to the internal list and deletes the "...
use this class to make assignments to hash keys from a pointer to the key value
Definition: QoreHashNode.h:671
class hash_assignment_priv * priv
private implementation
Definition: QoreHashNode.h:764
defines a Qore-language class
Definition: QoreClass.h:239
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:60
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition: QoreProgram.h:127
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
provides a mutually-exclusive thread lock
Definition: QoreThreadLock.h:49
helper class to manage variable references passed to functions and class methods, stack only,...
Definition: QoreTypeSafeReferenceHelper.h:57
DLLLOCAL T * release()
releases the pointer to the caller
Definition: ReferenceHolder.h:83
parse type: reference to a lvalue expression
Definition: ReferenceNode.h:45
the root namespace of a QoreProgram object
Definition: QoreNamespace.h:397
Helps dereference values outside of locks.
Definition: QoreLibIntern.h:537
DLLLOCAL void add(QoreValue v)
adds a value for dereferencing on exit
Definition: QoreLibIntern.h:562
DLLLOCAL ~SafeDerefHelper()
must be destroyed outside of any locks
Definition: QoreLibIntern.h:543
DLLLOCAL void deref(QoreValue v)
dereferences the value immediately if it cannot throw an exception, or adds it to the list for derefe...
Definition: QoreLibIntern.h:553
typed hash declaration
Definition: TypedHashDecl.h:44
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode)
Definition: common.h:70
std::vector< const QoreTypeInfo * > type_vec_t
vector of type information for parameter lists
Definition: common.h:251
qore_license_t
qore library and module license type identifiers
Definition: common.h:85
std::vector< std::string > name_vec_t
vector of parameter names for parameter lists
Definition: common.h:257
intptr_t qore_offset_t
used for offsets that could be negative
Definition: common.h:76
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:260
std::vector< QoreValue > arg_vec_t
vector of value information for default argument lists
Definition: common.h:254
const qore_type_t NT_LIST
type value for QoreListNode
Definition: node_types.h:50
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:54
static const ReferenceNode * test_reference_param(const QoreListNode *n, size_t i)
returns a ReferenceNode pointer for the argument position given or 0 if there is no argument there or...
Definition: params.h:65
DLLEXPORT QoreProgram * getProgram()
returns the current QoreProgram
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275
DLLEXPORT void discard(ExceptionSink *xsink)
dereferences any contained AbstractQoreNode pointer and sets to 0; does not modify other values
DLLEXPORT bool derefCanThrowException() const
returns true if a dereference could theoretically throw an exception (an object is reachable from thi...