32#ifndef _QORE_QORELIBINTERN_H
34#define _QORE_QORELIBINTERN_H
36#include "qore/intern/config.h"
42#include <openssl/crypto.h>
44#if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3
48#ifdef HAVE_SYS_STATVFS_H
50#include <sys/statvfs.h>
57#ifdef HAVE_ARPA_INET_H
60#ifdef HAVE_SYS_SOCKET_H
61#include <sys/socket.h>
66#ifdef HAVE_NETINET_IN_H
67#include <netinet/in.h>
69#ifdef HAVE_ARPA_INET_H
72#ifdef HAVE_SYS_SOCKET_H
73#include <sys/socket.h>
78#ifdef HAVE_ARPA_INET_H
90#ifdef HAVE_NETINET_TCP_H
91#include <netinet/tcp.h>
101#ifndef HAVE_STRCASESTR
102extern char* strcasestr(
const char* s1,
const char* s2);
106#define MPFR_USE_INTMAX_T 1
123static inline bool isoctaldigit(
const char x) {
124 return x >=
'0' && x <=
'7';
132#define NT_SOFTFLOAT -5
133#define NT_SOFTNUMBER -6
134#define NT_SOFTBOOLEAN -7
135#define NT_SOFTSTRING -8
136#define NT_SOFTDATE -9
137#define NT_SOFTLIST -10
138#define NT_TIMEOUT -11
139#define NT_INTORFLOAT -12
140#define NT_INTFLOATORNUMBER -13
141#define NT_FLOATORNUMBER -14
142#define NT_SOFTBINARY -15
143#define NT_HEXBINARY -16
144#define NT_BASE64BINARY -17
146#define NT_SOMETHING -101
149typedef std::set<QoreObject*> obj_set_t;
152DLLLOCAL
extern int qore_ssl_data_index;
155enum q_setpub_t :
unsigned char {
161hashdecl QoreParseContext {
163 LocalVar* oflag =
nullptr;
166 const QoreTypeInfo* typeInfo =
nullptr;
171 DLLLOCAL QoreParseContext(LocalVar* oflag,
QoreProgram* pgm =
getProgram()) : pgm(pgm), oflag(oflag) {
174 DLLLOCAL
int unsetFlags(
int flags) {
180 DLLLOCAL
int setFlags(
int flags) {
187class QoreParseContextFlagHelper {
189 DLLLOCAL QoreParseContextFlagHelper(QoreParseContext& parse_context) : parse_context(parse_context),
190 pflag(parse_context.pflag) {
193 DLLLOCAL ~QoreParseContextFlagHelper() {
194 if (parse_context.pflag != pflag) {
195 parse_context.pflag = pflag;
199 DLLLOCAL
void unsetFlags(
int flags) {
200 parse_context.pflag &= ~flags;
203 DLLLOCAL
void setFlags(
int flags) {
204 parse_context.pflag |= flags;
208 QoreParseContext& parse_context;
212class QoreParseContextLvarHelper {
214 DLLLOCAL QoreParseContextLvarHelper(QoreParseContext& parse_context, LVList*& lvars)
215 : parse_context(parse_context), lvars(lvars), lvids(parse_context.lvids) {
216 parse_context.lvids = 0;
219 DLLLOCAL ~QoreParseContextLvarHelper();
222 QoreParseContext& parse_context;
228DLLLOCAL
int parse_init_value(
QoreValue& val, QoreParseContext& parse_context);
236DLLLOCAL
bool needs_scan(
const QoreValue& v);
242hashdecl ParseWarnOptions {
243 int64 parse_options = 0;
246 DLLLOCAL ParseWarnOptions() {
249 DLLLOCAL ParseWarnOptions(
int64 n_parse_options,
int n_warn_mask = 0)
250 : parse_options(n_parse_options), warn_mask(n_warn_mask) {
253 DLLLOCAL
void operator=(
const ParseWarnOptions& pwo) {
254 parse_options = pwo.parse_options;
255 warn_mask = pwo.warn_mask;
258 DLLLOCAL
bool operator==(
const ParseWarnOptions& pwo)
const {
259 return parse_options == pwo.parse_options && warn_mask == pwo.warn_mask;
263hashdecl QoreProgramLineLocation {
264 int16_t start_line = -1,
268 DLLLOCAL QoreProgramLineLocation(
int sline,
int eline) : start_line(sline ? sline : (eline ? 1 : 0)), end_line(eline) {
269 assert(sline <= 0xffff);
270 assert(eline <= 0xffff);
273 DLLLOCAL QoreProgramLineLocation() {
276 DLLLOCAL QoreProgramLineLocation(
const QoreProgramLineLocation& old) =
default;
278 DLLLOCAL QoreProgramLineLocation(QoreProgramLineLocation&& old) =
default;
281hashdecl QoreProgramLocation :
public QoreProgramLineLocation {
284 DLLLOCAL QoreProgramLocation() {
287 DLLLOCAL
explicit QoreProgramLocation(
const char* f,
int sline,
int eline,
const char* source,
int offset,
288 const char* lang =
"Qore") :
289 QoreProgramLineLocation(sline, eline), file(f), source(source), lang(lang), offset(offset) {
290 assert(offset <= 0xffff);
293 DLLLOCAL
explicit QoreProgramLocation(
const char* f,
int sline = 0,
int eline = 0) :
294 QoreProgramLineLocation(sline, eline), file(f) {
298 DLLLOCAL QoreProgramLocation(
int sline,
int eline);
300 DLLLOCAL QoreProgramLocation(
const QoreProgramLocation& old) =
default;
302 DLLLOCAL QoreProgramLocation(QoreProgramLocation&& old) =
default;
304 DLLLOCAL
void clear() {
305 start_line = end_line = -1;
311 DLLLOCAL
void toString(
QoreString& str)
const;
313 DLLLOCAL
const char* getFile()
const {
317 DLLLOCAL
const char* getFileValue()
const {
318 return file ? file :
"";
321 DLLLOCAL
const char* getSource()
const {
325 DLLLOCAL
const char* getSourceValue()
const {
326 return source ? source :
"";
329 DLLLOCAL
const char* getLanguage()
const {
333 DLLLOCAL
const char* getLanguageValue()
const {
334 return lang ? lang :
"";
337 DLLLOCAL
void setFile(
const char* f) {
341 DLLLOCAL
void setSource(
const char* s) {
345 DLLLOCAL
void setLanguage(
const char* l) {
349 DLLLOCAL
bool operator<(
const QoreProgramLocation& loc)
const {
350 return start_line < loc.start_line
351 || end_line < loc.end_line
353 || source < loc.source
354 || offset < loc.offset
358 DLLLOCAL
bool operator==(
const QoreProgramLocation& loc)
const {
359 return start_line == loc.start_line
360 && end_line == loc.end_line
362 && source == loc.source
363 && offset == loc.offset
367 DLLLOCAL
bool operator!=(
const QoreProgramLocation& loc)
const {
368 return !(*
this == loc);
372 const char* file =
nullptr;
373 const char* source =
nullptr;
374 const char* lang =
"Qore";
380DLLLOCAL
extern const QoreProgramLocation loc_builtin;
382hashdecl QoreCommandLineLocation :
public QoreProgramLocation {
383 DLLLOCAL QoreCommandLineLocation() : QoreProgramLocation(
"<command-line>", 1, 1) {
388DLLLOCAL
extern QoreCommandLineLocation qoreCommandLineLocation;
391DLLLOCAL
void parse_error(
const QoreProgramLocation& loc,
const char* fmt, ...);
392DLLLOCAL
void parseException(
const QoreProgramLocation& loc,
const char* err,
const char* fmt, ...);
393DLLLOCAL
void parseException(
const QoreProgramLocation& loc,
const char* err,
QoreStringNode* desc);
395DLLLOCAL
QoreString* findFileInPath(
const char* file,
const char* path);
396DLLLOCAL
QoreString* findFileInEnvPath(
const char* file,
const char* varname);
397DLLLOCAL
int qore_find_file_in_path(
QoreString& str,
const char* file,
const char* path);
399DLLLOCAL
const QoreTypeInfo* getBuiltinUserTypeInfo(
const char* str);
400DLLLOCAL
const QoreTypeInfo* getBuiltinUserOrNothingTypeInfo(
const char* str);
402DLLLOCAL
const char* getBuiltinTypeName(
qore_type_t type);
414static inline long long atoll(
const char* str) {
415 return strtoimax(str, 0, 10);
418static inline long long atoll(
const char* str) {
420 sscanf(str,
"%lld", &i);
426#if !defined(HAVE_STRTOLL) && defined(HAVE_STRTOIMAX)
428#define strtoll strtoimax
436#ifdef HAVE_OPENSSL_CONST
437#define OPENSSL_CONST const
442#ifdef HAVE_X509_GET0_SIGNATURE_CONST
443#define OPENSSL_X509_GET0_SIGNATURE_CONST const
445#define OPENSSL_X509_GET0_SIGNATURE_CONST
448typedef std::set<const AbstractQoreNode*> const_node_set_t;
449typedef std::set<LocalVar*> lvar_set_t;
451class LVarSet :
public lvar_set_t {
458 DLLLOCAL LVarSet() : needs_scan(false) {
462 DLLLOCAL
void add(LocalVar* var);
465 DLLLOCAL
bool needsScan()
const {
470enum obe_type_e { OBE_Unconditional, OBE_Success, OBE_Error };
473typedef std::pair<enum obe_type_e, StatementBlock*> qore_conditional_block_exit_statement_t;
475typedef std::list<qore_conditional_block_exit_statement_t> block_list_t;
478typedef std::map<QoreCondition*, int> cond_map_t;
480#if defined(HAVE_CHECK_STACK_POS)
481#define QORE_MANAGE_STACK
485#define DAH_NOCHANGE 0
490#define DAH_TEXT(d) (d == DAH_RELEASE ? "RELEASE" : (d == DAH_ACQUIRE ? "ACQUIRE" : "NOCHANGE"))
492DLLLOCAL
int check_lvalue(
QoreValue n,
bool assign =
true);
494DLLLOCAL
int check_lvalue_int(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
495DLLLOCAL
int check_lvalue_float(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
496DLLLOCAL
int check_lvalue_int_float_number(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
497DLLLOCAL
int check_lvalue_number(
const QoreProgramLocation* loc,
const QoreTypeInfo*& typeInfo,
const char* name);
499DLLLOCAL
extern QoreClass* QC_PSEUDOVALUE;
500DLLLOCAL
extern QoreClass* QC_PSEUDONOTHING;
509#define Q_SVF_BSIZE 4096
510#define Q_HAVE_STATVFS
512 unsigned long f_bsize;
513 unsigned long f_frsize;
514 unsigned int f_blocks;
515 unsigned int f_bfree;
516 unsigned int f_bavail;
517 unsigned int f_files;
518 unsigned int f_ffree;
519 unsigned int f_favail;
520 unsigned long f_fsid;
521 unsigned long f_flag;
522 unsigned long f_namemax;
525 f_frsize = f_bsize = Q_SVF_BSIZE;
526 f_blocks = total / Q_SVF_BSIZE;
527 f_bfree = free / Q_SVF_BSIZE;
528 f_bavail = avail / Q_SVF_BSIZE;
530 f_files = f_blocks / 8;
531 f_ffree = f_bfree / 8;
532 f_favail = f_bavail / 8;
538DLLLOCAL
int statvfs(
const char* path,
struct statvfs* buf);
539DLLLOCAL
int q_fstatvfs(
const char* filepath,
struct statvfs* buf);
551 for (
auto& i : *value_list) {
572 value_list->push_back(v);
580class QoreParseListNode;
582#include "qore/intern/NamedScope.h"
583#include "qore/intern/QoreTypeInfo.h"
584#include "qore/intern/ParseNode.h"
585#include "qore/intern/QoreThreadList.h"
586#include "qore/intern/lvalue_ref.h"
587#include "qore/intern/qore_thread_intern.h"
588#include "qore/intern/Function.h"
589#include "qore/intern/CallReferenceCallNode.h"
590#include "qore/intern/CallReferenceNode.h"
591#include "qore/intern/BuiltinFunction.h"
592#include "qore/intern/AbstractStatement.h"
593#include "qore/intern/Variable.h"
594#include "qore/intern/LocalVar.h"
595#include "qore/intern/ScopedObjectCallNode.h"
596#include "qore/intern/NewComplexTypeNode.h"
597#include "qore/intern/ScopedRefNode.h"
598#include "qore/intern/ClassRefNode.h"
599#include "qore/intern/Context.h"
600#include "qore/intern/BarewordNode.h"
601#include "qore/intern/SelfVarrefNode.h"
602#include "qore/intern/StaticClassVarRefNode.h"
603#include "qore/intern/BackquoteNode.h"
604#include "qore/intern/ContextrefNode.h"
605#include "qore/intern/ContextRowNode.h"
606#include "qore/intern/ComplexContextrefNode.h"
607#include "qore/intern/FindNode.h"
608#include "qore/intern/VRMutex.h"
609#include "qore/intern/VLock.h"
610#include "qore/intern/QoreException.h"
611#include "qore/intern/StatementBlock.h"
612#include "qore/intern/VarRefNode.h"
613#include "qore/intern/QoreRegexSubst.h"
614#include "qore/intern/QoreRegex.h"
615#include "qore/intern/QoreTransliteration.h"
616#include "qore/intern/ObjectMethodReferenceNode.h"
617#include "qore/intern/QoreClosureParseNode.h"
618#include "qore/intern/QoreClosureNode.h"
619#include "qore/intern/QoreImplicitArgumentNode.h"
620#include "qore/intern/QoreImplicitElementNode.h"
621#include "qore/intern/QoreOperatorNode.h"
622#include "qore/intern/QoreTimeZoneManager.h"
623#include "qore/intern/ContextStatement.h"
624#include "qore/intern/SwitchStatement.h"
625#include "qore/intern/QorePseudoMethods.h"
626#include "qore/intern/ParseReferenceNode.h"
627#include "qore/intern/WeakReferenceNode.h"
628#include "qore/intern/QoreEllipsesNode.h"
630DLLLOCAL
extern std::atomic<bool> qore_initialized;
631DLLLOCAL
extern std::atomic<bool> qore_shutdown;
632DLLLOCAL
extern std::atomic<bool> qore_exiting;
634DLLLOCAL
extern int qore_library_options;
636#ifndef HAVE_GETHOSTBYADDR_R
643#define NET_BUFSIZE 1024
646#ifndef HOSTNAMEBUFSIZE
647#define HOSTNAMEBUFSIZE 512
650#ifndef HAVE_LOCALTIME_R
658DLLLOCAL
extern char table64[64];
661DLLLOCAL
BinaryNode* parseHex(
const QoreProgramLocation* loc,
const char* buf,
int len);
662DLLLOCAL
void print_node(FILE* fp,
const QoreValue qv);
663DLLLOCAL
void delete_global_variables();
664DLLLOCAL
void init_lib_intern(
char* env[]);
665DLLLOCAL QoreParseListNode* make_args(
const QoreProgramLocation* loc,
QoreValue arg);
669DLLLOCAL
void init_qore_types();
670DLLLOCAL
void delete_qore_types();
672DLLLOCAL
QoreListNode* stat_to_list(
const struct stat& sbuf);
674DLLLOCAL
QoreHashNode* statvfs_to_hash(
const struct statvfs& statvfs);
684 DLLLOCAL StaticSystemNamespace();
686 DLLLOCAL ~StaticSystemNamespace();
690DLLLOCAL
extern StaticSystemNamespace* staticSystemNamespace;
692class QoreParseListNodeParseInitHelper {
694 DLLLOCAL QoreParseListNodeParseInitHelper(QoreParseListNode* l) : l(l) {
697 DLLLOCAL
QoreValue parseInit(QoreParseContext& parse_context) {
701 parse_context.typeInfo =
nullptr;
703 int pflag = parse_context.setFlags(PF_FOR_ASSIGNMENT);
704 bool err = (bool)parse_init_value(n, parse_context);
705 parse_context.pflag = pflag;
712 DLLLOCAL
bool next() {
714 if (pos == (
int)l->size()) {
721 DLLLOCAL
int index() {
725 DLLLOCAL
bool hasError()
const {
730 QoreParseListNode* l;
735class QorePossibleListNodeParseInitHelper {
737 DLLLOCAL QorePossibleListNodeParseInitHelper(
QoreValue& n, QoreParseContext& parse_context) {
740 parse_context.typeInfo =
nullptr;
741 error = parse_init_value(n, parse_context);
748 pl = n.
get<QoreParseListNode>();
755 if (!QoreTypeInfo::parseAccepts(listTypeInfo, parse_context.typeInfo)) {
756 singleTypeInfo = parse_context.typeInfo;
761 DLLLOCAL
bool noArgument()
const {
765 DLLLOCAL
bool next() {
770 if (++pos == sizeIntern()) {
777 DLLLOCAL
size_t size()
const {
778 return finished ? 1 : sizeIntern();
781 DLLLOCAL
void parseInit(QoreParseContext& parse_context);
783 DLLLOCAL
bool hasError()
const {
789 QoreParseListNode* pl =
nullptr;
790 bool finished =
true;
792 const QoreTypeInfo* singleTypeInfo =
nullptr;
795 DLLLOCAL
size_t sizeIntern()
const {
796 return l ? l->
size() : pl->size();
800DLLLOCAL
void raise_nonexistent_method_call_warning(
const QoreProgramLocation* loc,
const QoreClass* qc,
811class qore_hash_private;
812class qore_object_private;
815class hash_assignment_priv {
817 qore_hash_private& h;
818 HashMember* om =
nullptr;
819 qore_object_private* o =
nullptr;
821 DLLLOCAL hash_assignment_priv(qore_hash_private& n_h, HashMember* n_om) : h(n_h), om(n_om) {
824 DLLLOCAL hash_assignment_priv(qore_hash_private& n_h,
const char* key,
bool must_already_exist =
false,
825 qore_object_private* obj =
nullptr);
827 DLLLOCAL hash_assignment_priv(
QoreHashNode& n_h,
const char* key,
bool must_already_exist =
false);
829 DLLLOCAL hash_assignment_priv(
QoreHashNode& n_h,
const std::string &key,
bool must_already_exist =
false);
832 bool must_already_exist =
false);
835 bool must_already_exist =
false);
837 DLLLOCAL
void reassign(
const char* key,
bool must_already_exist =
false);
839 DLLLOCAL
const char* getKey()
const;
849 DLLLOCAL
bool exists()
const {
866DLLLOCAL
void qore_machine_backtrace();
868#ifndef QORE_THREAD_STACK_BLOCK
869#define QORE_THREAD_STACK_BLOCK 64
872template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
875 DLLLOCAL ThreadBlock(
const ThreadBlock&);
880 ThreadBlock<T, S1>* prev, * next =
nullptr;
882 DLLLOCAL ThreadBlock(ThreadBlock* prev =
nullptr) : prev(prev) { }
883 DLLLOCAL ~ThreadBlock() { }
884 DLLLOCAL T& get(
int p) {
888 DLLLOCAL
bool frameBoundary(
int p);
891template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
892class ThreadLocalDataIterator {
893 typedef ThreadLocalDataIterator<T, S1> self_t;
896 typedef ThreadBlock<T, S1> Block;
899 Block* orig =
nullptr, * curr =
nullptr;
903 DLLLOCAL ThreadLocalDataIterator(Block* n_orig)
904 : orig(n_orig && n_orig->pos ? n_orig : nullptr) {
907 DLLLOCAL ThreadLocalDataIterator() {
910 DLLLOCAL
bool next() {
932 }
while (curr->frameBoundary(pos));
939 return curr->get(pos);
943template <
typename T,
int S1 = QORE_THREAD_STACK_BLOCK>
944class ThreadLocalData {
946 typedef ThreadBlock<T, S1> Block;
947 typedef ThreadLocalDataIterator<T, S1> iterator;
951 DLLLOCAL ThreadLocalData() {
956 DLLLOCAL ~ThreadLocalData() {
968 DLLLOCAL
bool empty()
const {
969 return (!curr->pos && !curr->prev);
973 DLLLOCAL
int getFrameCount()
const {
978 int frame_count = -1;
981 DLLLOCAL ThreadLocalData(
const ThreadLocalData&);
985DLLLOCAL
int q_get_af(
int type);
987DLLLOCAL
int q_get_raf(
int type);
989DLLLOCAL
int q_get_sock_type(
int t);
991class OptHashRefHelper {
1001 DLLLOCAL ~OptHashRefHelper() {
1022class VariableBlockHelper {
1024 DLLLOCAL VariableBlockHelper();
1025 DLLLOCAL ~VariableBlockHelper();
1028class ParseOptionMaps {
1030 DLLLOCAL
void doMap(
int64 code,
const char* desc,
const char* dom =
nullptr);
1033 typedef std::map<int64, const char*> pomap_t;
1034 typedef std::map<const char*, int64, ltstr> pormap_t;
1036 pomap_t pomap, dommap;
1037 pormap_t pormap, domrmap;
1039 DLLLOCAL ParseOptionMaps();
1048DLLLOCAL
extern ParseOptionMaps pomaps;
1052DLLLOCAL
extern bool q_disable_gc;
1054DLLLOCAL
QoreValue qore_parse_get_define_value(
const QoreProgramLocation* loc,
const char* str,
QoreString& arg,
1057#ifndef HAVE_INET_NTOP
1058DLLLOCAL
const char* inet_ntop(
int af,
const void* src,
char* dst,
size_t size);
1060#ifndef HAVE_INET_PTON
1061DLLLOCAL
int inet_pton(
int af,
const char* src,
void* dst);
1069DLLLOCAL
int check_self_assignment(
const QoreProgramLocation* loc,
QoreValue n, LocalVar* selfid);
1073DLLLOCAL
void qore_string_init();
1076 bool with_separator =
false);
1077DLLLOCAL
QoreListNode* split_intern(
const char* pattern,
size_t pl,
const char* str,
size_t sl,
1082 const QoreString* quote,
bool trim_unquoted, AbstractIteratorHelper* h =
nullptr,
1091DLLLOCAL
void init_charmaps();
1097DLLLOCAL
int64 q_clock_getmillis();
1098DLLLOCAL
int64 q_clock_getmicros();
1099DLLLOCAL
int64 q_clock_getnanos();
1101DLLLOCAL
void qore_init_random_salt();
1102DLLLOCAL
int qore_get_ptr_hash(
QoreString& str,
const void* ptr);
1105DLLLOCAL
const char* q_find_first_path_sep(
const char* path);
1107DLLLOCAL
const char* q_find_last_path_sep(
const char* path);
1110DLLLOCAL
int q_get_mode(
const QoreString& path);
1112DLLLOCAL
qore_offset_t q_UTF8_get_char_len(
const char* p,
size_t valid_len);
1115DLLLOCAL
qore_offset_t q_UTF16BE_get_char_len(
const char* p,
size_t valid_len);
1116DLLLOCAL
qore_offset_t q_UTF16LE_get_char_len(
const char* p,
size_t len);
1124DLLLOCAL
void* qore_get_in_addr(
struct sockaddr *sa);
1126DLLLOCAL
size_t qore_get_in_len(
struct sockaddr *sa);
1128DLLLOCAL
QoreHashNode* get_source_location(
const QoreProgramLocation* loc);
1130DLLLOCAL
void qore_delete_module_options();
1132DLLLOCAL
const QoreTypeInfo* qore_get_type_from_string_intern(
const char* str);
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:50
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:698
class hash_assignment_priv * priv
private implementation
Definition: QoreHashNode.h:798
defines a Qore-language class
Definition: QoreClass.h:253
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
DLLEXPORT size_t size() const
returns the number of elements in the list
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:128
Base value class; parent of QoreValue; designed to be passed by value.
Definition: QoreValue.h:113
DLLLOCAL detail::QoreValueCastHelper< T >::Result get()
returns the value as the given type
Definition: QoreValue.h:214
DLLEXPORT qore_type_t getType() const
returns the type of value contained
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
a templated class to manage a reference count of an object that can throw a Qore-language exception w...
Definition: ReferenceHolder.h:52
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:543
DLLLOCAL void add(QoreValue v)
adds a value for dereferencing on exit
Definition: QoreLibIntern.h:568
DLLLOCAL ~SafeDerefHelper()
must be destroyed outside of any locks
Definition: QoreLibIntern.h:549
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:559
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
const qore_type_t NT_PARSE_LIST
type value for QoreParseListNode
Definition: node_types.h:84
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:276
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...