34 #ifndef _QORE_GLOBALVARIABLELIST_H
36 #define _QORE_GLOBALVARIABLELIST_H
38 #include "qore/intern/Variable.h"
43 #include <qore/vector_map>
44 typedef vector_map_t<const char*, Var*> map_var_t;
60 class GlobalVariableList {
66 DLLLOCAL GlobalVariableList() {
69 DLLLOCAL GlobalVariableList(
const GlobalVariableList& old,
int64 po);
71 DLLLOCAL
void mergePublic(
const GlobalVariableList& old);
73 DLLLOCAL ~GlobalVariableList() {
83 DLLLOCAL Var*
import(Var* var,
ExceptionSink* xsink,
bool readonly =
false);
85 DLLLOCAL Var* runtimeCreateVar(
const char* name,
const QoreTypeInfo* typeInfo,
bool builtin =
false);
87 DLLLOCAL Var* parseFindVar(
const char* name);
88 DLLLOCAL Var* parseCreatePendingVar(
const QoreProgramLocation* loc,
const char* name,
const QoreTypeInfo* typeInfo);
89 DLLLOCAL
const Var* parseFindVar(
const char* name)
const;
91 DLLLOCAL
void parseAdd(Var* v);
96 DLLLOCAL Var* runtimeFindVar(
const char* name)
const {
97 map_var_t::const_iterator i = vmap.find(name);
98 return i != vmap.end() ? i->second :
nullptr;
103 DLLLOCAL
void getGlobalVars(
const std::string& path,
QoreHashNode& h)
const;
105 DLLLOCAL
void parseInit();
106 DLLLOCAL
void reset();