Qore Programming Language Reference Manual  1.0.8
QC_Program.dox.h
1 
3 namespace Qore {
5 
10  bool builtin;
12  int endline;
14  *string file;
16  int line;
18  int offset;
20  *string source;
21 };
22 }
23 
25 namespace Qore {
27 
56 class Program {
57 
58 public:
60 
78 auto callFunction(string name, ...);
79 
80 public:
82 
100 auto callFunctionArgs(string name, *softlist<auto> vargs);
101 
102 public:
104 
128 auto callStaticMethod(string class_name, string method, ...);
129 
130 public:
132 
156 auto callStaticMethodArgs(string class_name, string method, *softlist<auto> call_args);
157 
158 public:
160 
188  constructor(softint po = PO_DEFAULT);
189 
190 public:
192 
194  copy();
195 
196 public:
198 
206 nothing define(string def, auto val);
207 
208 public:
210 /***/
211  destructor();
212 
213 public:
215 
230 nothing disableParseOptions(softint opt);
231 
232 public:
234 
249 bool existsFunction(string name);
250 
251 public:
253 
265 list<hash<auto>> findFunctionVariants(string function);
266 
267 public:
269 
283 *hash<auto> getAllDefines();
284 
285 public:
287 
313 code getCallReference(string identifier);
314 
315 public:
317 
331 auto getDefine(string def);
332 
333 public:
335 
340 Expression getExpression(string source, string label);
341 
342 public:
344 
351 list<string> getFeatureList();
352 
353 public:
355 
366 auto getGlobalVariable(string varname, *reference<bool> rexists);
367 
368 public:
370 
384 hash<auto> getGlobalVars();
385 
386 public:
388 
400 list<string> getParseOptionStringList();
401 
402 public:
404 
414 int getParseOptions();
415 
416 public:
418 
426 
427 public:
429 
437 int getProgramId();
438 
439 public:
441 
453 *string getScriptDir();
454 
455 public:
457 
469 *string getScriptName();
470 
471 public:
473 
485 *string getScriptPath();
486 
487 public:
489 
501 list<int> getThreadList();
502 
503 public:
505 
516 
517 public:
519 
531 softlist<string> getUserFunctionList();
532 
533 public:
535 
562 nothing importClass(string cls, *string new_name, *softbool inject, int module_visibility = CSP_UNCHANGED);
563 
564 public:
566 
581 nothing importFunction(string func);
582 
583 public:
585 
612 nothing importFunction(string func, string new_name, *softbool inject);
613 
614 public:
616 
629 nothing importGlobalVariable(string varname, bool readonly = False);
630 
631 public:
633 
648 nothing importHashDecl(string name, *string new_name);
649 
650 public:
652 
663  importSystemApi();
664 
665 public:
667 
679 
680 public:
682 
694 
695 public:
697 
709 
710 public:
712 
724 
725 public:
727 
741 bool isDefined(string def);
742 
743 public:
745 
760 nothing issueModuleCmd(string module, string cmd);
761 
762 public:
764 
791  loadApplyToPrivateUserModule(string name, int warning_mask = WARN_MODULES);
792 
793 public:
795 
824 *hash<ExceptionInfo> loadApplyToPrivateUserModuleWarn(string name, int warning_mask = WARN_MODULES);
825 
826 public:
828 
859  loadApplyToUserModule(string name, *softbool reinject, int warning_mask = WARN_MODULES, bool reexport = False);
860 
861 public:
863 
896 *hash<ExceptionInfo> loadApplyToUserModuleWarn(string name, *softbool reinject, int warning_mask = WARN_MODULES, bool reexport = False);
897 
898 public:
900 
932  loadModule(string name, int warning_mask = WARN_MODULES);
933 
934 public:
936 
968 *hash<ExceptionInfo> loadModuleWarn(string name, int warning_mask = WARN_MODULES);
969 
970 public:
972 
1006  loadUserModuleWithProgram(string name, Qore::Program pgm, int warning_mask = WARN_MODULES);
1007 
1008 public:
1010 
1044 *hash<ExceptionInfo> loadUserModuleWithProgramWarn(string name, Qore::Program pgm, int warning_mask = WARN_MODULES);
1045 
1046 public:
1048 
1053 nothing lockOptions();
1054 
1055 public:
1057 
1101 *hash<ExceptionInfo> parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1102 
1103 public:
1105 
1128 nothing parseCommit();
1129 
1130 public:
1132 
1159 *hash<ExceptionInfo> parseCommit(int warning_mask);
1160 
1161 public:
1163 
1210 *hash<ExceptionInfo> parsePending(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1211 
1212 public:
1214 
1227 nothing parseRollback();
1228 
1229 public:
1231 
1245 nothing replaceParseOptions(softint opt);
1246 
1247 public:
1249 
1256 auto run();
1257 
1258 public:
1260 
1276 nothing setGlobalVarValue(string name, auto value);
1277 
1278 public:
1280 
1295 nothing setParseOptions(softint opt = PO_DEFAULT);
1296 
1297 public:
1299 
1306 nothing setScriptPath(*string path);
1307 
1308 public:
1310 
1330 bool setThreadInit(*code init);
1331 
1332 public:
1334 
1342 nothing setTimeZone(TimeZone zone);
1343 
1344 public:
1346 
1357 nothing setTimeZoneRegion(string region);
1358 
1359 public:
1361 
1379 nothing setTimeZoneUTCOffset(softint seconds_east);
1380 
1381 public:
1383 
1390 nothing undefine(string def);
1391 };
1397 
1399  const CSP_SETPRIV = CSP_SETPRIV;
1411 
1413 
1418  const DOM_DATABASE = QDOM_DATABASE;
1420 
1422  const DOM_DEBUGGER = QDOM_DEBUGGER;
1424 
1426  const DOM_EMBEDDED_LOGIC = QDOM_EMBEDDED_LOGIC;
1428 
1432  const DOM_EXTERNAL_INFO = QDOM_EXTERNAL_INFO;
1434 
1438  const DOM_EXTERNAL_PROCESS = QDOM_EXTERNAL_PROCESS;
1440 
1444  const DOM_FILESYSTEM = QDOM_FILESYSTEM;
1446 
1450  const DOM_GUI = QDOM_GUI;
1452 
1454  const DOM_INJECTION = QDOM_INJECTION;
1456 
1460  const DOM_LOCALE_CONTROL = QDOM_LOCALE_CONTROL;
1462 
1466  const DOM_MODULE = QDOM_MODULES;
1468 
1472  const DOM_NETWORK = QDOM_NETWORK;
1474 
1478  const DOM_PROCESS_CONTROL = QDOM_PROCESS;
1480 
1482  const DOM_REFLECTION = QDOM_REFLECTION;
1484 
1488  const DOM_TERMINAL_IO = QDOM_TERMINAL_IO;
1490 
1494  const DOM_THREAD_CLASS = QDOM_THREAD_CLASS;
1496 
1500  const DOM_THREAD_CONTROL = QDOM_THREAD_CONTROL;
1502 
1506  const DOM_THREAD_INFO = QDOM_THREAD_INFO;
1508 
1512  const DOM_UNCONTROLLED_API = QDOM_UNCONTROLLED_API;
1517 
1519 
1524  const DomainCodeMap = qore(pomaps.getDomainToStringMap());
1526 
1530  const DomainStringMap = qore(pomaps.getStringToDomainMap());
1532 
1538 
1543 
1551 
1557 
1562 
1568 
1574 
1580 
1586 
1592 
1598 
1604 
1610 
1616 
1622 
1630 
1634 
1638 
1644 
1649 
1655 
1670 
1675 
1680 
1685 
1690 
1698 
1704 
1709 
1714 
1719 
1724 
1731 
1735 
1741 
1747 
1753 
1757 
1763 
1771 
1775 
1781 
1786 
1791 
1796 
1801 
1810 
1815 
1820 
1825 
1835 
1840 
1845 
1850 
1856 
1861 
1866 
1871 
1876 
1881 
1887 
1897 
1902 
1908 
1913 
1921 
1928 
1934 
1940 
1946 
1952 
1956  const ParseOptionCmdCodeMap = qore(ParseOptionMap::getCodeToStringMap());
1958 
1962  const ParseOptionCmdStringMap = qore(ParseOptionMap::getStringToCodeMap());
1964 
1968  const ParseOptionCodeMap = qore(pomaps.getCodeToStringMap());
1970 
1974  const ParseOptionStringMap = qore(pomaps.getStringToCodeMap());
1979 
1981  const WARN_ALL = QP_WARN_ALL;
1984 
1988  const WARN_BROKEN_LOGIC_PRECEDENCE = QP_WARN_BROKEN_LOGIC_PRECEDENCE;
1990 
1992  const WARN_CALL_WITH_TYPE_ERRORS = QP_WARN_CALL_WITH_TYPE_ERRORS;
1994 
2007  const WARN_DEFAULT = QP_WARN_DEFAULT;
2009 
2011  const WARN_DEPRECATED = QP_WARN_DEPRECATED;
2013 
2015  const WARN_DUPLICATE_BLOCK_VARS = QP_WARN_DUPLICATE_BLOCK_VARS;
2017 
2019  const WARN_DUPLICATE_GLOBAL_VARS = QP_WARN_DUPLICATE_GLOBAL_VARS;
2021 
2023  const WARN_DUPLICATE_HASH_KEY = QP_WARN_DUPLICATE_HASH_KEY;
2025 
2027  const WARN_DUPLICATE_LOCAL_VARS = QP_WARN_DUPLICATE_LOCAL_VARS;
2029 
2031  const WARN_EXCESS_ARGS = QP_WARN_EXCESS_ARGS;
2033 
2039  const WARN_INVALID_CATCH = QP_WARN_INVALID_CATCH;
2041 
2043  const WARN_INVALID_OPERATION = QP_WARN_INVALID_OPERATION;
2045 
2056  const WARN_MODULES = QP_WARN_MODULES;
2058  const WARN_NONE = QP_WARN_NONE;
2060 
2064  const WARN_NONEXISTENT_METHOD_CALL = QP_WARN_NONEXISTENT_METHOD_CALL;
2066 
2068  const WARN_RETURN_VALUE_IGNORED = QP_WARN_RETURN_VALUE_IGNORED;
2070 
2072  const WARN_UNDECLARED_VAR = QP_WARN_UNDECLARED_VAR;
2074 
2076  const WARN_UNKNOWN_WARNING = QP_WARN_UNKNOWN_WARNING;
2078 
2080  const WARN_UNREACHABLE_CODE = QP_WARN_UNREACHABLE_CODE;
2082 
2084  const WARN_UNREFERENCED_VARIABLE = QP_WARN_UNREFERENCED_VARIABLE;
2086 
2088  const WARN_WARNING_MASK_UNCHANGED = QP_WARN_WARNING_MASK_UNCHANGED;
2090 }
const PO_BROKEN_LOOP_STATEMENT
allows for old pre-Qore 0.8.13 handling of break and continue
Definition: QC_Program.dox.h:1602
const PO_NEW_STYLE
Set a more C++ or Java type programming style; prohibits usage of the "$" character and also assumes ...
Definition: QC_Program.dox.h:1653
nothing importGlobalVariable(string varname, bool readonly=False)
Imports a global variable into the program object&#39;s space.
const PO_NO_USER_CLASSES
Prohibits user classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1900
const WARN_UNREACHABLE_CODE
Indicates that code cannot be reached (for example; code in the same local block after an uncondition...
Definition: QC_Program.dox.h:2080
*string getScriptPath()
Returns the current script directory and filename if known, otherwise returns NOTHING.
auto callStaticMethod(string class_name, string method,...)
Calls a static method of an object, passing the arguments to the function as arguments to the method...
const DOM_EXTERNAL_INFO
provides access to external information (ex: hostname, pid, process uid, etc)
Definition: QC_Program.dox.h:1432
const DomainStringMap
Maps from functional domain strings to functional domain bitfield integer codes.
Definition: QC_Program.dox.h:1530
const PO_LOCK_WARNINGS
Disallows changes to the warning mask.
Definition: QC_Program.dox.h:1647
const WARN_DUPLICATE_BLOCK_VARS
Enables a warning when a program declares a local variable more than once in the same block; note tha...
Definition: QC_Program.dox.h:2015
importSystemClasses()
imports system classes into a Program container at runtime; will throw an exception if the Program wa...
TimeZone getTimeZone()
Returns the default local time zone for the object.
*string source
the source object or file name tag (used when multiple source objects are defined from the same sourc...
Definition: QC_Program.dox.h:20
const PO_NO_THREAD_CLASSES
Disallows access to any thread classes.
Definition: QC_Program.dox.h:1859
Expression getExpression(string source, string label)
returns an expression object for the given source code
auto callFunction(string name,...)
Calls a function in the program object and returns the return value.
const PO_NO_SUBROUTINE_DEFS
Disallows subroutine (function) definitions.
Definition: QC_Program.dox.h:1823
const PO_NO_REFLECTION
Disallows access to reflection.
Definition: QC_Program.dox.h:1818
const DOM_THREAD_CONTROL
provides the ability to check or manipulate threads (including starting new threads) ...
Definition: QC_Program.dox.h:1500
const PO_FREE_OPTIONS
mask of options that have no effect on code access or code safety but just affect programming style ...
Definition: QC_Program.dox.h:1632
nothing importHashDecl(string name, *string new_name)
Imports a typed hash declaration into the program object&#39;s space.
nothing setParseOptions(softint opt=PO_DEFAULT)
Sets parse options in the parse option mask for the Program object.
const ParseOptionCmdStringMap
Maps from parse option strings to parse option integer codes. Names are in form used in script or on ...
Definition: QC_Program.dox.h:1962
const PO_NO_EXTERNAL_ACCESS
Prohibits any external access.
Definition: QC_Program.dox.h:1702
const DOM_INJECTION
provides functionality related to code / dependency injection
Definition: QC_Program.dox.h:1454
const DOM_THREAD_INFO
provides access to information regarding threading (tid, active threads, etc)
Definition: QC_Program.dox.h:1506
const PO_BROKEN_RANGE
allows for old pre-Qore 0.9.5 handling of range() and xrange()
Definition: QC_Program.dox.h:1614
Program objects allow Qore programs to support subprograms with the option to restrict capabilities...
Definition: QC_Program.dox.h:56
const WARN_NONEXISTENT_METHOD_CALL
Indicates that the embedded code is calling an unknown method in a class.
Definition: QC_Program.dox.h:2064
*hash< auto > getAllDefines()
Retrieves all parse defines in the current Program.
const PO_NO_NEW
Disallows use of the new operator.
Definition: QC_Program.dox.h:1808
const ParseOptionCmdCodeMap
Maps from parse option code values (as string keys) to parse option names. Names are in form used in ...
Definition: QC_Program.dox.h:1956
const PO_REQUIRE_PROTOTYPES
Requires all function and method parameters and return types to have type declarations.
Definition: QC_Program.dox.h:1919
const WARN_INVALID_CATCH
This warns when the catch variable has no type definition and types are required. ...
Definition: QC_Program.dox.h:2039
const PO_NO_SYSTEM_API
Prohibits any code from being inherited into the Program object, including the system API...
Definition: QC_Program.dox.h:1833
nothing replaceParseOptions(softint opt)
Replaces the parse options for the Program object.
const PO_ASSUME_LOCAL
Assume local variable scope when variables are first referenced if no my or our is present...
Definition: QC_Program.dox.h:1572
ProgramControl getProgram()
Get ProgramControl.
const DOM_DEBUGGER
provides debugging functionality
Definition: QC_Program.dox.h:1422
int line
the starting source line number
Definition: QC_Program.dox.h:16
const DOM_GUI
provides GUI functionality
Definition: QC_Program.dox.h:1450
const WARN_RETURN_VALUE_IGNORED
Enables a warning when a function or method call is made with no side effects and the return value is...
Definition: QC_Program.dox.h:2068
code getCallReference(string identifier)
resolve the string as a call reference in the given Program
const DOM_THREAD_CLASS
provides thread control functionality
Definition: QC_Program.dox.h:1494
const True
logical True
Definition: qc_qore.dox.h:98
const PO_NO_USER_API
Prohibits any user code from being inherited into the Program object.
Definition: QC_Program.dox.h:1895
const PO_NO_GUI
Disallows access to functionality that draws graphics to the display.
Definition: QC_Program.dox.h:1727
nothing setTimeZone(TimeZone zone)
Sets the default local time zone for the object.
const DOM_EXTERNAL_PROCESS
provides external process control functionality (can affect) start) or stop external processes) ...
Definition: QC_Program.dox.h:1438
loadApplyToPrivateUserModule(string name, int warning_mask=WARN_MODULES)
Loads a Qore user module privately into the given Program container at run-time; after this call the ...
const DOM_MODULE
provides access to external modules
Definition: QC_Program.dox.h:1466
const PO_NO_DATABASE
Disallows access to database functionality.
Definition: QC_Program.dox.h:1688
int getProgramId()
Get program id.
const DOM_EMBEDDED_LOGIC
provides dynamic parsing functionality
Definition: QC_Program.dox.h:1426
const DOM_REFLECTION
provides reflection functionality
Definition: QC_Program.dox.h:1482
const PO_ALLOW_RETURNS
Allows the use of the deprecated returns keyword.
Definition: QC_Program.dox.h:1555
nothing importClass(string cls, *string new_name, *softbool inject, int module_visibility=CSP_UNCHANGED)
Imports a class into the program object&#39;s space; any calls to the imported class&#39;s code will run with...
int offset
the offset line in the source (for when multiple source objects are defined from the same source) ...
Definition: QC_Program.dox.h:18
nothing setTimeZoneUTCOffset(softint seconds_east)
Sets the default time zone for the Program object based on the number of seconds east of UTC; for zon...
const PO_NO_CHILD_PO_RESTRICTIONS
Allows child program objects to have fewer parse restrictions (i.e. more capabilies) than the parent ...
Definition: QC_Program.dox.h:1673
const PO_ALLOW_WEAK_REFERENCES
Allows the use of the weak assignment operator (:=).
Definition: QC_Program.dox.h:1566
*hash< ExceptionInfo > parsePending(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label=True)
Parses the text passed to pending lists in the Program object; does not resolve all references or com...
const PO_BROKEN_OPERATORS
allows for old pre-Qore 0.8.12 broken runtime parsing of multi-character operators with spaces ...
Definition: QC_Program.dox.h:1608
copy()
Throws an exception to prevent objects of this class from being copied.
const False
logical False
Definition: qc_qore.dox.h:96
const WARN_INVALID_OPERATION
Indicates that the embedded code performs some operation that is guaranteed to produce no result (for...
Definition: QC_Program.dox.h:2043
auto getGlobalVariable(string varname, *reference< bool > rexists)
Returns a the value of the global variable identified by the first string argument.
const WARN_CALL_WITH_TYPE_ERRORS
Enables warnings when the parser determines that the argument types of a function or method call are ...
Definition: QC_Program.dox.h:1992
const PO_REQUIRE_OUR
Requires global variables to be declared with our before use.
Definition: QC_Program.dox.h:1911
auto callFunctionArgs(string name, *softlist< auto > vargs)
Calls a function in the program object giving the arguments to the function as a list and returns the...
const WARN_ALL
Enables all warnings.
Definition: QC_Program.dox.h:1982
const PO_NO_UNCONTROLLED_APIS
disallow access to "uncontrolled APIs" like external language bindings or direct generic system call ...
Definition: QC_Program.dox.h:1885
The ProgramControl class provides safe information about a Qore program.
Definition: QC_ProgramControl.dox.h:45
const PO_BROKEN_LIST_PARSING
allows for old pre-Qore 0.8.12 broken list rewriting in the parser
Definition: QC_Program.dox.h:1590
const PO_NO_INHERIT_USER_CLASSES
Prohibits user classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1761
const WARN_DEPRECATED
Enables a warning when deprecated code is used.
Definition: QC_Program.dox.h:2011
const PO_NO_INHERIT_GLOBAL_VARS
Precludes global variables from being inherited into the new Program object.
Definition: QC_Program.dox.h:1729
bool existsFunction(string name)
Checks if a user function exists in the program object.
nothing issueModuleCmd(string module, string cmd)
issues a module command for the given module; the module is loaded into the current Program object if...
const PO_NO_CLASS_DEFS
Disallows class definitions.
Definition: QC_Program.dox.h:1678
bool setThreadInit(*code init)
Sets a call reference or closure to run every time a new thread is started.
list< int > getThreadList()
returns a list of thread IDs active in this Program
const PO_POSITIVE_OPTIONS
mask of all parse options allowing for more freedom (instead of less)
Definition: QC_Program.dox.h:1906
nothing disableParseOptions(softint opt)
Removes the given parse options to the current parse option mask.
const PO_REQUIRE_TYPES
Requires all function and method parameters, return types, variables, and object members to have type...
Definition: QC_Program.dox.h:1926
nothing lockOptions()
Locks parse options so that they cannot be changed.
const WARN_DUPLICATE_HASH_KEY
Enables a warning when an immediate hash is declared and at least one of the keys is repeated...
Definition: QC_Program.dox.h:2023
Expression objects represent a single executable expression.
Definition: QC_Expression.dox.h:7
const PO_NO_INHERIT_SYSTEM_CLASSES
Prohibits system classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1739
const PO_NO_INHERIT_SYSTEM_HASHDECLS
Prohibits system hashdecls from being imported into the new Program object.
Definition: QC_Program.dox.h:1755
nothing importFunction(string func)
Imports a function into the program object&#39;s space; any calls to the imported function will run with ...
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
const PO_ALLOW_BARE_REFS
Prohibits the use of the &#39;$&#39; character in variable names, method calls, and object member references...
Definition: QC_Program.dox.h:1536
auto callStaticMethodArgs(string class_name, string method, *softlist< auto > call_args)
Calls a static method of an object, passing the arguments to the function as arguments to the method...
const PO_NO_GLOBAL_VARS
Disallows the use of global variables.
Definition: QC_Program.dox.h:1722
const PO_NO_THREADS
Prohibits access to all threading information.
Definition: QC_Program.dox.h:1854
nothing setGlobalVarValue(string name, auto value)
set the value of a global variable
*string getScriptName()
Returns the current script name as a string or NOTHING if not set.
bool isDefined(string def)
Returns True if the given parse define is defined in the current Program (does not have to have a val...
softlist< string > getUserFunctionList()
Returns a list of strings of all user functions defined in the program object.
const PO_NO_LOCALE_CONTROL
Disallows access to functionality that can change locale parameters.
Definition: QC_Program.dox.h:1784
const PO_NO_FILESYSTEM
Disallows access to the filesystem.
Definition: QC_Program.dox.h:1717
*hash< ExceptionInfo > loadUserModuleWithProgramWarn(string name, Qore::Program pgm, int warning_mask=WARN_MODULES)
Loads a Qore user module into the Program object at run-time using the given Program object as the co...
const WARN_NONE
Represents no warning.
Definition: QC_Program.dox.h:2058
const CSP_SETPUB
Imports the object with public visibility.
Definition: QC_Program.dox.h:1402
*hash< ExceptionInfo > loadApplyToPrivateUserModuleWarn(string name, int warning_mask=WARN_MODULES)
Loads a Qore user module privately into the given Program container at run-time; after this call the ...
loadUserModuleWithProgram(string name, Qore::Program pgm, int warning_mask=WARN_MODULES)
Loads a Qore user module into the Program object at run-time using the given Program object as the co...
const WARN_BROKEN_LOGIC_PRECEDENCE
This warns before expressions affected by %broken-logic-precedence.
Definition: QC_Program.dox.h:1988
bool builtin
if True then the code is builtin and there is no user source location
Definition: QC_Program.dox.h:10
const PO_NO_TRANSIENT
Disallows the transient.
Definition: QC_Program.dox.h:1879
const PO_NO_API
Prohibits any code from being inherited into the Program object, including the system API...
Definition: QC_Program.dox.h:1668
const WARN_DUPLICATE_LOCAL_VARS
Enables a warning when a local variable with the same name is declared in a subblock (ie another loca...
Definition: QC_Program.dox.h:2027
const PO_NO_NAMESPACE_DEFS
Disallows new namespace definitions.
Definition: QC_Program.dox.h:1794
const PO_NO_INHERIT_USER_FUNC_VARIANTS
Precludes public user function variants from being inherited into the new Program object...
Definition: QC_Program.dox.h:1769
nothing setScriptPath(*string path)
Sets (or clears) the script path (directory and filename) for the object.
const PO_STRICT_BOOLEAN_EVAL
Sets strict mathematical boolean evaluation runtime mode (the qore default prior to v0...
Definition: QC_Program.dox.h:1938
const PO_NO_SYSTEM_FUNC_VARIANTS
Prohibits builtin/system function variants from being imported into the new Program object...
Definition: QC_Program.dox.h:1843
const PO_DEFAULT
This option is the empty option, meaning no options are set.
Definition: QC_Program.dox.h:1628
const DOM_FILESYSTEM
provides access to the filesystem
Definition: QC_Program.dox.h:1444
const PO_BROKEN_LOGIC_PRECEDENCE
allows for old pre-Qore 0.8.12 precedence of logical and bitwise operators
Definition: QC_Program.dox.h:1596
const PO_NO_PROCESS_CONTROL
Disallows access to functions that would affect the current process (exit(), exec(), fork(), etc)
Definition: QC_Program.dox.h:1813
nothing define(string def, auto val)
Sets a parse define for the current Program.
nothing setTimeZoneRegion(string region)
Sets the default local time zone for the object from a path to a zoneinfo time zone region file...
const PO_NO_IO
Prohibits all terminal and file I/O and GUI operations.
Definition: QC_Program.dox.h:1779
const PO_NO_CONSTANT_DEFS
Disallows constant definitions.
Definition: QC_Program.dox.h:1683
auto run()
Runs the program and optionally returns a value if the top-level code exits with a return statement...
nothing parseCommit()
Commits and pending code processed with Program::parsePending() to the Program object after resolving...
list< string > getFeatureList()
Returns a list of strings of the builtin and module-supplied features of Qore.
*string file
the file name or parse label for the code
Definition: QC_Program.dox.h:14
const DOM_TERMINAL_IO
provides terminal I/O functionality
Definition: QC_Program.dox.h:1488
const PO_NO_SYSTEM_CLASSES
Prohibits system classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1838
const DOM_DATABASE
provides access to databases
Definition: QC_Program.dox.h:1418
list< hash< auto > > findFunctionVariants(string function)
finds all variants of a function or class method and returns a list of the results ...
const PO_STRICT_ARGS
Prohibits access to builtin functions and methods flagged with RT_NOOP and also causes errors to be r...
Definition: QC_Program.dox.h:1932
const WARN_UNDECLARED_VAR
Indicates that the embedded code referenced an undeclared variable that will be assumed to be a globa...
Definition: QC_Program.dox.h:2072
hash< auto > getGlobalVars()
returns a hash of global variables
nothing parseRollback()
Removes all partially or fully-parsed code from the object along with other builtin objects; a Progra...
const PO_NO_INHERIT_PROGRAM_DATA
Do not inherit module-specific Program data from the parent.
Definition: QC_Program.dox.h:1733
importSystemHashDecls()
imports system hashdecls into a Program container at runtime; will throw an exception if the Program ...
const WARN_UNKNOWN_WARNING
Indicates that the embedded code tried to enable or disable an unknown warning.
Definition: QC_Program.dox.h:2076
nothing undefine(string def)
Unsets a parse define for the current Program.
importSystemApi()
imports system classes and functions into a Program container at runtime; will throw an exception if ...
const PO_LOCKDOWN
Sets very restrictive access; this restriction is designed to allow code to only execute logic...
Definition: QC_Program.dox.h:1642
source location information
Definition: QC_Program.dox.h:8
int getParseOptions()
Returns the current binary-or&#39;ed parse option mask for the Program object.
const DOM_UNCONTROLLED_API
provides unchecked access to system functionality that could bypass Qore&#39;s sandboxing controls ...
Definition: QC_Program.dox.h:1512
const WARN_UNREFERENCED_VARIABLE
This warning is raised when a variable is declared in a block but never referenced.
Definition: QC_Program.dox.h:2084
const PO_BROKEN_SPRINTF
Enables broken sprintf() handling where no argument is treated diffferently than NOTHING.
Definition: QC_Program.dox.h:1626
const PO_NO_INHERIT_SYSTEM_CONSTANTS
Prohibits system constants from being imported into the new Program object.
Definition: QC_Program.dox.h:1745
const PO_NO_DEBUGGING
Forbids debugging of the current Program object; when this option is set, debuggers cannot attach to ...
Definition: QC_Program.dox.h:1694
loadApplyToUserModule(string name, *softbool reinject, int warning_mask=WARN_MODULES, bool reexport=False)
Loads a Qore user module into the given Program container at run-time; after this call the Program ob...
destructor()
Waits for all threads to finish executing, then deletes all global variables, dereferences the intern...
auto getDefine(string def)
Retrieves the value of the given parse define in the current Program.
const PO_NO_EXTERNAL_PROCESS
Disallows any access to external processes (with system(), backquote(), exec(), etc) ...
Definition: QC_Program.dox.h:1712
*string getScriptDir()
Returns the current script directory as a string or NOTHING if not set.
const DOM_LOCALE_CONTROL
provides access to functionality that changes locale information
Definition: QC_Program.dox.h:1460
const PO_STRICT_TYPES
Sets strict type checking and automatically sets default values for lvalues with type restrictions fo...
Definition: QC_Program.dox.h:1944
const PO_NO_NETWORK
Disallows access to network functionality.
Definition: QC_Program.dox.h:1799
*hash< ExceptionInfo > parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label=True)
Parses the string argument and adds the code to the Program object.
const PO_NO_INHERIT_USER_CONSTANTS
Prohibits user constants from being imported into the new Program object.
Definition: QC_Program.dox.h:1767
const PO_NO_TOP_LEVEL_STATEMENTS
Disallows top level code.
Definition: QC_Program.dox.h:1874
const PO_NO_MODULES
Disallows loading modules with the %requires directive or at runtime with load_module() ...
Definition: QC_Program.dox.h:1789
int endline
the ending source line number
Definition: QC_Program.dox.h:12
list< string > getParseOptionStringList()
returns a list of parse option strings for the program object
importSystemConstants()
imports system constants into a Program container at runtime; will throw an exception if the Program ...
const ParseOptionStringMap
Maps from parse option strings to parse option bitfield integer codes.
Definition: QC_Program.dox.h:1974
loadModule(string name, int warning_mask=WARN_MODULES)
Loads a Qore module into the Program object at run-time.
const PO_ALLOW_DEBUGGER
Allows the use of functionality required to implement a debugger, mainly via DebugProgram.
Definition: QC_Program.dox.h:1541
*hash< ExceptionInfo > loadApplyToUserModuleWarn(string name, *softbool reinject, int warning_mask=WARN_MODULES, bool reexport=False)
Loads a Qore user module into the given Program container at run-time; after this call the Program ob...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
const CSP_SETPRIV
Imports the object with private visibility.
Definition: QC_Program.dox.h:1400
const CSP_UNCHANGED
Imports the object with the same module visibility.
Definition: QC_Program.dox.h:1404
const ParseOptionCodeMap
Maps from parse option code values (as string keys) to parse option names.
Definition: QC_Program.dox.h:1968
const DOM_PROCESS_CONTROL
provides process control functionality (can affect or stop the current process)
Definition: QC_Program.dox.h:1478
const WARN_EXCESS_ARGS
Enables a warning when a function or method call is made with more arguments than are used by the fun...
Definition: QC_Program.dox.h:2031
const PO_IN_MODULE
Only set by the system when in a user module Program.
Definition: QC_Program.dox.h:1636
const WARN_MODULES
The default warning mask for user modules.
Definition: QC_Program.dox.h:2056
const PO_ALLOW_STATEMENT_NO_EFFECT
Allows for old pre-Qore 0.9 top-level statements having no effect.
Definition: QC_Program.dox.h:1560
const PO_NO_INHERIT_USER_HASHDECLS
Prohibits user hashdecls from being imported into the new Program object.
Definition: QC_Program.dox.h:1773
const PO_NO_TERMINAL_IO
Disallows access to reading from and/or writing to the terminal.
Definition: QC_Program.dox.h:1848
const WARN_WARNING_MASK_UNCHANGED
This warning means that the embedded code tried to change the warning mask, but it was locked...
Definition: QC_Program.dox.h:2088
const PO_NO_EMBEDDED_LOGIC
Prohibits embedded logic from being used.
Definition: QC_Program.dox.h:1696
importSystemFunctions()
imports system functions into a Program container at runtime; will throw an exception if the Program ...
*hash< ExceptionInfo > loadModuleWarn(string name, int warning_mask=WARN_MODULES)
Loads a Qore module into the Program object at run-time.
const WARN_DEFAULT
The default warning mask.
Definition: QC_Program.dox.h:2007
const PO_ALLOW_INJECTION
Allows code/dependency injections in the contained Program object.
Definition: QC_Program.dox.h:1549
const PO_NO_EXTERNAL_INFO
Disallows access to functionality that provides information about the computing environment.
Definition: QC_Program.dox.h:1707
const DOM_NETWORK
provides network functionality
Definition: QC_Program.dox.h:1472
constructor(softint po=PO_DEFAULT)
Creates the program object and optionally sets program capabilities (parse options) ...
const PO_NO_INHERIT_SYSTEM_FUNC_VARIANTS
Prohibits builtin/system function variants from being imported into the new Program object...
Definition: QC_Program.dox.h:1751
const PO_NO_THREAD_CONTROL
Disallows access to any thread-control functions and thread-relevant statements and operators (for ex...
Definition: QC_Program.dox.h:1864
const PO_BROKEN_CAST
Allows for old pre-Qore 0.9.4 broken cast<> operator behavior where NOTHING was silently accepted...
Definition: QC_Program.dox.h:1578
const DomainCodeMap
Maps from functional domain bitfield code values (as string keys) to functional domain names...
Definition: QC_Program.dox.h:1524
const PO_STRONG_ENCAPSULATION
disallows out-of-line class and namespace declarations
Definition: QC_Program.dox.h:1950
const PO_BROKEN_INT_ASSIGNMENTS
allows for old pre-Qore 0.8.12 broken runtime int assignments where runtime type errors were ignored ...
Definition: QC_Program.dox.h:1584
const WARN_DUPLICATE_GLOBAL_VARS
Indicates that the embedded code has declared the same global variable more than once.
Definition: QC_Program.dox.h:2019
const PO_NO_THREAD_INFO
Disallows access to functionality that provides information about threading.
Definition: QC_Program.dox.h:1869
const PO_BROKEN_REFERENCES
allows for old pre-Qore 0.8.13 handling of reference and *reference
Definition: QC_Program.dox.h:1620