Qore Programming Language Reference Manual  0.9.14
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 
185  constructor(softint po = PO_DEFAULT);
186 
187 public:
189 
191  copy();
192 
193 public:
195 
203 nothing define(string def, auto val);
204 
205 public:
207 /***/
209 
210 public:
212 
227 nothing disableParseOptions(softint opt);
228 
229 public:
231 
246 bool existsFunction(string name);
247 
248 public:
250 
262 list<hash<auto>> findFunctionVariants(string function);
263 
264 public:
266 
280 *hash<auto> getAllDefines();
281 
282 public:
284 
310 code getCallReference(string identifier);
311 
312 public:
314 
328 auto getDefine(string def);
329 
330 public:
332 
337 Expression getExpression(string source, string label);
338 
339 public:
341 
352 auto getGlobalVariable(string varname, *reference<bool> rexists);
353 
354 public:
356 
370 hash<auto> getGlobalVars();
371 
372 public:
374 
387 
388 public:
390 
401 
402 public:
404 
412 
413 public:
415 
424 
425 public:
427 
439 *string getScriptDir();
440 
441 public:
443 
455 *string getScriptName();
456 
457 public:
459 
471 *string getScriptPath();
472 
473 public:
475 
487 list<int> getThreadList();
488 
489 public:
491 
502 
503 public:
505 
517 softlist<string> getUserFunctionList();
518 
519 public:
521 
548 nothing importClass(string cls, *string new_name, *softbool inject, int module_visibility = CSP_UNCHANGED);
549 
550 public:
552 
567 nothing importFunction(string func);
568 
569 public:
571 
598 nothing importFunction(string func, string new_name, *softbool inject);
599 
600 public:
602 
615 nothing importGlobalVariable(string varname, bool readonly = False);
616 
617 public:
619 
634 nothing importHashDecl(string name, *string new_name);
635 
636 public:
638 
650 
651 public:
653 
665 
666 public:
668 
680 
681 public:
683 
695 
696 public:
698 
710 
711 public:
713 
727 bool isDefined(string def);
728 
729 public:
731 
746 nothing issueModuleCmd(string module, string cmd);
747 
748 public:
750 
777  loadApplyToPrivateUserModule(string name, int warning_mask = WARN_MODULES);
778 
779 public:
781 
810 *hash<ExceptionInfo> loadApplyToPrivateUserModuleWarn(string name, int warning_mask = WARN_MODULES);
811 
812 public:
814 
845  loadApplyToUserModule(string name, *softbool reinject, int warning_mask = WARN_MODULES, bool reexport = False);
846 
847 public:
849 
882 *hash<ExceptionInfo> loadApplyToUserModuleWarn(string name, *softbool reinject, int warning_mask = WARN_MODULES, bool reexport = False);
883 
884 public:
886 
918  loadModule(string name, int warning_mask = WARN_MODULES);
919 
920 public:
922 
954 *hash<ExceptionInfo> loadModuleWarn(string name, int warning_mask = WARN_MODULES);
955 
956 public:
958 
992  loadUserModuleWithProgram(string name, Qore::Program pgm, int warning_mask = WARN_MODULES);
993 
994 public:
996 
1030 *hash<ExceptionInfo> loadUserModuleWithProgramWarn(string name, Qore::Program pgm, int warning_mask = WARN_MODULES);
1031 
1032 public:
1034 
1039 nothing lockOptions();
1040 
1041 public:
1043 
1087 *hash<ExceptionInfo> parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1088 
1089 public:
1091 
1114 nothing parseCommit();
1115 
1116 public:
1118 
1145 *hash<ExceptionInfo> parseCommit(int warning_mask);
1146 
1147 public:
1149 
1196 *hash<ExceptionInfo> parsePending(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1197 
1198 public:
1200 
1213 nothing parseRollback();
1214 
1215 public:
1217 
1231 nothing replaceParseOptions(softint opt);
1232 
1233 public:
1235 
1242 auto run();
1243 
1244 public:
1246 
1262 nothing setGlobalVarValue(string name, auto value);
1263 
1264 public:
1266 
1281 nothing setParseOptions(softint opt = PO_DEFAULT);
1282 
1283 public:
1285 
1292 nothing setScriptPath(*string path);
1293 
1294 public:
1296 
1316 bool setThreadInit(*code init);
1317 
1318 public:
1320 
1328 nothing setTimeZone(TimeZone zone);
1329 
1330 public:
1332 
1343 nothing setTimeZoneRegion(string region);
1344 
1345 public:
1347 
1365 nothing setTimeZoneUTCOffset(softint seconds_east);
1366 
1367 public:
1369 
1376 nothing undefine(string def);
1377 };
1383 
1397 
1400 
1404  const DOM_DATABASE = QDOM_DATABASE;
1406 
1408  const DOM_DEBUGGER = QDOM_DEBUGGER;
1410 
1412  const DOM_EMBEDDED_LOGIC = QDOM_EMBEDDED_LOGIC;
1414 
1418  const DOM_EXTERNAL_INFO = QDOM_EXTERNAL_INFO;
1420 
1424  const DOM_EXTERNAL_PROCESS = QDOM_EXTERNAL_PROCESS;
1426 
1430  const DOM_FILESYSTEM = QDOM_FILESYSTEM;
1432 
1436  const DOM_GUI = QDOM_GUI;
1438 
1440  const DOM_INJECTION = QDOM_INJECTION;
1442 
1446  const DOM_LOCALE_CONTROL = QDOM_LOCALE_CONTROL;
1448 
1452  const DOM_MODULE = QDOM_MODULES;
1454 
1458  const DOM_NETWORK = QDOM_NETWORK;
1460 
1464  const DOM_PROCESS_CONTROL = QDOM_PROCESS;
1466 
1468  const DOM_REFLECTION = QDOM_REFLECTION;
1470 
1474  const DOM_TERMINAL_IO = QDOM_TERMINAL_IO;
1476 
1480  const DOM_THREAD_CLASS = QDOM_THREAD_CLASS;
1482 
1486  const DOM_THREAD_CONTROL = QDOM_THREAD_CONTROL;
1488 
1492  const DOM_THREAD_INFO = QDOM_THREAD_INFO;
1494 
1498  const DOM_UNCONTROLLED_API = QDOM_UNCONTROLLED_API;
1503 
1506 
1510  const DomainCodeMap = qore(pomaps.getDomainToStringMap());
1512 
1516  const DomainStringMap = qore(pomaps.getStringToDomainMap());
1518 
1524 
1529 
1537 
1543 
1548 
1554 
1560 
1566 
1572 
1578 
1584 
1590 
1596 
1602 
1608 
1616 
1620 
1624 
1630 
1635 
1641 
1656 
1661 
1666 
1671 
1676 
1684 
1690 
1695 
1700 
1705 
1710 
1717 
1723 
1729 
1735 
1739 
1745 
1753 
1757 
1763 
1768 
1773 
1778 
1783 
1792 
1797 
1802 
1807 
1817 
1822 
1827 
1832 
1838 
1843 
1848 
1853 
1858 
1863 
1869 
1879 
1884 
1890 
1895 
1903 
1910 
1916 
1922 
1928 
1934 
1938  const ParseOptionCmdCodeMap = qore(ParseOptionMap::getCodeToStringMap());
1940 
1944  const ParseOptionCmdStringMap = qore(ParseOptionMap::getStringToCodeMap());
1946 
1950  const ParseOptionCodeMap = qore(pomaps.getCodeToStringMap());
1952 
1956  const ParseOptionStringMap = qore(pomaps.getStringToCodeMap());
1961 
1964  const WARN_ALL = QP_WARN_ALL;
1966 
1970  const WARN_BROKEN_LOGIC_PRECEDENCE = QP_WARN_BROKEN_LOGIC_PRECEDENCE;
1972 
1974  const WARN_CALL_WITH_TYPE_ERRORS = QP_WARN_CALL_WITH_TYPE_ERRORS;
1976 
1988  const WARN_DEFAULT = QP_WARN_DEFAULT;
1990 
1992  const WARN_DEPRECATED = QP_WARN_DEPRECATED;
1994 
1996  const WARN_DUPLICATE_BLOCK_VARS = QP_WARN_DUPLICATE_BLOCK_VARS;
1998 
2000  const WARN_DUPLICATE_GLOBAL_VARS = QP_WARN_DUPLICATE_GLOBAL_VARS;
2002 
2004  const WARN_DUPLICATE_HASH_KEY = QP_WARN_DUPLICATE_HASH_KEY;
2006 
2008  const WARN_DUPLICATE_LOCAL_VARS = QP_WARN_DUPLICATE_LOCAL_VARS;
2010 
2012  const WARN_EXCESS_ARGS = QP_WARN_EXCESS_ARGS;
2014 
2016  const WARN_INVALID_OPERATION = QP_WARN_INVALID_OPERATION;
2018 
2028  const WARN_MODULES = QP_WARN_MODULES;
2030  const WARN_NONE = QP_WARN_NONE;
2032 
2036  const WARN_NONEXISTENT_METHOD_CALL = QP_WARN_NONEXISTENT_METHOD_CALL;
2038 
2040  const WARN_RETURN_VALUE_IGNORED = QP_WARN_RETURN_VALUE_IGNORED;
2042 
2044  const WARN_UNDECLARED_VAR = QP_WARN_UNDECLARED_VAR;
2046 
2048  const WARN_UNKNOWN_WARNING = QP_WARN_UNKNOWN_WARNING;
2050 
2052  const WARN_UNREACHABLE_CODE = QP_WARN_UNREACHABLE_CODE;
2054 
2056  const WARN_UNREFERENCED_VARIABLE = QP_WARN_UNREFERENCED_VARIABLE;
2058 
2060  const WARN_WARNING_MASK_UNCHANGED = QP_WARN_WARNING_MASK_UNCHANGED;
2062 }
Expression objects represent a single executable expression.
Definition: QC_Expression.dox.h:7
The ProgramControl class provides safe information about a Qore program.
Definition: QC_ProgramControl.dox.h:45
Program objects allow Qore programs to support subprograms with the option to restrict capabilities,...
Definition: QC_Program.dox.h:56
nothing importHashDecl(string name, *string new_name)
Imports a typed hash declaration into the program object's space.
nothing setParseOptions(softint opt=PO_DEFAULT)
Sets parse options in the parse option mask for the Program object.
auto getGlobalVariable(string varname, *reference< bool > rexists)
Returns a the value of the global variable identified by the first string argument.
*hash< ExceptionInfo > loadModuleWarn(string name, int warning_mask=WARN_MODULES)
Loads a Qore module into the Program object at run-time.
copy()
Throws an exception to prevent objects of this class from being copied.
*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...
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.
*string getScriptName()
Returns the current script name as a string or NOTHING if not set.
nothing disableParseOptions(softint opt)
Removes the given parse options to the current parse option mask.
nothing undefine(string def)
Unsets a parse define for the current Program.
importSystemConstants()
imports system constants into a Program container at runtime; will throw an exception if the Program ...
nothing replaceParseOptions(softint opt)
Replaces the parse options for the Program object.
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 ...
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...
Expression getExpression(string source, string label)
returns an expression object for the given source code
constructor(softint po=PO_DEFAULT)
Creates the program object and optionally sets program capabilities (parse options)
int getParseOptions()
Returns the current binary-or'ed parse option mask for the Program object.
*hash< ExceptionInfo > parseCommit(int warning_mask)
Commits and pending code processed with Program::parsePending() to the Program object after resolving...
importSystemHashDecls()
imports system hashdecls into a Program container at runtime; will throw an exception if the Program ...
nothing importFunction(string func, string new_name, *softbool inject)
Imports a function into the program object's space and gives it a new name; any calls to the imported...
list< int > getThreadList()
returns a list of thread IDs active in this Program
nothing importGlobalVariable(string varname, bool readonly=False)
Imports a global variable into the program object's space.
list< hash< auto > > findFunctionVariants(string function)
finds all variants of a function or class method and returns a list of the results
nothing setTimeZoneRegion(string region)
Sets the default local time zone for the object from a path to a zoneinfo time zone region file.
softlist< string > getUserFunctionList()
Returns a list of strings of all user functions defined in the program object.
auto run()
Runs the program and optionally returns a value if the top-level code exits with a return statement.
bool setThreadInit(*code init)
Sets a call reference or closure to run every time a new thread is started.
nothing parseCommit()
Commits and pending code processed with Program::parsePending() to the Program object after resolving...
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.
auto getDefine(string def)
Retrieves the value of the given parse define in the current Program.
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...
importSystemApi()
imports system classes and functions into a Program container at runtime; will throw an exception if ...
nothing setGlobalVarValue(string name, auto value)
set the value of a global variable
TimeZone getTimeZone()
Returns the default local time zone for the object.
*string getScriptDir()
Returns the current script directory as a string or NOTHING if not set.
nothing setTimeZone(TimeZone zone)
Sets the default local time zone for the object.
nothing setScriptPath(*string path)
Sets (or clears) the script path (directory and filename) for the object.
int getProgramId()
Get program id.
nothing importFunction(string func)
Imports a function into the program object's space; any calls to the imported function will run with ...
loadModule(string name, int warning_mask=WARN_MODULES)
Loads a Qore module into the Program object at run-time.
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...
nothing define(string def, auto val)
Sets a parse define for the current Program.
bool existsFunction(string name)
Checks if a user function exists in the program object.
nothing importClass(string cls, *string new_name, *softbool inject, int module_visibility=CSP_UNCHANGED)
Imports a class into the program object's space; any calls to the imported class's code will run with...
ProgramControl getProgram()
Get ProgramControl.
auto callFunction(string name,...)
Calls a function in the program object and returns the return value.
*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...
nothing parseRollback()
Removes all partially or fully-parsed code from the object along with other builtin objects; a Progra...
importSystemClasses()
imports system classes into a Program container at runtime; will throw an exception if the Program wa...
*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.
importSystemFunctions()
imports system functions into a Program container at runtime; will throw an exception if the Program ...
*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 ...
nothing lockOptions()
Locks parse options so that they cannot be changed.
destructor()
Waits for all threads to finish executing, then deletes all global variables, dereferences the intern...
*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...
*hash< auto > getAllDefines()
Retrieves all parse defines in the current Program.
code getCallReference(string identifier)
resolve the string as a call reference in the given Program
*string getScriptPath()
Returns the current script directory and filename if known, otherwise returns NOTHING.
list< string > getParseOptionStringList()
returns a list of parse option strings for the program object
hash< auto > getGlobalVars()
returns a hash of global variables
bool isDefined(string def)
Returns True if the given parse define is defined in the current Program (does not have to have a val...
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...
nothing issueModuleCmd(string module, string cmd)
issues a module command for the given module; the module is loaded into the current Program object if...
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
const True
logical True
Definition: qc_qore.dox.h:98
const False
logical False
Definition: qc_qore.dox.h:96
const DOM_NETWORK
provides network functionality
Definition: QC_Program.dox.h:1458
const DOM_INJECTION
provides functionality related to code / dependency injection
Definition: QC_Program.dox.h:1440
const DOM_DATABASE
provides access to databases
Definition: QC_Program.dox.h:1404
const DOM_MODULE
provides access to external modules
Definition: QC_Program.dox.h:1452
const DOM_EXTERNAL_PROCESS
provides external process control functionality (can affect) start) or stop external processes)
Definition: QC_Program.dox.h:1424
const DOM_TERMINAL_IO
provides terminal I/O functionality
Definition: QC_Program.dox.h:1474
const DOM_DEBUGGER
provides debugging functionality
Definition: QC_Program.dox.h:1408
const DOM_PROCESS_CONTROL
provides process control functionality (can affect or stop the current process)
Definition: QC_Program.dox.h:1464
const DOM_EXTERNAL_INFO
provides access to external information (ex: hostname, pid, process uid, etc)
Definition: QC_Program.dox.h:1418
const DOM_THREAD_CLASS
provides thread control functionality
Definition: QC_Program.dox.h:1480
const DOM_EMBEDDED_LOGIC
provides dynamic parsing functionality
Definition: QC_Program.dox.h:1412
const DOM_UNCONTROLLED_API
provides unchecked access to system functionality that could bypass Qore's sandboxing controls
Definition: QC_Program.dox.h:1498
const DOM_GUI
provides GUI functionality
Definition: QC_Program.dox.h:1436
const DOM_REFLECTION
provides reflection functionality
Definition: QC_Program.dox.h:1468
const DOM_LOCALE_CONTROL
provides access to functionality that changes locale information
Definition: QC_Program.dox.h:1446
const DOM_THREAD_INFO
provides access to information regarding threading (tid, active threads, etc)
Definition: QC_Program.dox.h:1492
const DOM_FILESYSTEM
provides access to the filesystem
Definition: QC_Program.dox.h:1430
const DOM_THREAD_CONTROL
provides the ability to check or manipulate threads (including starting new threads)
Definition: QC_Program.dox.h:1486
const CSP_SETPRIV
Imports the object with private visibility.
Definition: QC_Program.dox.h:1386
const CSP_SETPUB
Imports the object with public visibility.
Definition: QC_Program.dox.h:1388
const CSP_UNCHANGED
Imports the object with the same module visibility.
Definition: QC_Program.dox.h:1390
const PO_NO_GUI
Disallows access to functionality that draws graphics to the display.
Definition: QC_Program.dox.h:1713
const PO_NO_GLOBAL_VARS
Disallows the use of global variables.
Definition: QC_Program.dox.h:1708
const PO_NO_USER_CLASSES
Prohibits user classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1882
const PO_IN_MODULE
Only set by the system when in a user module Program.
Definition: QC_Program.dox.h:1622
const PO_NO_SYSTEM_API
Prohibits any code from being inherited into the Program object, including the system API.
Definition: QC_Program.dox.h:1815
const PO_BROKEN_LIST_PARSING
allows for old pre-Qore 0.8.12 broken list rewriting in the parser
Definition: QC_Program.dox.h:1576
const PO_NO_EXTERNAL_ACCESS
Prohibits any external access.
Definition: QC_Program.dox.h:1688
const PO_NO_PROCESS_CONTROL
Disallows access to functions that would affect the current process (exit(), exec(),...
Definition: QC_Program.dox.h:1795
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:1846
const PO_POSITIVE_OPTIONS
mask of all parse options allowing for more freedom (instead of less)
Definition: QC_Program.dox.h:1888
const PO_REQUIRE_PROTOTYPES
Requires all function and method parameters and return types to have type declarations.
Definition: QC_Program.dox.h:1901
const PO_ALLOW_INJECTION
Allows code/dependency injections in the contained Program object.
Definition: QC_Program.dox.h:1535
const PO_LOCK_WARNINGS
Disallows changes to the warning mask.
Definition: QC_Program.dox.h:1633
const PO_NO_NETWORK
Disallows access to network functionality.
Definition: QC_Program.dox.h:1781
const PO_NO_EXTERNAL_INFO
Disallows access to functionality that provides information about the computing environment.
Definition: QC_Program.dox.h:1693
const PO_BROKEN_RANGE
allows for old pre-Qore 0.9.5 handling of range() and xrange()
Definition: QC_Program.dox.h:1600
const DomainStringMap
Maps from functional domain strings to functional domain bitfield integer codes.
Definition: QC_Program.dox.h:1516
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:1639
const PO_STRICT_BOOLEAN_EVAL
Sets strict mathematical boolean evaluation runtime mode (the qore default prior to v0....
Definition: QC_Program.dox.h:1920
const PO_LOCKDOWN
Sets very restrictive access; this restriction is designed to allow code to only execute logic,...
Definition: QC_Program.dox.h:1628
const PO_NO_INHERIT_USER_HASHDECLS
Prohibits user hashdecls from being imported into the new Program object.
Definition: QC_Program.dox.h:1755
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:1680
const PO_NO_TOP_LEVEL_STATEMENTS
Disallows top level code.
Definition: QC_Program.dox.h:1856
const PO_NO_INHERIT_USER_CLASSES
Prohibits user classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1743
const PO_NO_REFLECTION
Disallows access to reflection.
Definition: QC_Program.dox.h:1800
const PO_BROKEN_SPRINTF
Enables broken sprintf() handling where no argument is treated diffferently than NOTHING.
Definition: QC_Program.dox.h:1612
const PO_NO_TRANSIENT
Disallows the transient.
Definition: QC_Program.dox.h:1861
const PO_NO_CONSTANT_DEFS
Disallows constant definitions.
Definition: QC_Program.dox.h:1669
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:1733
const PO_NO_SYSTEM_FUNC_VARIANTS
Prohibits builtin/system function variants from being imported into the new Program object.
Definition: QC_Program.dox.h:1825
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:1570
const PO_NO_USER_API
Prohibits any user code from being inherited into the Program object.
Definition: QC_Program.dox.h:1877
const PO_NO_FILESYSTEM
Disallows access to the filesystem.
Definition: QC_Program.dox.h:1703
const DomainCodeMap
Maps from functional domain bitfield code values (as string keys) to functional domain names.
Definition: QC_Program.dox.h:1510
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:1594
const PO_REQUIRE_TYPES
Requires all function and method parameters, return types, variables, and object members to have type...
Definition: QC_Program.dox.h:1908
const PO_STRICT_TYPES
Sets strict type checking and automatically sets default values for lvalues with type restrictions fo...
Definition: QC_Program.dox.h:1926
const PO_ALLOW_RETURNS
Allows the use of the deprecated returns keyword.
Definition: QC_Program.dox.h:1541
const PO_NO_SUBROUTINE_DEFS
Disallows subroutine (function) definitions.
Definition: QC_Program.dox.h:1805
const PO_NO_THREADS
Prohibits access to all threading information.
Definition: QC_Program.dox.h:1836
const PO_REQUIRE_OUR
Requires global variables to be declared with our before use.
Definition: QC_Program.dox.h:1893
const PO_ALLOW_WEAK_REFERENCES
Allows the use of the weak assignment operator (:=).
Definition: QC_Program.dox.h:1552
const PO_NO_INHERIT_GLOBAL_VARS
Precludes global variables from being inherited into the new Program object.
Definition: QC_Program.dox.h:1715
const PO_BROKEN_LOOP_STATEMENT
allows for old pre-Qore 0.8.13 handling of break and continue
Definition: QC_Program.dox.h:1588
const PO_BROKEN_LOGIC_PRECEDENCE
allows for old pre-Qore 0.8.12 precedence of logical and bitwise operators
Definition: QC_Program.dox.h:1582
const PO_BROKEN_REFERENCES
allows for old pre-Qore 0.8.13 handling of reference and *reference
Definition: QC_Program.dox.h:1606
const PO_NO_UNCONTROLLED_APIS
disallow access to "uncontrolled APIs" like external language bindings or direct generic system call ...
Definition: QC_Program.dox.h:1867
const PO_NO_API
Prohibits any code from being inherited into the Program object, including the system API.
Definition: QC_Program.dox.h:1654
const PO_NO_CLASS_DEFS
Disallows class definitions.
Definition: QC_Program.dox.h:1664
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:1751
const PO_NO_NEW
Disallows use of the new operator.
Definition: QC_Program.dox.h:1790
const PO_NO_LOCALE_CONTROL
Disallows access to functionality that can change locale parameters.
Definition: QC_Program.dox.h:1766
const PO_NO_INHERIT_SYSTEM_HASHDECLS
Prohibits system hashdecls from being imported into the new Program object.
Definition: QC_Program.dox.h:1737
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:1659
const PO_NO_NAMESPACE_DEFS
Disallows new namespace definitions.
Definition: QC_Program.dox.h:1776
const PO_STRONG_ENCAPSULATION
disallows out-of-line class and namespace declarations
Definition: QC_Program.dox.h:1932
const PO_NO_TERMINAL_IO
Disallows access to reading from and/or writing to the terminal.
Definition: QC_Program.dox.h:1830
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:1944
const PO_ALLOW_BARE_REFS
Prohibits the use of the '$' character in variable names, method calls, and object member references.
Definition: QC_Program.dox.h:1522
const PO_NO_EXTERNAL_PROCESS
Disallows any access to external processes (with system(), backquote(), exec(), etc)
Definition: QC_Program.dox.h:1698
const PO_NO_SYSTEM_CLASSES
Prohibits system classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1820
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:1564
const PO_NO_EMBEDDED_LOGIC
Prohibits embedded logic from being used.
Definition: QC_Program.dox.h:1682
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:1618
const PO_NO_IO
Prohibits all terminal and file I/O and GUI operations.
Definition: QC_Program.dox.h:1761
const PO_NO_THREAD_INFO
Disallows access to functionality that provides information about threading.
Definition: QC_Program.dox.h:1851
const PO_NO_DATABASE
Disallows access to database functionality.
Definition: QC_Program.dox.h:1674
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:1938
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:1558
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:1914
const ParseOptionCodeMap
Maps from parse option code values (as string keys) to parse option names.
Definition: QC_Program.dox.h:1950
const PO_NO_MODULES
Disallows loading modules with the %requires directive or at runtime with load_module()
Definition: QC_Program.dox.h:1771
const PO_ALLOW_DEBUGGER
Allows the use of functionality required to implement a debugger, mainly via DebugProgram.
Definition: QC_Program.dox.h:1527
const ParseOptionStringMap
Maps from parse option strings to parse option bitfield integer codes.
Definition: QC_Program.dox.h:1956
const PO_ALLOW_STATEMENT_NO_EFFECT
Allows for old pre-Qore 0.9 top-level statements having no effect.
Definition: QC_Program.dox.h:1546
const PO_NO_THREAD_CLASSES
Disallows access to any thread classes.
Definition: QC_Program.dox.h:1841
const PO_NO_INHERIT_USER_CONSTANTS
Prohibits user constants from being imported into the new Program object.
Definition: QC_Program.dox.h:1749
const PO_NO_INHERIT_SYSTEM_CONSTANTS
Prohibits system constants from being imported into the new Program object.
Definition: QC_Program.dox.h:1727
const PO_NO_INHERIT_SYSTEM_CLASSES
Prohibits system classes from being imported into the new Program object.
Definition: QC_Program.dox.h:1721
const PO_DEFAULT
This option is the empty option, meaning no options are set.
Definition: QC_Program.dox.h:1614
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:1974
const WARN_BROKEN_LOGIC_PRECEDENCE
This warns before expressions affected by %broken-logic-precedence.
Definition: QC_Program.dox.h:1970
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:2004
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:2060
const WARN_NONEXISTENT_METHOD_CALL
Indicates that the embedded code is calling an unknown method in a class.
Definition: QC_Program.dox.h:2036
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:2044
const WARN_NONE
Represents no warning.
Definition: QC_Program.dox.h:2030
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:1996
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:2052
const WARN_MODULES
The default warning mask for user modules.
Definition: QC_Program.dox.h:2028
const WARN_UNKNOWN_WARNING
Indicates that the embedded code tried to enable or disable an unknown warning.
Definition: QC_Program.dox.h:2048
const WARN_UNREFERENCED_VARIABLE
This warning is raised when a variable is declared in a block but never referenced.
Definition: QC_Program.dox.h:2056
const WARN_DEPRECATED
Enables a warning when deprecated code is used.
Definition: QC_Program.dox.h:1992
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:2016
const WARN_DUPLICATE_GLOBAL_VARS
Indicates that the embedded code has declared the same global variable more than once.
Definition: QC_Program.dox.h:2000
const WARN_DEFAULT
The default warning mask.
Definition: QC_Program.dox.h:1988
const WARN_ALL
Enables all warnings.
Definition: QC_Program.dox.h:1964
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:2012
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:2040
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:2008
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
source location information
Definition: QC_Program.dox.h:8
int endline
the ending source line number
Definition: QC_Program.dox.h:12
bool builtin
if True then the code is builtin and there is no user source location
Definition: QC_Program.dox.h:10
int line
the starting source line number
Definition: QC_Program.dox.h:16
*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
*string file
the file name or parse label for the code
Definition: QC_Program.dox.h:14
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