\hypertarget{class_qore_1_1_program}{}\doxysection{Qore\+::Program Class Reference}
\label{class_qore_1_1_program}\index{Qore::Program@{Qore::Program}}


\mbox{\hyperlink{class_qore_1_1_program}{Program}} objects allow Qore programs to support subprograms with the option to restrict capabilities, for example, to support user-\/defined logic for application actions.  




{\ttfamily \#include $<$QC\+\_\+\+Program.\+dox.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
auto \mbox{\hyperlink{class_qore_1_1_program_ac89b5d0d7eb6ead64ee969b985473510}{call\+Function}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name,...)
\begin{DoxyCompactList}\small\item\em Calls a function in the program object and returns the return value. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_afe079c4f8df163b528a64391812b3ee7}{call\+Function\+Args}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Calls a function in the program object giving the arguments to the function as a list and returns the return value. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_a7f13a387f3c4eeae169d88e0cc932caf}{call\+Static\+Method}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} class\+\_\+name, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} method,...)
\begin{DoxyCompactList}\small\item\em Calls a static method of an object, passing the arguments to the function as arguments to the method. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_a18173d853d29fcd28cd2851cc33ce15e}{call\+Static\+Method\+Args}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} class\+\_\+name, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} method, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ call\+\_\+args)
\begin{DoxyCompactList}\small\item\em Calls a static method of an object, passing the arguments to the function as arguments to the method. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a3b1e638a11c6cf53e9c2b5dfd325decc}{constructor}} (softint po=\mbox{\hyperlink{group__parse__options_gaf8ee107760d23b03c6db359c872cc0f9}{PO\+\_\+\+DEFAULT}})
\begin{DoxyCompactList}\small\item\em Creates the program object and optionally sets program capabilities (\mbox{\hyperlink{group__parse__options}{parse options}}) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a0f2f5aaf174d9d34c6702cb32e4c0392}{copy}} ()
\begin{DoxyCompactList}\small\item\em Throws an exception to prevent objects of this class from being copied. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_aaca64251d8972c9dab39c3fa6782f0af}{define}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} def, auto val)
\begin{DoxyCompactList}\small\item\em Sets a \mbox{\hyperlink{conditional_parsing}{parse define}} for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_program_ae4c5fd96efea7bc6015f5ad170c5eafa}\label{class_qore_1_1_program_ae4c5fd96efea7bc6015f5ad170c5eafa}} 
{\bfseries destructor} ()
\begin{DoxyCompactList}\small\item\em Waits for all threads to finish executing, then deletes all global variables, dereferences the internal \mbox{\hyperlink{class_qore_1_1_program}{Program}} object and deletes the Qore object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a1f1e259bc987a7e4627e3ac2cc0c96b5}{disable\+Parse\+Options}} (softint opt)
\begin{DoxyCompactList}\small\item\em Removes the given parse options to the current parse option mask. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_program_abefc819b0a8654efc1174971e06e8c5a}{exists\+Function}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name)
\begin{DoxyCompactList}\small\item\em Checks if a user function exists in the program object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ $>$ \mbox{\hyperlink{class_qore_1_1_program_a226b4a62e095f270e2f59cc651085937}{find\+Function\+Variants}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} function)
\begin{DoxyCompactList}\small\item\em finds all variants of a function or class method and returns a list of the results \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_program_a0b4b1293de9458fa9e5c430bedd6725f}{get\+All\+Defines}} ()
\begin{DoxyCompactList}\small\item\em Retrieves all \mbox{\hyperlink{conditional_parsing}{parse defines}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. \end{DoxyCompactList}\item 
code \mbox{\hyperlink{class_qore_1_1_program_aea73d2c2b293387b51fbb5de782b7a7c}{get\+Call\+Reference}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} identifier)
\begin{DoxyCompactList}\small\item\em resolve the string as a call reference in the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_a82ba5819f483199901331e27908c9749}{get\+Define}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} def)
\begin{DoxyCompactList}\small\item\em Retrieves the value of the given \mbox{\hyperlink{conditional_parsing}{parse define}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_expression}{Expression}} \mbox{\hyperlink{class_qore_1_1_program_a370c2c5429950cce89297e7e944f0f55}{get\+Expression}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} source, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} label)
\begin{DoxyCompactList}\small\item\em returns an expression object for the given source code \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a7bd07a7cbdfa7fdb712c19005684931c}{get\+Feature\+List}} ()
\begin{DoxyCompactList}\small\item\em Returns a list of strings of the builtin and module-\/supplied features of \mbox{\hyperlink{namespace_qore}{Qore}}. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_a060d0ab426b9ce6a5a8aeaf59010afa0}{get\+Global\+Variable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} varname, \+\_\+\+\_\+7\+\_\+ reference$<$ bool $>$ rexists)
\begin{DoxyCompactList}\small\item\em Returns a the value of the global variable identified by the first string argument. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_program_a8972d56091155c387b1b9b1fc6b6a197}{get\+Global\+Vars}} ()
\begin{DoxyCompactList}\small\item\em returns a hash of global variables \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{class_qore_1_1_program_aeeb0fdb60a5fdf62d6e3726d7ffea442}{get\+Parse\+Option\+String\+List}} ()
\begin{DoxyCompactList}\small\item\em returns a list of parse option strings for the program object \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_program_a3d866874a2a1935fd30554217e01234e}{get\+Parse\+Options}} ()
\begin{DoxyCompactList}\small\item\em Returns the current binary-\/or\textquotesingle{}ed parse option mask for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} \mbox{\hyperlink{class_qore_1_1_program_ac6452df864cbfbc4c6b72d0bfe9ebdd0}{get\+Program}} ()
\begin{DoxyCompactList}\small\item\em Get \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_program_a97df6d56c39b48b1aac5404c163cff61}{get\+Program\+Id}} ()
\begin{DoxyCompactList}\small\item\em Get program id. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_program_a8d96549d48cf1707054dc48f5bde4004}{get\+Script\+Dir}} ()
\begin{DoxyCompactList}\small\item\em Returns the current script directory as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_program_a1dc1b0f848a30ec2d06fbafe7fcd677d}{get\+Script\+Name}} ()
\begin{DoxyCompactList}\small\item\em Returns the current script name as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_program_aeabcc63c1d60f6efd6878bbb658a3be5}{get\+Script\+Path}} ()
\begin{DoxyCompactList}\small\item\em Returns the current script directory and filename if known, otherwise returns \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a12070c596d8d8dd85006a3cb0d885da4}{get\+Thread\+List}} ()
\begin{DoxyCompactList}\small\item\em returns a list of thread IDs active in this \mbox{\hyperlink{class_qore_1_1_program}{Program}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} \mbox{\hyperlink{class_qore_1_1_program_a8d3e26434c9defc264c31d5f5f08d3ba}{get\+Time\+Zone}} ()
\begin{DoxyCompactList}\small\item\em Returns the default local time zone for the object. \end{DoxyCompactList}\item 
softlist$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a1da90ea646b2c5cd30aba7f5021f3189}{get\+User\+Function\+List}} ()
\begin{DoxyCompactList}\small\item\em Returns a list of strings of all user functions defined in the program object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_abf634534cb29157d05aab5ff3ffd6bea}{import\+Class}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} cls, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} new\+\_\+name, \+\_\+\+\_\+7\+\_\+ softbool inject, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} module\+\_\+visibility=\mbox{\hyperlink{group__import__visibility__constants_gac013431f5fa7cc6e8d4e3ac4edd090f6}{CSP\+\_\+\+UNCHANGED}})
\begin{DoxyCompactList}\small\item\em Imports a class into the program object\textquotesingle{}s space; any calls to the imported class\textquotesingle{}s code will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a9a2e3da4029c50643169cbb72e57f494}{import\+Function}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Imports a function into the program object\textquotesingle{}s space; any calls to the imported function will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a4ea59c8d245e924b791a74cdb551946f}{import\+Function}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} new\+\_\+name, \+\_\+\+\_\+7\+\_\+ softbool inject)
\begin{DoxyCompactList}\small\item\em Imports a function into the program object\textquotesingle{}s space and gives it a new name; any calls to the imported function will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a5db34046e2722a8519642ad98f412ed3}{import\+Global\+Variable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} varname, bool readonly=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Imports a global variable into the program object\textquotesingle{}s space. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a029c9dbdbdc3dc13e685f7d101e5829e}{import\+Hash\+Decl}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} new\+\_\+name)
\begin{DoxyCompactList}\small\item\em Imports a \mbox{\hyperlink{hashdecl}{typed hash declaration}} into the program object\textquotesingle{}s space. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a8abea6fe89712e9b4f84c7f7b0420151}{import\+System\+Api}} ()
\begin{DoxyCompactList}\small\item\em imports system classes and functions into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}}, \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}}, \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}}, and \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_ad512b5c0b491823d186e0de7cf8d87d4}{import\+System\+Classes}} ()
\begin{DoxyCompactList}\small\item\em imports system classes into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a2942f186ac759fb7a71cbb9ec0ffb72a}{import\+System\+Constants}} ()
\begin{DoxyCompactList}\small\item\em imports system constants into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_adc115cc0b1c0f196ed0d764eb33c4009}{import\+System\+Functions}} ()
\begin{DoxyCompactList}\small\item\em imports system functions into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a4aef71f37e505dbe84be95b0a2848cba}{import\+System\+Hash\+Decls}} ()
\begin{DoxyCompactList}\small\item\em imports system hashdecls into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}} \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_program_afcfa159016f0f76d7a1abdf8e3895b6b}{is\+Defined}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} def)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the given \mbox{\hyperlink{conditional_parsing}{parse define}} is defined in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} (does not have to have a value defined to return \mbox{\hyperlink{basic_data_types_True}{True}}), \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_afe6fc6b4013b8e2ff209ac9dad421487}{issue\+Module\+Cmd}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} module, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} cmd)
\begin{DoxyCompactList}\small\item\em issues a module command for the given module; the module is loaded into the current Program object if it is not already present \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{load\+Apply\+To\+Private\+User\+Module}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module privately into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{load\+Apply\+To\+Private\+User\+Module\+Warn}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module privately into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{load\+Apply\+To\+User\+Module}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \+\_\+\+\_\+7\+\_\+ softbool reinject, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}, bool reexport=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{load\+Apply\+To\+User\+Module\+Warn}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \+\_\+\+\_\+7\+\_\+ softbool reinject, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}, bool reexport=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{load\+Module}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{load\+Module\+Warn}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{load\+User\+Module\+With\+Program}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{class_qore_1_1_program}{Qore\+::\+Program}} pgm, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time using the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} object as the container for the user module code. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{load\+User\+Module\+With\+Program\+Warn}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, \mbox{\hyperlink{class_qore_1_1_program}{Qore\+::\+Program}} pgm, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask=\mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}})
\begin{DoxyCompactList}\small\item\em Loads a Qore user module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time using the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} object as the container for the user module code. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_ae3548963216fe5426a7dad63c20afb59}{lock\+Options}} ()
\begin{DoxyCompactList}\small\item\em Locks parse options so that they cannot be changed. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{parse}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} code, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} label, \+\_\+\+\_\+7\+\_\+ softint warning\+\_\+mask, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} source, \+\_\+\+\_\+7\+\_\+ softint offset, softbool format\+\_\+label=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}})
\begin{DoxyCompactList}\small\item\em Parses the string argument and adds the code to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{parse\+Commit}} ()
\begin{DoxyCompactList}\small\item\em Commits and pending code processed with \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object after resolving all outstanding references in the pending code. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_a8145c648694e0e24d492af37baa152cb}{parse\+Commit}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+mask)
\begin{DoxyCompactList}\small\item\em Commits and pending code processed with \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object after resolving all outstanding references in the pending code. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{parse\+Pending}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} code, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} label, \+\_\+\+\_\+7\+\_\+ softint warning\+\_\+mask, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} source, \+\_\+\+\_\+7\+\_\+ softint offset, softbool format\+\_\+label=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}})
\begin{DoxyCompactList}\small\item\em Parses the text passed to pending lists in the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; does not resolve all references or commit the code to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{parse\+Rollback}} ()
\begin{DoxyCompactList}\small\item\em Removes all partially or fully-\/parsed code from the object along with other builtin objects; a Program object is not usable after calling this method; do not use this method but instead destroy the Program object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}{replace\+Parse\+Options}} (softint opt)
\begin{DoxyCompactList}\small\item\em Replaces the parse options for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_program_a6b2c023e8c1d81279ef8320f5901d5e3}{run}} ()
\begin{DoxyCompactList}\small\item\em Runs the program and optionally returns a value if the top-\/level code exits with a \mbox{\hyperlink{statements_return}{return statement.}}\end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a8be97bfcd125d83a9415c843694734ac}{set\+Global\+Var\+Value}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name, auto value)
\begin{DoxyCompactList}\small\item\em set the value of a global variable \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a046e332aac8933c562fef80cd5abf0cb}{set\+Parse\+Options}} (softint opt=\mbox{\hyperlink{group__parse__options_gaf8ee107760d23b03c6db359c872cc0f9}{PO\+\_\+\+DEFAULT}})
\begin{DoxyCompactList}\small\item\em Sets parse options in the parse option mask for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}{set\+Script\+Path}} (\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Sets (or clears) the script path (directory and filename) for the object. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_program_a6fda138e987e698d3c5b11294d21bcdb}{set\+Thread\+Init}} (\+\_\+\+\_\+7\+\_\+ code init)
\begin{DoxyCompactList}\small\item\em Sets a \mbox{\hyperlink{expressions_call_reference}{call reference}} or \mbox{\hyperlink{expressions_closure}{closure}} to run every time a new thread is started. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a8dc5c5f1315c9b0faebf9806548d30b2}{set\+Time\+Zone}} (\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} zone)
\begin{DoxyCompactList}\small\item\em Sets the default local time zone for the object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a5eaa38aba68af2d1884cf014d8c7c0aa}{set\+Time\+Zone\+Region}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} region)
\begin{DoxyCompactList}\small\item\em Sets the default local time zone for the object from a path to a zoneinfo time zone region file. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_aa210b78ad95860ecc26d4489d276d180}{set\+Time\+Zone\+UTCOffset}} (softint seconds\+\_\+east)
\begin{DoxyCompactList}\small\item\em Sets the default time zone for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object based on the number of seconds east of UTC; for zones west of UTC, use negative numbers. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_program_a275563ed4d95be6a9900d2966025802c}{undefine}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} def)
\begin{DoxyCompactList}\small\item\em Unsets a \mbox{\hyperlink{conditional_parsing}{parse define}} for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{class_qore_1_1_program}{Program}} objects allow Qore programs to support subprograms with the option to restrict capabilities, for example, to support user-\/defined logic for application actions. 

Parsing in Qore happens in two steps; first all code is parsed to pending data structures, and then in the second stage, all references are resolved, and, if there are no errors, then all changes are committed to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. Note that all parse actions (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}}, \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}}, \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}, and \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{Program\+::parse\+Rollback()}}) are atomic; there is a thread lock on each \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to ensure atomicity, and if any parse errors occur in any stage of parsing, any pending changes to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object are automatically rolled back. However parse actions that affect only one stage of the two stages of parsing (\mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}}, \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}} and \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{Program\+::parse\+Rollback()}}) are atomic within themselves, but not between calls, so one thread may inadvertently commit changes to a \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if two or more threads are trying to perform transaction-\/safe two-\/stage parsing on a \mbox{\hyperlink{class_qore_1_1_program}{Program}} object without explicit user locking.

A complete parse action (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}} or \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}) can only be performed once; subsequent attempts to parse code into the same Program object will fail with an exception. If parsing fails due to a parse exception, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is generally no longer usable and must be recreated to be used.

\mbox{\hyperlink{group__parse__options}{Parse option constants}} can be used to limit the capabilities of a \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. These options should be binary-\/\+OR\textquotesingle{}ed together and passed to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s constructor. Also see \mbox{\hyperlink{command_line_processing}{qore Executable Command-\/\+Line Processing}} for equivalent command-\/line options, and \mbox{\hyperlink{parse_directives}{Parse Directives}} for equivalent parse directives.

Note that a program can provide controlled access to functionality otherwise restricted by parse options by exporting a custom API into the child program object using either the \mbox{\hyperlink{class_qore_1_1_program_a9a2e3da4029c50643169cbb72e57f494}{Program\+::import\+Function()}} or \mbox{\hyperlink{class_qore_1_1_program_a5db34046e2722a8519642ad98f412ed3}{Program\+::import\+Global\+Variable()}} method. This is possible because code (functions or object methods) imported into and called from a subprogram will run in the parent\textquotesingle{}s space and therefore with the parent\textquotesingle{}s capabilities.

\mbox{\hyperlink{qore_classes}{Classes}}, \mbox{\hyperlink{constants}{constants}}, \mbox{\hyperlink{qore_namespaces}{namespaces}}, \mbox{\hyperlink{qore_functions}{functions}}, and \mbox{\hyperlink{variables_global_variables}{global variables}} are only inherited into child \mbox{\hyperlink{class_qore_1_1_program}{Program}} objects if they are declared \mbox{\hyperlink{qore_modules_mod_public}{public}} and no \mbox{\hyperlink{group__parse__options}{parse options}} prohibit it.

Symbols can also be imported into \mbox{\hyperlink{class_qore_1_1_program}{Program}} objects singly using methods such as \mbox{\hyperlink{class_qore_1_1_program_abf634534cb29157d05aab5ff3ffd6bea}{Program\+::import\+Class()}} and \mbox{\hyperlink{class_qore_1_1_program_a5db34046e2722a8519642ad98f412ed3}{Program\+::import\+Global\+Variable()}}, etc. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_program_ac89b5d0d7eb6ead64ee969b985473510}\label{class_qore_1_1_program_ac89b5d0d7eb6ead64ee969b985473510}} 
\index{Qore::Program@{Qore::Program}!callFunction@{callFunction}}
\index{callFunction@{callFunction}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{callFunction()}{callFunction()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::call\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{}]{... }\end{DoxyParamCaption})}



Calls a function in the program object and returns the return value. 

The function runs with the permissions of the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object containing the function.


\begin{DoxyParams}{Parameters}
{\em name} & The name of the function to call \\
\hline
{\em ...} & The remaining arguments passed to the method are passed to the function to be called\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Depends on the function being called
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto result = pgm.callFunction(\textcolor{stringliteral}{"{}func\_name"{}}, arg1, arg2);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em INVALID-\/\+FUNCTION-\/\+ACCESS} & \mbox{\hyperlink{group__parse__options}{Parse options}} do not allow this builtin function to be called \\
\hline
{\em NO-\/\+FUNCTION} & The function does not exist \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the function name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
The function called could also cause other exceptions to be thrown 
\end{DoxyNote}
\mbox{\Hypertarget{class_qore_1_1_program_afe079c4f8df163b528a64391812b3ee7}\label{class_qore_1_1_program_afe079c4f8df163b528a64391812b3ee7}} 
\index{Qore::Program@{Qore::Program}!callFunctionArgs@{callFunctionArgs}}
\index{callFunctionArgs@{callFunctionArgs}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{callFunctionArgs()}{callFunctionArgs()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::call\+Function\+Args (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})}



Calls a function in the program object giving the arguments to the function as a list and returns the return value. 

The function runs with the permissions of the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object containing the function.


\begin{DoxyParams}{Parameters}
{\em name} & The name of the function to call \\
\hline
{\em vargs} & The arguments to the function to be called\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Depends on the function being called
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto result = pgm.callFunctionArgs(\textcolor{stringliteral}{"{}func\_name"{}}, (arg1, arg2));}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em INVALID-\/\+FUNCTION-\/\+ACCESS} & \mbox{\hyperlink{group__parse__options}{Parse options}} do not allow this builtin function to be called \\
\hline
{\em NO-\/\+FUNCTION} & The function does not exist \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the function name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
The function called could also cause other exceptions to be thrown 
\end{DoxyNote}
\mbox{\Hypertarget{class_qore_1_1_program_a7f13a387f3c4eeae169d88e0cc932caf}\label{class_qore_1_1_program_a7f13a387f3c4eeae169d88e0cc932caf}} 
\index{Qore::Program@{Qore::Program}!callStaticMethod@{callStaticMethod}}
\index{callStaticMethod@{callStaticMethod}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{callStaticMethod()}{callStaticMethod()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::call\+Static\+Method (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{class\+\_\+name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{method,  }\item[{}]{... }\end{DoxyParamCaption})}



Calls a static method of an object, passing the arguments to the function as arguments to the method. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto result = p.callStaticMethod(\textcolor{stringliteral}{"{}Namespace::Class::method"{}}, arg1, arg2);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em class\+\_\+name} & the with an optional namespace prefix \\
\hline
{\em method} & the static method to call \\
\hline
{\em ...} & any additional arguments to the method\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value returned by the method call
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em METHOD-\/\+DOES-\/\+NOT-\/\+EXIST} & The named method does not exist in this class \\
\hline
{\em ILLEGAL-\/\+EXPLICIT-\/\+METHOD-\/\+CALL} & The named method may not be called explicitly \\
\hline
{\em METHOD-\/\+IS-\/\+PRIVATE} & The named method is private and therefore can only be called within the class \\
\hline
{\em BASE-\/\+CLASS-\/\+IS-\/\+PRIVATE} & The named method is a member of a privately inherited base class\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
the method called could cause additional exceptions to be thrown
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__object__functions_ga46a72b2a2a84282c5125b6fd7a2e6b23}{call\+\_\+static\+\_\+method()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a18173d853d29fcd28cd2851cc33ce15e}{Program\+::call\+Static\+Method\+Args()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+5 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a18173d853d29fcd28cd2851cc33ce15e}\label{class_qore_1_1_program_a18173d853d29fcd28cd2851cc33ce15e}} 
\index{Qore::Program@{Qore::Program}!callStaticMethodArgs@{callStaticMethodArgs}}
\index{callStaticMethodArgs@{callStaticMethodArgs}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{callStaticMethodArgs()}{callStaticMethodArgs()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::call\+Static\+Method\+Args (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{class\+\_\+name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{method,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{call\+\_\+args }\end{DoxyParamCaption})}



Calls a static method of an object, passing the arguments to the function as arguments to the method. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto result = p.callStaticMethodArgs(\textcolor{stringliteral}{"{}Namespace::Class::method"{}}, (arg1, arg2));}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em class\+\_\+name} & the with an optional namespace prefix \\
\hline
{\em method} & the static method to call \\
\hline
{\em call\+\_\+args} & any additional arguments to the method\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value returned by the method call
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em METHOD-\/\+DOES-\/\+NOT-\/\+EXIST} & The named method does not exist in this class \\
\hline
{\em ILLEGAL-\/\+EXPLICIT-\/\+METHOD-\/\+CALL} & The named method may not be called explicitly \\
\hline
{\em METHOD-\/\+IS-\/\+PRIVATE} & The named method is private and therefore can only be called within the class \\
\hline
{\em BASE-\/\+CLASS-\/\+IS-\/\+PRIVATE} & The named method is a member of a privately inherited base class\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
the method called could cause additional exceptions to be thrown
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__object__functions_gaf3059a3551575f93e04f2f58ae0ab4c4}{call\+\_\+static\+\_\+method\+\_\+args()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a7f13a387f3c4eeae169d88e0cc932caf}{Program\+::call\+Static\+Method()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+5 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a3b1e638a11c6cf53e9c2b5dfd325decc}\label{class_qore_1_1_program_a3b1e638a11c6cf53e9c2b5dfd325decc}} 
\index{Qore::Program@{Qore::Program}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::constructor (\begin{DoxyParamCaption}\item[{softint}]{po = {\ttfamily \mbox{\hyperlink{group__parse__options_gaf8ee107760d23b03c6db359c872cc0f9}{PO\+\_\+\+DEFAULT}}} }\end{DoxyParamCaption})}



Creates the program object and optionally sets program capabilities (\mbox{\hyperlink{group__parse__options}{parse options}}) 

Note that if \mbox{\hyperlink{group__parse__options_gaa567ec1170360b9ca111402c5179109f}{PO\+\_\+\+NO\+\_\+\+CHILD\+\_\+\+PO\+\_\+\+RESTRICTIONS}} is not set in the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} when the new \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is created, then the created \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will have the parent\textquotesingle{}s parse options added to its parse options as given by the argument to the constructor.

In other words, if \mbox{\hyperlink{group__parse__options_gaa567ec1170360b9ca111402c5179109f}{PO\+\_\+\+NO\+\_\+\+CHILD\+\_\+\+PO\+\_\+\+RESTRICTIONS}} is not set, it\textquotesingle{}s not possible to create a child \mbox{\hyperlink{class_qore_1_1_program}{Program}} object with fewer restrictions than the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object (any attempt to do so will be silently ignored).

However, if \mbox{\hyperlink{group__parse__options_gaa567ec1170360b9ca111402c5179109f}{PO\+\_\+\+NO\+\_\+\+CHILD\+\_\+\+PO\+\_\+\+RESTRICTIONS}} is set in the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object, then the parse option argument to the constructor will be applied literally to the child object. Additionally in this case module-\/specific-\/ program data is not imported into the child \mbox{\hyperlink{class_qore_1_1_program}{Program}} object.

\mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} provides internal \mbox{\hyperlink{class_qore_1_1_program}{Program}} data for debugging purposes.

Use the \mbox{\hyperlink{class_qore_1_1_program_control_a78bd0f7dcf619ef86f761f602538d43a}{Program\+Control\+::get\+Program()}} method to attach to the currently running program

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gab1337f461ab4a90df9b39a7f1b6cc2b0}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EMBEDDED\+\_\+\+LOGIC}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em po} & A binary OR\textquotesingle{}ed product of \mbox{\hyperlink{group__parse__options}{parse options}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{Program pgm();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+OPTION-\/\+ERROR} & invalid parse options used \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_a0f2f5aaf174d9d34c6702cb32e4c0392}\label{class_qore_1_1_program_a0f2f5aaf174d9d34c6702cb32e4c0392}} 
\index{Qore::Program@{Qore::Program}!copy@{copy}}
\index{copy@{copy}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Throws an exception to prevent objects of this class from being copied. 


\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+COPY-\/\+ERROR} & copying \mbox{\hyperlink{class_qore_1_1_program}{Program}} objects is currently unsupported \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_aaca64251d8972c9dab39c3fa6782f0af}\label{class_qore_1_1_program_aaca64251d8972c9dab39c3fa6782f0af}} 
\index{Qore::Program@{Qore::Program}!define@{define}}
\index{define@{define}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{define()}{define()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::define (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{def,  }\item[{auto}]{val }\end{DoxyParamCaption})}



Sets a \mbox{\hyperlink{conditional_parsing}{parse define}} for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. 


\begin{DoxyParams}{Parameters}
{\em def} & The parse define to assign \\
\hline
{\em val} & The value to assign to the define\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.define(\textcolor{stringliteral}{"{}PRODUCTION"{}}, \textcolor{keyword}{True});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a1f1e259bc987a7e4627e3ac2cc0c96b5}\label{class_qore_1_1_program_a1f1e259bc987a7e4627e3ac2cc0c96b5}} 
\index{Qore::Program@{Qore::Program}!disableParseOptions@{disableParseOptions}}
\index{disableParseOptions@{disableParseOptions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{disableParseOptions()}{disableParseOptions()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::disable\+Parse\+Options (\begin{DoxyParamCaption}\item[{softint}]{opt }\end{DoxyParamCaption})}



Removes the given parse options to the current parse option mask. 

An {\ttfamily OPTIONS-\/\+LOCKED} exception is thrown if parse options have been locked (for example with \mbox{\hyperlink{class_qore_1_1_program_ae3548963216fe5426a7dad63c20afb59}{Program\+::lock\+Options()}})


\begin{DoxyParams}{Parameters}
{\em opt} & A single \mbox{\hyperlink{group__parse__options}{parse option}} or binary-\/or\textquotesingle{}ed combination of \mbox{\hyperlink{group__parse__options}{parse options}} to unset in the parse option mask for the object; any bit set in this argument will be unset (ie zeroed out or combined with inverse binary and) in the \mbox{\hyperlink{class_qore_1_1_program}{Program}}\textquotesingle{}s parse option mask\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# allow threading and GUI operations}}
\DoxyCodeLine{pgm.disableParseOptions(PO\_NO\_THREADS | PO\_NO\_GUI);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em OPTIONS-\/\+LOCKED} & Parse options have been locked and cannot be changed \\
\hline
{\em PROGRAM-\/\+OPTION-\/\+ERROR} & invalid parse options used\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_program_a046e332aac8933c562fef80cd5abf0cb}{Program\+::set\+Parse\+Options()}} for a reciprocal method that enables \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{parse}} options; also see \mbox{\hyperlink{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}{Program\+::replace\+Parse\+Options()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_program_abefc819b0a8654efc1174971e06e8c5a}\label{class_qore_1_1_program_abefc819b0a8654efc1174971e06e8c5a}} 
\index{Qore::Program@{Qore::Program}!existsFunction@{existsFunction}}
\index{existsFunction@{existsFunction}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{existsFunction()}{existsFunction()}}
{\footnotesize\ttfamily bool Qore\+::\+Program\+::exists\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name }\end{DoxyParamCaption})}



Checks if a user function exists in the program object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & The name of the function to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the function exists, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (pgm.existsFunction(\textcolor{stringliteral}{"{}my\_func"{}}))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}my\_func() exists in the Program\(\backslash\)n"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the function name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_a226b4a62e095f270e2f59cc651085937}\label{class_qore_1_1_program_a226b4a62e095f270e2f59cc651085937}} 
\index{Qore::Program@{Qore::Program}!findFunctionVariants@{findFunctionVariants}}
\index{findFunctionVariants@{findFunctionVariants}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{findFunctionVariants()}{findFunctionVariants()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ $>$ Qore\+::\+Program\+::find\+Function\+Variants (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{function }\end{DoxyParamCaption})}



finds all variants of a function or class method and returns a list of the results 


\begin{DoxyParams}{Parameters}
{\em function} & the function or class method name; may also be namespace-\/justified\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of hashes for each resolved name; when matched, each hash element has the following keys\+:
\begin{DoxyItemize}
\item {\ttfamily desc\+:} a string description of the call which includes the name and the full text call signature
\item {\ttfamily params\+:} a Qore\+List\+Node object that gives the params in a format that can be used by \mbox{\hyperlink{class_qore_1_1_program_control_abeb009c4ccc44659d90584bff3e8ff4b}{Program\+Control\+::find\+Function\+Statement\+Id}}
\end{DoxyItemize}
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+ERROR} & thrown if the function cannot be found\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13
\end{DoxySince}
\begin{DoxyNote}{Note}
the \href{../../modules/reflection/html/index.html}{\texttt{ reflection}} module supercedes this functionality 
\end{DoxyNote}
\mbox{\Hypertarget{class_qore_1_1_program_a0b4b1293de9458fa9e5c430bedd6725f}\label{class_qore_1_1_program_a0b4b1293de9458fa9e5c430bedd6725f}} 
\index{Qore::Program@{Qore::Program}!getAllDefines@{getAllDefines}}
\index{getAllDefines@{getAllDefines}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getAllDefines()}{getAllDefines()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+Program\+::get\+All\+Defines (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Retrieves all \mbox{\hyperlink{conditional_parsing}{parse defines}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. 

\begin{DoxyReturn}{Returns}
the hash of values of all \mbox{\hyperlink{conditional_parsing}{parse defines}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<auto> val = pgm.getAllDefines();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
A parse define may be defined with no value then values may have nothing values
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_aea73d2c2b293387b51fbb5de782b7a7c}\label{class_qore_1_1_program_aea73d2c2b293387b51fbb5de782b7a7c}} 
\index{Qore::Program@{Qore::Program}!getCallReference@{getCallReference}}
\index{getCallReference@{getCallReference}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getCallReference()}{getCallReference()}}
{\footnotesize\ttfamily code Qore\+::\+Program\+::get\+Call\+Reference (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{identifier }\end{DoxyParamCaption})}



resolve the string as a call reference in the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em identifier} & the string to resolve; function or static class method, can include namespace path\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the call reference to the given function or static method; the string is resolved as follows\+:
\begin{DoxyItemize}
\item if in a class method, a non-\/static method lookup is made
\item if not found, then a static method lookup is made
\item if not found, then a function lookup is made
\item if not found, an {\ttfamily CALL-\/\+REFERENCE-\/\+ERROR} exception is thrown
\end{DoxyItemize}
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em CALL-\/\+REFERENCE-\/\+ERROR} & cannot resolve call reference; method not accessible in the calling context\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item use \mbox{\hyperlink{class_qore_1_1zzz8objectzzz9_a1d67fa79b6676b3dcb9eaf088bbb2d4e}{Qore\+::zzz8objectzzz9\+::get\+Call\+Reference()}} to get call references to non-\/public class methods; this builtin function will always run without any class context, however pseudo-\/methods run with the class context of the caller, which enables it to access any accessible private method
\item call references to non-\/static methods contain a weak reference to the object; the lifetime of the object is not extended by the call reference
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__misc__functions_ga6b730c0585f1fe62929d6877c32ee0c7}{Qore\+::get\+\_\+call\+\_\+reference()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8objectzzz9_a1d67fa79b6676b3dcb9eaf088bbb2d4e}{Qore\+::zzz8objectzzz9\+::get\+Call\+Reference()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+4 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a82ba5819f483199901331e27908c9749}\label{class_qore_1_1_program_a82ba5819f483199901331e27908c9749}} 
\index{Qore::Program@{Qore::Program}!getDefine@{getDefine}}
\index{getDefine@{getDefine}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getDefine()}{getDefine()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::get\+Define (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{def }\end{DoxyParamCaption})}



Retrieves the value of the given \mbox{\hyperlink{conditional_parsing}{parse define}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. 

\begin{DoxyReturn}{Returns}
the value of the given \mbox{\hyperlink{conditional_parsing}{parse define}} in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto val = pgm.getDefine(\textcolor{stringliteral}{"{}PRODUCTION"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & this error is thrown if the string cannot be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
A parse define may be defined with no value; use \mbox{\hyperlink{class_qore_1_1_program_afcfa159016f0f76d7a1abdf8e3895b6b}{Program\+::is\+Defined()}} to check if a parse define is actually defined or not 
\end{DoxyNote}
\mbox{\Hypertarget{class_qore_1_1_program_a370c2c5429950cce89297e7e944f0f55}\label{class_qore_1_1_program_a370c2c5429950cce89297e7e944f0f55}} 
\index{Qore::Program@{Qore::Program}!getExpression@{getExpression}}
\index{getExpression@{getExpression}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getExpression()}{getExpression()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_expression}{Expression}} Qore\+::\+Program\+::get\+Expression (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{source,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{label }\end{DoxyParamCaption})}



returns an expression object for the given source code 


\begin{DoxyParams}{Parameters}
{\em source} & The source to the expression \\
\hline
{\em label} & the label for the expression\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
Qore 0.\+9.\+5 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a7bd07a7cbdfa7fdb712c19005684931c}\label{class_qore_1_1_program_a7bd07a7cbdfa7fdb712c19005684931c}} 
\index{Qore::Program@{Qore::Program}!getFeatureList@{getFeatureList}}
\index{getFeatureList@{getFeatureList}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getFeatureList()}{getFeatureList()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ Qore\+::\+Program\+::get\+Feature\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a list of strings of the builtin and module-\/supplied features of \mbox{\hyperlink{namespace_qore}{Qore}}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of strings of the builtin and module-\/supplied features of \mbox{\hyperlink{namespace_qore}{Qore}}
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 1.\+0 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a060d0ab426b9ce6a5a8aeaf59010afa0}\label{class_qore_1_1_program_a060d0ab426b9ce6a5a8aeaf59010afa0}} 
\index{Qore::Program@{Qore::Program}!getGlobalVariable@{getGlobalVariable}}
\index{getGlobalVariable@{getGlobalVariable}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getGlobalVariable()}{getGlobalVariable()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::get\+Global\+Variable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{varname,  }\item[{\+\_\+\+\_\+7\+\_\+ reference$<$ bool $>$}]{rexists }\end{DoxyParamCaption})}



Returns a the value of the global variable identified by the first string argument. 


\begin{DoxyParams}{Parameters}
{\em varname} & The string name of the global variable to find, not including the leading {\ttfamily \char`\"{}\$\char`\"{}} character \\
\hline
{\em rexists} & An lvalue reference to a \mbox{\hyperlink{data_type_declarations_bool_type}{bool}} to determine if the global variable exists (because this method could return \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when the variable exists as well as when it does not)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value of the global variable identified by the first string argument giving the name of the variable (without any leading {\ttfamily \char`\"{}\$\char`\"{}} symbol)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool existsv;}
\DoxyCodeLine{auto val = pgm.getGlobalVariable(\textcolor{stringliteral}{"{}error\_count"{}}, \(\backslash\)existsv);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a8972d56091155c387b1b9b1fc6b6a197}\label{class_qore_1_1_program_a8972d56091155c387b1b9b1fc6b6a197}} 
\index{Qore::Program@{Qore::Program}!getGlobalVars@{getGlobalVars}}
\index{getGlobalVars@{getGlobalVars}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getGlobalVars()}{getGlobalVars()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+Program\+::get\+Global\+Vars (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a hash of global variables 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = pgm.getGlobalVars();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a hash of global variables and their values
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__misc__functions_gacd2bed7c49feddb3083130ad64aa80f6}{Qore\+::get\+\_\+global\+\_\+vars()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a3d866874a2a1935fd30554217e01234e}\label{class_qore_1_1_program_a3d866874a2a1935fd30554217e01234e}} 
\index{Qore::Program@{Qore::Program}!getParseOptions@{getParseOptions}}
\index{getParseOptions@{getParseOptions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getParseOptions()}{getParseOptions()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Program\+::get\+Parse\+Options (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current binary-\/or\textquotesingle{}ed parse option mask for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. 

\begin{DoxyReturn}{Returns}
the current binary-\/or\textquotesingle{}ed parse option mask for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int mask = pgm.getParseOptions();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_aeeb0fdb60a5fdf62d6e3726d7ffea442}\label{class_qore_1_1_program_aeeb0fdb60a5fdf62d6e3726d7ffea442}} 
\index{Qore::Program@{Qore::Program}!getParseOptionStringList@{getParseOptionStringList}}
\index{getParseOptionStringList@{getParseOptionStringList}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getParseOptionStringList()}{getParseOptionStringList()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ Qore\+::\+Program\+::get\+Parse\+Option\+String\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a list of parse option strings for the program object 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<string> l = pgm.getParseOptionStringList();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of parse option strings for the program object
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_ac6452df864cbfbc4c6b72d0bfe9ebdd0}\label{class_qore_1_1_program_ac6452df864cbfbc4c6b72d0bfe9ebdd0}} 
\index{Qore::Program@{Qore::Program}!getProgram@{getProgram}}
\index{getProgram@{getProgram}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getProgram()}{getProgram()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} Qore\+::\+Program\+::get\+Program (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Get \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}}. 

\begin{DoxyParagraph}{Restrictions\+:}
MUST HAVE\+: \mbox{\hyperlink{group__parse__options_gad0d38cd46f08bf4210d4010204269cc9}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+DEBUGGER}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a97df6d56c39b48b1aac5404c163cff61}\label{class_qore_1_1_program_a97df6d56c39b48b1aac5404c163cff61}} 
\index{Qore::Program@{Qore::Program}!getProgramId@{getProgramId}}
\index{getProgramId@{getProgramId}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getProgramId()}{getProgramId()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Program\+::get\+Program\+Id (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Get program id. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_program_a97df6d56c39b48b1aac5404c163cff61}{Program\+::get\+Program\+Id}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a8d96549d48cf1707054dc48f5bde4004}\label{class_qore_1_1_program_a8d96549d48cf1707054dc48f5bde4004}} 
\index{Qore::Program@{Qore::Program}!getScriptDir@{getScriptDir}}
\index{getScriptDir@{getScriptDir}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getScriptDir()}{getScriptDir()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Program\+::get\+Script\+Dir (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current script directory as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set. 

Gets the script directory set with \mbox{\hyperlink{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}{Program\+::set\+Script\+Path()}}. This is the same value that will be returned in the Qore program code with the \mbox{\hyperlink{group__misc__functions_ga4730f5a695996be26efbfa9760417b1b}{get\+\_\+script\+\_\+dir()}} function if called from within the \mbox{\hyperlink{class_qore_1_1_program}{Program}}.

\begin{DoxyReturn}{Returns}
Returns the current script directory as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set; if a string is returned, it should normally include the trailing directory separator character ({\ttfamily \char`\"{}/\char`\"{}} on UNIX, {\ttfamily \char`\"{}\textbackslash{}\textbackslash{}\char`\"{}} on Windows)
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string dir = pgm.getScriptDir();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a1dc1b0f848a30ec2d06fbafe7fcd677d}\label{class_qore_1_1_program_a1dc1b0f848a30ec2d06fbafe7fcd677d}} 
\index{Qore::Program@{Qore::Program}!getScriptName@{getScriptName}}
\index{getScriptName@{getScriptName}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getScriptName()}{getScriptName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Program\+::get\+Script\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current script name as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set. 

Gets the script filename set with \mbox{\hyperlink{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}{Program\+::set\+Script\+Path()}}. This is the same value that will be returned in the Qore program code with the \mbox{\hyperlink{group__misc__functions_gade1f45f4d12597822362d920c84695a5}{get\+\_\+script\+\_\+name()}} function if called from within the \mbox{\hyperlink{class_qore_1_1_program}{Program}}.

\begin{DoxyReturn}{Returns}
the current script name as a string or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if not set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string name = pgm.getScriptName();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_aeabcc63c1d60f6efd6878bbb658a3be5}\label{class_qore_1_1_program_aeabcc63c1d60f6efd6878bbb658a3be5}} 
\index{Qore::Program@{Qore::Program}!getScriptPath@{getScriptPath}}
\index{getScriptPath@{getScriptPath}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getScriptPath()}{getScriptPath()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Program\+::get\+Script\+Path (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current script directory and filename if known, otherwise returns \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}. 

Gets the script directory and filename set with \mbox{\hyperlink{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}{Program\+::set\+Script\+Path()}}. This is the same value that will be returned in the Qore program code with the \mbox{\hyperlink{group__misc__functions_ga3ebc5d7d350677395e4b89686ca335b4}{get\+\_\+script\+\_\+path()}} function if called from within the \mbox{\hyperlink{class_qore_1_1_program}{Program}}.

\begin{DoxyReturn}{Returns}
the current script directory and filename if known, otherwise returns \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string path = pgm.getScriptPath();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a12070c596d8d8dd85006a3cb0d885da4}\label{class_qore_1_1_program_a12070c596d8d8dd85006a3cb0d885da4}} 
\index{Qore::Program@{Qore::Program}!getThreadList@{getThreadList}}
\index{getThreadList@{getThreadList}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getThreadList()}{getThreadList()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ Qore\+::\+Program\+::get\+Thread\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a list of thread IDs active in this \mbox{\hyperlink{class_qore_1_1_program}{Program}} 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<int> l = pgm.getThreadList();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of thread IDs active in this \mbox{\hyperlink{class_qore_1_1_program}{Program}}
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a8d3e26434c9defc264c31d5f5f08d3ba}\label{class_qore_1_1_program_a8d3e26434c9defc264c31d5f5f08d3ba}} 
\index{Qore::Program@{Qore::Program}!getTimeZone@{getTimeZone}}
\index{getTimeZone@{getTimeZone}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getTimeZone()}{getTimeZone()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} Qore\+::\+Program\+::get\+Time\+Zone (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the default local time zone for the object. 

\begin{DoxyReturn}{Returns}
the default local time zone for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TimeZone tz = pgm.getTimeZone();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a1da90ea646b2c5cd30aba7f5021f3189}\label{class_qore_1_1_program_a1da90ea646b2c5cd30aba7f5021f3189}} 
\index{Qore::Program@{Qore::Program}!getUserFunctionList@{getUserFunctionList}}
\index{getUserFunctionList@{getUserFunctionList}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{getUserFunctionList()}{getUserFunctionList()}}
{\footnotesize\ttfamily softlist$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ Qore\+::\+Program\+::get\+User\+Function\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a list of strings of all user functions defined in the program object. 

\begin{DoxyReturn}{Returns}
a list of strings of all user functions defined in the program object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<string> l = pgm.getUserFunctionList();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
the \href{../../modules/reflection/html/index.html}{\texttt{ reflection}} module supercedes this functionality 
\end{DoxyNote}
\mbox{\Hypertarget{class_qore_1_1_program_abf634534cb29157d05aab5ff3ffd6bea}\label{class_qore_1_1_program_abf634534cb29157d05aab5ff3ffd6bea}} 
\index{Qore::Program@{Qore::Program}!importClass@{importClass}}
\index{importClass@{importClass}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importClass()}{importClass()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::import\+Class (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{cls,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{new\+\_\+name,  }\item[{\+\_\+\+\_\+7\+\_\+ softbool}]{inject,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{module\+\_\+visibility = {\ttfamily \mbox{\hyperlink{group__import__visibility__constants_gac013431f5fa7cc6e8d4e3ac4edd090f6}{CSP\+\_\+\+UNCHANGED}}} }\end{DoxyParamCaption})}



Imports a class into the program object\textquotesingle{}s space; any calls to the imported class\textquotesingle{}s code will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. 

This allows a user-\/defined API with greater capabilities than the embedded \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to be imported into the embedded code.


\begin{DoxyParams}{Parameters}
{\em cls} & the name of the class to import into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object \\
\hline
{\em new\+\_\+name} & the name of the class in the imported \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; can be a fully-\/qualified namespace path, in which case the namespace path will be created in the target \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary as well (ex\+: {\ttfamily \char`\"{}\+Ns1\+::\+Ns2\+::\+My\+Class\char`\"{}}) \\
\hline
{\em inject} & if \mbox{\hyperlink{basic_data_types_True}{True}} then the imported class will be marked as a dependency injection and therefore will not be overritten by subsequent calls to \mbox{\hyperlink{class_qore_1_1_program_ad512b5c0b491823d186e0de7cf8d87d4}{Program\+::import\+System\+Classes()}}, \mbox{\hyperlink{class_qore_1_1_program_a4aef71f37e505dbe84be95b0a2848cba}{Program\+::import\+System\+Hash\+Decls()}}, \mbox{\hyperlink{class_qore_1_1_program_a2942f186ac759fb7a71cbb9ec0ffb72a}{Program\+::import\+System\+Constants()}}, \mbox{\hyperlink{class_qore_1_1_program_a8abea6fe89712e9b4f84c7f7b0420151}{Program\+::import\+System\+Api()}}, \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}, or \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}; note that for this call to succeed, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} must have \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} set \\
\hline
{\em module\+\_\+visibility} & see \mbox{\hyperlink{group__import__visibility__constants}{Import Visibility Constants}} for valid values\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importClass(\textcolor{stringliteral}{"{}MyNamespace::MyClass"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em CLASS-\/\+IMPORT-\/\+ERROR} & Cannot import a class into the same \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; class or namespace with this name already exists or the source class does not exist; injection indicated but \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} not set \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the class name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item This method was first implemented in Qore 0.\+8.\+7
\item Qore 0.\+8.\+12 added the {\itshape new\+\_\+name} and {\itshape inject} parameters
\item Qore 0.\+9,3 added the {\itshape module\+\_\+visibility} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a9a2e3da4029c50643169cbb72e57f494}\label{class_qore_1_1_program_a9a2e3da4029c50643169cbb72e57f494}} 
\index{Qore::Program@{Qore::Program}!importFunction@{importFunction}}
\index{importFunction@{importFunction}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importFunction()}{importFunction()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::import\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Imports a function into the program object\textquotesingle{}s space; any calls to the imported function will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. 

This allows a user-\/defined API with greater capabilities than the embedded \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to be imported into the embedded code.


\begin{DoxyParams}{Parameters}
{\em func} & the name of the function to import into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importFunction(\textcolor{stringliteral}{"{}log"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em FUNCTION-\/\+IMPORT-\/\+ERROR} & Cannot import a function into the same \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; function with this name already exists \\
\hline
{\em PROGRAM-\/\+IMPORTFUNCTION-\/\+NO-\/\+FUNCTION} & The function does not exist \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the function name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 the function name can include a namespace path (ex {\ttfamily \char`\"{}\+Namespace\+::func\char`\"{}}) 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a4ea59c8d245e924b791a74cdb551946f}\label{class_qore_1_1_program_a4ea59c8d245e924b791a74cdb551946f}} 
\index{Qore::Program@{Qore::Program}!importFunction@{importFunction}}
\index{importFunction@{importFunction}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importFunction()}{importFunction()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::import\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{new\+\_\+name,  }\item[{\+\_\+\+\_\+7\+\_\+ softbool}]{inject }\end{DoxyParamCaption})}



Imports a function into the program object\textquotesingle{}s space and gives it a new name; any calls to the imported function will run with the parent \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\textquotesingle{}s permissions. 

This allows a user-\/defined API with greater capabilities than the embedded \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to be imported into the embedded code.


\begin{DoxyParams}{Parameters}
{\em func} & the name of the function to import into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object \\
\hline
{\em new\+\_\+name} & the name of the function as it will be known in the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object once imported; can be a fully-\/ qualified namespace path, in which case the namespace path will be created in the target \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary as well (ex\+: {\ttfamily \char`\"{}\+Ns1\+::\+Ns2\+::my\+\_\+func\char`\"{}}) \\
\hline
{\em inject} & if \mbox{\hyperlink{basic_data_types_True}{True}} then the imported function will be marked as a dependency injection and therefore will not be overritten by subsequent calls to \mbox{\hyperlink{class_qore_1_1_program_adc115cc0b1c0f196ed0d764eb33c4009}{Program\+::import\+System\+Functions()}}, \mbox{\hyperlink{class_qore_1_1_program_a8abea6fe89712e9b4f84c7f7b0420151}{Program\+::import\+System\+Api()}}, \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}, or \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}; note that for this call to succeed, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} must have \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} set\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importFunction(\textcolor{stringliteral}{"{}service\_log"{}}, \textcolor{stringliteral}{"{}log"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em FUNCTION-\/\+IMPORT-\/\+ERROR} & Cannot import a function into the same \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; function with this name already exists; target namespace does not exist; injection indicated but \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} not set \\
\hline
{\em PROGRAM-\/\+IMPORTFUNCTION-\/\+NO-\/\+FUNCTION} & The function does not exist \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the function name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+4 the function name can include a namespace path (ex {\ttfamily \char`\"{}\+Namespace\+::func\char`\"{}})
\item Qore 0.\+8.\+12 added the {\itshape inject} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a5db34046e2722a8519642ad98f412ed3}\label{class_qore_1_1_program_a5db34046e2722a8519642ad98f412ed3}} 
\index{Qore::Program@{Qore::Program}!importGlobalVariable@{importGlobalVariable}}
\index{importGlobalVariable@{importGlobalVariable}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importGlobalVariable()}{importGlobalVariable()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::import\+Global\+Variable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{varname,  }\item[{bool}]{readonly = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Imports a global variable into the program object\textquotesingle{}s space. 

If the variable is an object, then any methods called from the subprogram will run in the parent\textquotesingle{}s space


\begin{DoxyParams}{Parameters}
{\em varname} & The name of the global variable without the {\ttfamily \char`\"{}\$\char`\"{}} \\
\hline
{\em readonly} & If this argument is \mbox{\hyperlink{basic_data_types_True}{True}}, then the variable will be imported read-\/only, and cannot be changed by the subprogram (note that if the imported\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importGlobalVariable(\textcolor{stringliteral}{"{}var"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+IMPORTGLOBALVARIABLE-\/\+EXCEPTION} & The global variable does not exist in the source program, or the target variable already exists \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the global variablt name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_a029c9dbdbdc3dc13e685f7d101e5829e}\label{class_qore_1_1_program_a029c9dbdbdc3dc13e685f7d101e5829e}} 
\index{Qore::Program@{Qore::Program}!importHashDecl@{importHashDecl}}
\index{importHashDecl@{importHashDecl}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importHashDecl()}{importHashDecl()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::import\+Hash\+Decl (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{new\+\_\+name }\end{DoxyParamCaption})}



Imports a \mbox{\hyperlink{hashdecl}{typed hash declaration}} into the program object\textquotesingle{}s space. 

This allows a user-\/defined API with greater capabilities than the embedded \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to be imported into the embedded code.


\begin{DoxyParams}{Parameters}
{\em name} & the name of the \mbox{\hyperlink{hashdecl}{typed hash declaration}} to import into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object \\
\hline
{\em new\+\_\+name} & the name of the \mbox{\hyperlink{hashdecl}{typed hash declaration}} in the imported \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; can be a fully-\/qualified namespace path, in which case the namespace path will be created in the target \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary as well (ex\+: {\ttfamily \char`\"{}\+Ns1\+::\+Ns2\+::\+My\+Class\char`\"{}})\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importHashDecl(\textcolor{stringliteral}{"{}MyNamespace::MyHash"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em HASHDECL-\/\+IMPORT-\/\+ERROR} & Cannot import a hashdecl into the same \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflict with an existing definition \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & the hashdecl name could not be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}}\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a8abea6fe89712e9b4f84c7f7b0420151}\label{class_qore_1_1_program_a8abea6fe89712e9b4f84c7f7b0420151}} 
\index{Qore::Program@{Qore::Program}!importSystemApi@{importSystemApi}}
\index{importSystemApi@{importSystemApi}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importSystemApi()}{importSystemApi()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::import\+System\+Api (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



imports system classes and functions into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}}, \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}}, \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}}, and \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}} 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importSystemApi();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em IMPORT-\/\+SYSTEM-\/\+API-\/\+ERROR} & objects already imported; parse options are locked on the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflicting object found; system API incorrectly imported; in case this exception is raised, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will not contain the full system API and is most likely unusable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
removes \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}}, \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}}, \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}}, and \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}} from the parse option mask after a successful completion
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_ad512b5c0b491823d186e0de7cf8d87d4}\label{class_qore_1_1_program_ad512b5c0b491823d186e0de7cf8d87d4}} 
\index{Qore::Program@{Qore::Program}!importSystemClasses@{importSystemClasses}}
\index{importSystemClasses@{importSystemClasses}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importSystemClasses()}{importSystemClasses()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::import\+System\+Classes (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



imports system classes into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}} 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importSystemClasses();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em IMPORT-\/\+SYSTEM-\/\+API-\/\+ERROR} & objects already imported; parse options are locked on the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflicting object found; system API incorrectly imported; in case this exception is raised, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will not contain the full system API and is most likely unusable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
removes \mbox{\hyperlink{group__parse__options_gaedeb6f38e275c56932618969f60384ff}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CLASSES}} from the parse option mask after a successful completion
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a2942f186ac759fb7a71cbb9ec0ffb72a}\label{class_qore_1_1_program_a2942f186ac759fb7a71cbb9ec0ffb72a}} 
\index{Qore::Program@{Qore::Program}!importSystemConstants@{importSystemConstants}}
\index{importSystemConstants@{importSystemConstants}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importSystemConstants()}{importSystemConstants()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::import\+System\+Constants (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



imports system constants into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}} 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importSystemConstants();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em IMPORT-\/\+SYSTEM-\/\+API-\/\+ERROR} & objects already imported; parse options are locked on the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflicting object found; system API incorrectly imported; in case this exception is raised, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will not contain the full system API and is most likely unusable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
removes \mbox{\hyperlink{group__parse__options_gaec5488ae61db4b43af0e89ddc532e379}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+CONSTANTS}} from the parse option mask after a successful completion
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_adc115cc0b1c0f196ed0d764eb33c4009}\label{class_qore_1_1_program_adc115cc0b1c0f196ed0d764eb33c4009}} 
\index{Qore::Program@{Qore::Program}!importSystemFunctions@{importSystemFunctions}}
\index{importSystemFunctions@{importSystemFunctions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importSystemFunctions()}{importSystemFunctions()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::import\+System\+Functions (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



imports system functions into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}} 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importSystemFunctions();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em IMPORT-\/\+SYSTEM-\/\+API-\/\+ERROR} & objects already imported; parse options are locked on the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflicting object found; system API incorrectly imported; in case this exception is raised, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will not contain the full system API and is most likely unusable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
removes \mbox{\hyperlink{group__parse__options_ga52d1e7bd71353fe0b0669e9f5a078206}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+FUNC\+\_\+\+VARIANTS}} from the parse option mask after a successful completion
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a4aef71f37e505dbe84be95b0a2848cba}\label{class_qore_1_1_program_a4aef71f37e505dbe84be95b0a2848cba}} 
\index{Qore::Program@{Qore::Program}!importSystemHashDecls@{importSystemHashDecls}}
\index{importSystemHashDecls@{importSystemHashDecls}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{importSystemHashDecls()}{importSystemHashDecls()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::import\+System\+Hash\+Decls (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



imports system hashdecls into a \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at runtime; will throw an exception if the \mbox{\hyperlink{class_qore_1_1_program}{Program}} was not created with \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}} 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.importSystemHashDecls();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em IMPORT-\/\+SYSTEM-\/\+API-\/\+ERROR} & objects already imported; parse options are locked on the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; conflicting object found; system API incorrectly imported; in case this exception is raised, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will not contain the full system API and is most likely unusable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
removes \mbox{\hyperlink{group__parse__options_gaa3d360ed4159338ebbeee314914cb912}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+INHERIT\+\_\+\+SYSTEM\+\_\+\+HASHDECLS}} from the parse option mask after a successful completion
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_afcfa159016f0f76d7a1abdf8e3895b6b}\label{class_qore_1_1_program_afcfa159016f0f76d7a1abdf8e3895b6b}} 
\index{Qore::Program@{Qore::Program}!isDefined@{isDefined}}
\index{isDefined@{isDefined}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{isDefined()}{isDefined()}}
{\footnotesize\ttfamily bool Qore\+::\+Program\+::is\+Defined (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{def }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the given \mbox{\hyperlink{conditional_parsing}{parse define}} is defined in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} (does not have to have a value defined to return \mbox{\hyperlink{basic_data_types_True}{True}}), \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em def} & The name of the define to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the given \mbox{\hyperlink{conditional_parsing}{parse define}} is defined in the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} (does not have to have a value defined to return \mbox{\hyperlink{basic_data_types_True}{True}}), \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = pgm.isDefined(\textcolor{stringliteral}{"{}PRODUCTION"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & this error is thrown if the string cannot be converted to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_afe6fc6b4013b8e2ff209ac9dad421487}\label{class_qore_1_1_program_afe6fc6b4013b8e2ff209ac9dad421487}} 
\index{Qore::Program@{Qore::Program}!issueModuleCmd@{issueModuleCmd}}
\index{issueModuleCmd@{issueModuleCmd}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{issueModuleCmd()}{issueModuleCmd()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::issue\+Module\+Cmd (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{module,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{cmd }\end{DoxyParamCaption})}



issues a module command for the given module; the module is loaded into the current Program object if it is not already present 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.issueModuleCmd(\textcolor{stringliteral}{"{}jni"{}}, \textcolor{stringliteral}{"{}define-\/class "{}} + java\_class\_path\_name + \textcolor{stringliteral}{"{} "{}} + byte\_code.toBase64());}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em module} & the module name \\
\hline
{\em cmd} & the command string to execute to be parsed by the module\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em PARSE-\/\+COMMAND-\/\+ERROR} & the module does not support commands\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
command errors can result in other module-\/ and command-\/specific exceptions being thrown; see documentation for the module and command in question for more details
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}\label{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}} 
\index{Qore::Program@{Qore::Program}!loadApplyToPrivateUserModule@{loadApplyToPrivateUserModule}}
\index{loadApplyToPrivateUserModule@{loadApplyToPrivateUserModule}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadApplyToPrivateUserModule()}{loadApplyToPrivateUserModule()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::load\+Apply\+To\+Private\+User\+Module (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore user module privately into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. 

This method allows a user module to be privately loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; note that warnings are treated as errors\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module and will no longer be valid, so any accesses to the object after this call will result in an exception
\item this module will not be available for use in other \mbox{\hyperlink{class_qore_1_1_program}{Program}} objects; this method is useful for loading modules that register themselves with an injected API in code that does not have \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} set or where the module\textquotesingle{}s functionality should be protected from other Qore code
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}\label{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}} 
\index{Qore::Program@{Qore::Program}!loadApplyToPrivateUserModuleWarn@{loadApplyToPrivateUserModuleWarn}}
\index{loadApplyToPrivateUserModuleWarn@{loadApplyToPrivateUserModuleWarn}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadApplyToPrivateUserModuleWarn()}{loadApplyToPrivateUserModuleWarn()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore user module privately into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. 

This method allows a user module to be privately loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; any warnings will be returned in the return value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
any warnings found while parsing the module (if the module is a user module)
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module and will no longer be valid, so any accesses to the object after this call will result in an exception
\item this module will not be available for use in other \mbox{\hyperlink{class_qore_1_1_program}{Program}} objects; this method is useful for loading modules that register themselves with an injected API in code that does not have \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}} set or where the module\textquotesingle{}s functionality should be protected from other Qore code
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}\label{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}} 
\index{Qore::Program@{Qore::Program}!loadApplyToUserModule@{loadApplyToUserModule}}
\index{loadApplyToUserModule@{loadApplyToUserModule}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadApplyToUserModule()}{loadApplyToUserModule()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::load\+Apply\+To\+User\+Module (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\+\_\+\+\_\+7\+\_\+ softbool}]{reinject,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}},  }\item[{bool}]{reexport = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Loads a Qore user module into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. 

This method allows a user module to be loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}, MUST HAVE\+: \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em reinject} & if \mbox{\hyperlink{basic_data_types_True}{True}} then the module will be reloaded even if already loaded previously; if the module was not already loaded then it is loaded with this call \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; note that warnings are treated as errors \\
\hline
{\em reexport} & reexport symbols from the imported module (only valid when used in a user module)\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item it is not an error to set the {\itshape reinject} argument to \mbox{\hyperlink{basic_data_types_True}{True}} when the given module has not already been loaded
\item after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module and will no longer be valid, so any accesses to the object after this call will result in an exception
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter
\item Qore 0.\+9.\+4 added the {\ttfamily reexport} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}\label{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}} 
\index{Qore::Program@{Qore::Program}!loadApplyToUserModuleWarn@{loadApplyToUserModuleWarn}}
\index{loadApplyToUserModuleWarn@{loadApplyToUserModuleWarn}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadApplyToUserModuleWarn()}{loadApplyToUserModuleWarn()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::load\+Apply\+To\+User\+Module\+Warn (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\+\_\+\+\_\+7\+\_\+ softbool}]{reinject,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}},  }\item[{bool}]{reexport = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Loads a Qore user module into the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} container at run-\/time; after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is owned by the user module and is no longer accessible in the object used for the call. 

This method allows a user module to be loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}, MUST HAVE\+: \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em reinject} & if \mbox{\hyperlink{basic_data_types_True}{True}} then the module will be reloaded even if already loaded previously; if the module was not already loaded then it is loaded with this call \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; any warnings will be returned in the return value \\
\hline
{\em reexport} & reexport symbols from the imported module (only valid when used in a user module)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
any warnings found while parsing the module (if the module is a user module)
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item it is not an error to set the {\itshape reinject} argument to \mbox{\hyperlink{basic_data_types_True}{True}} when the given module has not already been loaded
\item after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module and will no longer be valid, so any accesses to the object after this call will result in an exception
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter
\item Qore 0.\+9.\+4 added the {\ttfamily reexport} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}\label{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}} 
\index{Qore::Program@{Qore::Program}!loadModule@{loadModule}}
\index{loadModule@{loadModule}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadModule()}{loadModule()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::load\+Module (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time. 

If a feature with the same name already exists, then this feature\textquotesingle{}s code is imported into the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary and no further action is taken.

Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded prior to parsing.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & either a feature name (a module will be searched with this feature name) or a path to a module to load \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; note that warnings are treated as errors\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.loadModule(\textcolor{stringliteral}{"{}mysql"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: API incompatibility, module defines symbols already defined in the target object, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+7 introduced this method
\item Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}\label{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}} 
\index{Qore::Program@{Qore::Program}!loadModuleWarn@{loadModuleWarn}}
\index{loadModuleWarn@{loadModuleWarn}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadModuleWarn()}{loadModuleWarn()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::load\+Module\+Warn (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time. 

If a feature with the same name already exists, then this feature\textquotesingle{}s code is imported into the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary and no further action is taken.

Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded prior to parsing.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & either a feature name (a module will be searched with this feature name) or a path to a module to load \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; any warnings will be returned in the return value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
any warnings found while parsing the module (if the module is a user module)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.loadModule(\textcolor{stringliteral}{"{}mysql"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: API incompatibility, module defines symbols already defined in the target object, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9 introduced this method 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}\label{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}} 
\index{Qore::Program@{Qore::Program}!loadUserModuleWithProgram@{loadUserModuleWithProgram}}
\index{loadUserModuleWithProgram@{loadUserModuleWithProgram}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadUserModuleWithProgram()}{loadUserModuleWithProgram()}}
{\footnotesize\ttfamily Qore\+::\+Program\+::load\+User\+Module\+With\+Program (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{class_qore_1_1_program}{Qore\+::\+Program}}}]{pgm,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore user module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time using the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} object as the container for the user module code. 

This method allows a user module to be loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container. If a feature with the same name already exists, then this feature\textquotesingle{}s code is imported into the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary and no further action is taken.

Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded prior to parsing.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}, MUST HAVE\+: \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.loadUserModuleWithProgram(\textcolor{stringliteral}{"{}MyModule"{}}, p);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em pgm} & the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to use as a container for the new user module, presumably this has a custom API that the user module can use; note that after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module, therefore the object itself will no longer be valid and any accesses to the object after this call will result in an exception \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; note that warnings are treated as errors\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, module defines symbols already defined in the target object, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}{Program\+::load\+User\+Module\+With\+Program\+Warn()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+12 introduced this method
\item Qore 0.\+9 added the {\ttfamily warning\+\_\+mask} parameter 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}\label{class_qore_1_1_program_ab9992956bc128feaa25afd67888c1eb4}} 
\index{Qore::Program@{Qore::Program}!loadUserModuleWithProgramWarn@{loadUserModuleWithProgramWarn}}
\index{loadUserModuleWithProgramWarn@{loadUserModuleWithProgramWarn}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{loadUserModuleWithProgramWarn()}{loadUserModuleWithProgramWarn()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::load\+User\+Module\+With\+Program\+Warn (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{\mbox{\hyperlink{class_qore_1_1_program}{Qore\+::\+Program}}}]{pgm,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask = {\ttfamily \mbox{\hyperlink{group__warning__constants_ga7f704aa8f7652702d72d22ce93125566}{WARN\+\_\+\+MODULES}}} }\end{DoxyParamCaption})}



Loads a Qore user module into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object at run-\/time using the given \mbox{\hyperlink{class_qore_1_1_program}{Program}} object as the container for the user module code. 

This method allows a user module to be loaded with a custom API already present in the user module\textquotesingle{}s \mbox{\hyperlink{class_qore_1_1_program}{Program}} container. If a feature with the same name already exists, then this feature\textquotesingle{}s code is imported into the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object if necessary and no further action is taken.

Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded prior to parsing.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaccf9af08f7acb25e66b777dcb4c4563b}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+MODULES}}, MUST HAVE\+: \mbox{\hyperlink{group__parse__options_ga1c78ca9bda4b8f5b2ad669c48fe0368d}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+INJECTION}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.loadUserModuleWithProgram(\textcolor{stringliteral}{"{}MyModule"{}}, p);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name or path of the user module to load \\
\hline
{\em pgm} & the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object to use as a container for the new user module, presumably this has a custom API that the user module can use; note that after this call the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object will be owned by the user module, therefore the object itself will no longer be valid and any accesses to the object after this call will result in an exception \\
\hline
{\em warning\+\_\+mask} & the warning mask to use when loading the module; any warnings will be returned in the return value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
any warnings found while parsing the module (if the module is a user module)
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em LOAD-\/\+MODULE-\/\+ERROR} & module cannot be loaded\+: binary modules cannot be loaded in \mbox{\hyperlink{class_qore_1_1_program}{Program}} containers, module defines symbols already defined in the target object, etc\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a2f83d6257c25cc5ae867d9d461019996}{Program\+::load\+Apply\+To\+Private\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a0d4e4f79e5cfb1f466ad4728b5e7ff29}{Program\+::load\+Apply\+To\+Private\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a300ffe0abd0b09cc39feb637a9bab9ba}{Program\+::load\+Apply\+To\+User\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a1de2c37b8426b6f115265f38b8c0c1f8}{Program\+::load\+Apply\+To\+User\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a9bc54a95f735cdc10bfb52e5166259b2}{Program\+::load\+Module()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a71674a123270eb7e8c059443f815042d}{Program\+::load\+Module\+Warn()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a88ead6a191a58736b49e794f3220869f}{Program\+::load\+User\+Module\+With\+Program()}}
\item \mbox{\hyperlink{group__misc__functions_gaa2c6de99f2b1d40251a4818e62db07f2}{get\+\_\+module\+\_\+hash()}}
\item \mbox{\hyperlink{group__misc__functions_gaa47de99bc4984288c1ebd3dcf580f69d}{get\+\_\+feature\+\_\+list()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9 introduced this method 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_ae3548963216fe5426a7dad63c20afb59}\label{class_qore_1_1_program_ae3548963216fe5426a7dad63c20afb59}} 
\index{Qore::Program@{Qore::Program}!lockOptions@{lockOptions}}
\index{lockOptions@{lockOptions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{lockOptions()}{lockOptions()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::lock\+Options (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Locks parse options so that they cannot be changed. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.lockOptions();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}\label{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}} 
\index{Qore::Program@{Qore::Program}!parse@{parse}}
\index{parse@{parse}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{parse()}{parse()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::parse (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{code,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{label,  }\item[{\+\_\+\+\_\+7\+\_\+ softint}]{warning\+\_\+mask,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{source,  }\item[{\+\_\+\+\_\+7\+\_\+ softint}]{offset,  }\item[{softbool}]{format\+\_\+label = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})}



Parses the string argument and adds the code to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. 

This method causes both stages of parsing to be executed; if this method is successful, then the code parsed is committed to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. This method is equivalent to calling \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} and \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}} in one atomic call.

If an exception occurs in this method, all pending code is backed out, not just code parsed by this method (for example, in case uncommitted code added by \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} also exists in the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object before calling this method).

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gab1337f461ab4a90df9b39a7f1b6cc2b0}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EMBEDDED\+\_\+\+LOGIC}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em code} & The code to parse into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object \\
\hline
{\em label} & The label for the code; this label will be given if any parse or run-\/time errors are raised for the code given \\
\hline
{\em warning\+\_\+mask} & An optional warning mask; see \mbox{\hyperlink{group__warning__constants}{Warning Constants}} for values to combine by binary-\/or; if this argument is 0 or not given then no warnings will be checked or issued and the return value will always be \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} \\
\hline
{\em source} & An optional source file name for the code being parsed; this is useful if sections of a file are parsed \\
\hline
{\em offset} & An optional line offset for use with the {\itshape source} parameter; this gives the line offset in the file to the code being parsed \\
\hline
{\em format\+\_\+label} & obsolete / ignored since Qore 0.\+9\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
if warnings included in the warning mask are raised during parsing, this method will return an \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} hash with warning information, otherwise \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<ExceptionInfo> wh = pgm.parse(code, \textcolor{stringliteral}{"{}label"{}}, WARN\_DEFAULT);}
\DoxyCodeLine{\textcolor{keywordflow}{while} (wh) \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}warning: \%s:\%d: \%s: \%s\(\backslash\)n"{}}, wh.file, wh.line, wh.err, wh.desc);}
\DoxyCodeLine{    wh = wh.next;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
This method could throw many parse exceptions which are not enumerated here; any parse errors will result in an appropriate exception.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Qore\+::\+Program\+::parse\+Pending()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Qore\+::\+Program\+::parse\+Commit()}}
\item \mbox{\hyperlink{group__misc__functions_ga6c7d460b97c3c862717b052355985ded}{Qore\+::parse()}}
\end{DoxyItemize}
\end{DoxySeeAlso}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+PARSE-\/\+ERROR} & this exception is thrown if any parse actions are started while the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object has running threads\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
A complete parse action (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}} or \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}) can only be performed once; subsequent attempts to parse code into the same Program object will fail with an exception. If parsing fails due to a parse exception, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is generally no longer usable and must be recreated to be used.
\end{DoxyNote}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+7 the {\itshape source}, {\itshape offset}, and {\itshape format\+\_\+label} arguments were added
\item Qore 0.\+9 parsing can only be executed once per Program object
\item Qore 0.\+9 the {\itshape format\+\_\+label} is obsolete / ignored 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}\label{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}} 
\index{Qore::Program@{Qore::Program}!parseCommit@{parseCommit}}
\index{parseCommit@{parseCommit}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{parseCommit()}{parseCommit()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::parse\+Commit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Commits and pending code processed with \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object after resolving all outstanding references in the pending code. 

An exception in this method causes all pending code to be rolled back immediately.

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.parseCommit();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
This method could throw many parse exceptions related to resolving references which are not enumerated here; any parse errors will result in an appropriate exception.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Qore\+::\+Program\+::parse()}}
\item \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Qore\+::\+Program\+::parse\+Pending()}}
\item \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{Qore\+::\+Program\+::parse\+Rollback()}}
\item \mbox{\hyperlink{group__misc__functions_ga6c7d460b97c3c862717b052355985ded}{Qore\+::parse()}}
\end{DoxyItemize}
\end{DoxySeeAlso}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+PARSE-\/\+ERROR} & this exception is thrown if any parse actions are started while the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object has running threads\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
A complete parse action (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}} or \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}) can only be performed once; subsequent attempts to parse code into the same Program object will fail with an exception. If parsing fails due to a parse exception, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is generally no longer usable and must be recreated to be used.
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+9 parsing can only be executed once per Program object 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a8145c648694e0e24d492af37baa152cb}\label{class_qore_1_1_program_a8145c648694e0e24d492af37baa152cb}} 
\index{Qore::Program@{Qore::Program}!parseCommit@{parseCommit}}
\index{parseCommit@{parseCommit}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{parseCommit()}{parseCommit()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::parse\+Commit (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+mask }\end{DoxyParamCaption})}



Commits and pending code processed with \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Program\+::parse\+Pending()}} to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object after resolving all outstanding references in the pending code. 

An exception in this method causes all pending code to be rolled back immediately.

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<ExceptionInfo> wh = pgm.parseCommit(WARN\_DEFAULT);}
\DoxyCodeLine{\textcolor{keywordflow}{while} (exists wh) \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}warning: \%s:\%d: \%s: \%s\(\backslash\)n"{}}, wh.file, wh.line, wh.err, wh.desc);}
\DoxyCodeLine{    wh = wh.next;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
This method could throw many parse exceptions related to resolving references which are not enumerated here; any parse errors will result in an appropriate exception.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Qore\+::\+Program\+::parse()}}
\item \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Qore\+::\+Program\+::parse\+Pending()}}
\item \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{Qore\+::\+Program\+::parse\+Rollback()}}
\item \mbox{\hyperlink{group__misc__functions_ga6c7d460b97c3c862717b052355985ded}{Qore\+::parse()}}
\end{DoxyItemize}
\end{DoxySeeAlso}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+PARSE-\/\+ERROR} & this exception is thrown if any parse actions are started while the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object has running threads\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
A complete parse action (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}} or \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}) can only be performed once; subsequent attempts to parse code into the same Program object will fail with an exception. If parsing fails due to a parse exception, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is generally no longer usable and must be recreated to be used.
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+9 parsing can only be executed once per Program object 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}\label{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}} 
\index{Qore::Program@{Qore::Program}!parsePending@{parsePending}}
\index{parsePending@{parsePending}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{parsePending()}{parsePending()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} $>$ Qore\+::\+Program\+::parse\+Pending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{code,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{label,  }\item[{\+\_\+\+\_\+7\+\_\+ softint}]{warning\+\_\+mask,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{source,  }\item[{\+\_\+\+\_\+7\+\_\+ softint}]{offset,  }\item[{softbool}]{format\+\_\+label = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})}



Parses the text passed to pending lists in the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; does not resolve all references or commit the code to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. 

References are resolved in the \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}} method.

\mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}} must be called to resolve all references and commit the code to the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object; until \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}} is called, none of the code parsed by this method will be available for execution in the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object.

If an exception occurs in this method, all pending code is backed out, not just code parsed by this method.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gab1337f461ab4a90df9b39a7f1b6cc2b0}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EMBEDDED\+\_\+\+LOGIC}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em code} & The code to parse into the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object \\
\hline
{\em label} & The label for the code; this label will be given if any parse or run-\/time errors are raised for the code given \\
\hline
{\em warning\+\_\+mask} & An optional warning mask; see \mbox{\hyperlink{group__warning__constants}{Warning Constants}} for values to combine by binary-\/or; if this argument is 0 or not given then no warnings will be checked or issued and the return value will always be \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} \\
\hline
{\em source} & An optional source file name for the code being parsed; this is useful if sections of a file are parsed \\
\hline
{\em offset} & An optional line offset for use with the {\itshape source} parameter; this gives the line offset in the file to the code being parsed \\
\hline
{\em format\+\_\+label} & obsolete / ignored since Qore 0.\+9\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
if warnings included in the warning mask are raised during parsing, this method will return an \mbox{\hyperlink{struct_qore_1_1_exception_info}{Exception\+Info}} hash with warning information, otherwise \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<ExceptionInfo> wh = pgm.parsePending(code, \textcolor{stringliteral}{"{}label"{}}, WARN\_DEFAULT);}
\DoxyCodeLine{\textcolor{keywordflow}{while} (wh) \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}warning: \%s:\%d: \%s: \%s\(\backslash\)n"{}}, wh.file, wh.line, wh.err, wh.desc);}
\DoxyCodeLine{    wh = wh.next;}
\DoxyCodeLine{\}}
\DoxyCodeLine{pgm.parseCommit();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
This method could throw many parse exceptions which are not enumerated here; any parse errors will result in an appropriate exception.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Qore\+::\+Program\+::parse()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Qore\+::\+Program\+::parse\+Commit()}}
\item \mbox{\hyperlink{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}{Qore\+::\+Program\+::parse\+Rollback()}}
\item \mbox{\hyperlink{group__misc__functions_ga6c7d460b97c3c862717b052355985ded}{Qore\+::parse()}}
\end{DoxyItemize}
\end{DoxySeeAlso}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+PARSE-\/\+ERROR} & this exception is thrown if any parse actions are started while the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object has running threads\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
A complete parse action (\mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Program\+::parse()}} or \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Program\+::parse\+Commit()}}) can only be performed once; subsequent attempts to parse code into the same Program object will fail with an exception. If parsing fails due to a parse exception, the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object is generally no longer usable and must be recreated to be used.
\end{DoxyNote}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+7 the {\itshape source}, {\itshape offset}, and {\itshape format\+\_\+label} arguments were added
\item Qore 0.\+9 parsing can only be executed once per Program object
\item Qore 0.\+9 the {\itshape format\+\_\+label} is obsolete / ignored 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}\label{class_qore_1_1_program_acc27af9225963f20947e0045186ecfb7}} 
\index{Qore::Program@{Qore::Program}!parseRollback@{parseRollback}}
\index{parseRollback@{parseRollback}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{parseRollback()}{parseRollback()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::parse\+Rollback (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Removes all partially or fully-\/parsed code from the object along with other builtin objects; a Program object is not usable after calling this method; do not use this method but instead destroy the Program object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_DEPRECATED}{DEPRECATED}}
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{Qore\+::\+Program\+::parse()}}
\item \mbox{\hyperlink{class_qore_1_1_program_a789d84e0f40137ad3b38064378b50e1b}{Qore\+::\+Program\+::parse\+Commit()}}
\item \mbox{\hyperlink{class_qore_1_1_program_aa3a2d5a665b121a83939c6e5ec1d201f}{Qore\+::\+Program\+::parse\+Pending()}}
\item \mbox{\hyperlink{group__misc__functions_ga6c7d460b97c3c862717b052355985ded}{Qore\+::parse()}}
\end{DoxyItemize}
\end{DoxySeeAlso}

\begin{DoxyExceptions}{Exceptions}
{\em PROGRAM-\/\+PARSE-\/\+ERROR} & this exception is thrown if any parse actions are started while the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object has running threads\\
\hline
\end{DoxyExceptions}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000001}{Deprecated}}]if parsing fails or is rolled back, the Program object is no longer usable \end{DoxyRefDesc}
\mbox{\Hypertarget{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}\label{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}} 
\index{Qore::Program@{Qore::Program}!replaceParseOptions@{replaceParseOptions}}
\index{replaceParseOptions@{replaceParseOptions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{replaceParseOptions()}{replaceParseOptions()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::replace\+Parse\+Options (\begin{DoxyParamCaption}\item[{softint}]{opt }\end{DoxyParamCaption})}



Replaces the parse options for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. 

An {\ttfamily OPTION-\/\+ERROR} exception is thrown if the calling \mbox{\hyperlink{class_qore_1_1_program}{Program}} object does not have \mbox{\hyperlink{group__parse__options_gaa567ec1170360b9ca111402c5179109f}{PO\+\_\+\+NO\+\_\+\+CHILD\+\_\+\+PO\+\_\+\+RESTRICTIONS}} set.


\begin{DoxyParams}{Parameters}
{\em opt} & A single \mbox{\hyperlink{group__parse__options}{parse option}} or binary-\/or\textquotesingle{}ed combination of \mbox{\hyperlink{group__parse__options}{parse options}} to unset in the parse option mask for the object\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# disallow threading and GUI operations}}
\DoxyCodeLine{pgm.replaceParseOptions(PO\_NO\_THREADS | PO\_NO\_GUI);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em OPTION-\/\+ERROR} & The calling \mbox{\hyperlink{class_qore_1_1_program}{Program}} does not have the \mbox{\hyperlink{group__parse__options_gaa567ec1170360b9ca111402c5179109f}{PO\+\_\+\+NO\+\_\+\+CHILD\+\_\+\+PO\+\_\+\+RESTRICTIONS}} option set, and therefore cannot call \mbox{\hyperlink{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}{Program\+::replace\+Parse\+Options()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_program_a046e332aac8933c562fef80cd5abf0cb}{Program\+::set\+Parse\+Options()}} and \mbox{\hyperlink{class_qore_1_1_program_a1f1e259bc987a7e4627e3ac2cc0c96b5}{Program\+::disable\+Parse\+Options()}}. 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_program_a6b2c023e8c1d81279ef8320f5901d5e3}\label{class_qore_1_1_program_a6b2c023e8c1d81279ef8320f5901d5e3}} 
\index{Qore::Program@{Qore::Program}!run@{run}}
\index{run@{run}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{run()}{run()}}
{\footnotesize\ttfamily auto Qore\+::\+Program\+::run (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Runs the program and optionally returns a value if the top-\/level code exits with a \mbox{\hyperlink{statements_return}{return statement.}}

\begin{DoxyReturn}{Returns}
the value given to the \mbox{\hyperlink{statements_return}{return statement}} at the top-\/level, if any, otherwise \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.run();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a8be97bfcd125d83a9415c843694734ac}\label{class_qore_1_1_program_a8be97bfcd125d83a9415c843694734ac}} 
\index{Qore::Program@{Qore::Program}!setGlobalVarValue@{setGlobalVarValue}}
\index{setGlobalVarValue@{setGlobalVarValue}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setGlobalVarValue()}{setGlobalVarValue()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Global\+Var\+Value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name,  }\item[{auto}]{value }\end{DoxyParamCaption})}



set the value of a global variable 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setGlobalVarValue(\textcolor{stringliteral}{"{}a"{}}, 1);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name of the variable \\
\hline
{\em value} & the value to assign\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em UNKNOWN-\/\+VARIABLE} & the variable is not a global variable\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
other exceptions could be thrown if the value cannot be assigned to the given variable
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__misc__functions_gaea05595c0ea4cf4affef51c323c7eed1}{Qore\+::set\+\_\+global\+\_\+var\+\_\+value()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a046e332aac8933c562fef80cd5abf0cb}\label{class_qore_1_1_program_a046e332aac8933c562fef80cd5abf0cb}} 
\index{Qore::Program@{Qore::Program}!setParseOptions@{setParseOptions}}
\index{setParseOptions@{setParseOptions}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setParseOptions()}{setParseOptions()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Parse\+Options (\begin{DoxyParamCaption}\item[{softint}]{opt = {\ttfamily \mbox{\hyperlink{group__parse__options_gaf8ee107760d23b03c6db359c872cc0f9}{PO\+\_\+\+DEFAULT}}} }\end{DoxyParamCaption})}



Sets parse options in the parse option mask for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object. 

An {\ttfamily OPTIONS-\/\+LOCKED} exception is thrown if parse options have been locked (for example with \mbox{\hyperlink{class_qore_1_1_program_ae3548963216fe5426a7dad63c20afb59}{Program\+::lock\+Options()}})


\begin{DoxyParams}{Parameters}
{\em opt} & A single \mbox{\hyperlink{group__parse__options}{parse option}} or binary-\/or\textquotesingle{}ed combination of \mbox{\hyperlink{group__parse__options}{parse options}} to set in the parse option mask for the object; the given argument will be combined with binary or with the existing parse option mask\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# disable threading and GUI operations}}
\DoxyCodeLine{pgm.setParseOptions(PO\_NO\_THREADS | PO\_NO\_GUI);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em OPTIONS-\/\+LOCKED} & Parse options have been locked and cannot be changed \\
\hline
{\em PROGRAM-\/\+OPTION-\/\+ERROR} & invalid parse options used\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_program_a1f1e259bc987a7e4627e3ac2cc0c96b5}{Program\+::disable\+Parse\+Options()}} for a reciprocal method that disables \mbox{\hyperlink{class_qore_1_1_program_a20eecce42e3661e7c837291b78c76006}{parse}} options; also see \mbox{\hyperlink{class_qore_1_1_program_a2d1d26dcb43d846cec1ecf926115b857}{Program\+::replace\+Parse\+Options()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}\label{class_qore_1_1_program_a8def65d25a0934417aa425c84f38b568}} 
\index{Qore::Program@{Qore::Program}!setScriptPath@{setScriptPath}}
\index{setScriptPath@{setScriptPath}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setScriptPath()}{setScriptPath()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Script\+Path (\begin{DoxyParamCaption}\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Sets (or clears) the script path (directory and filename) for the object. 


\begin{DoxyParams}{Parameters}
{\em path} & The path (directory and filename) for the current script; if the directory component is missing, then the current directory is assumed\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setScriptPath(\textcolor{stringliteral}{"{}/users/test/test.q"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_program_a6fda138e987e698d3c5b11294d21bcdb}\label{class_qore_1_1_program_a6fda138e987e698d3c5b11294d21bcdb}} 
\index{Qore::Program@{Qore::Program}!setThreadInit@{setThreadInit}}
\index{setThreadInit@{setThreadInit}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setThreadInit()}{setThreadInit()}}
{\footnotesize\ttfamily bool Qore\+::\+Program\+::set\+Thread\+Init (\begin{DoxyParamCaption}\item[{\+\_\+\+\_\+7\+\_\+ code}]{init }\end{DoxyParamCaption})}



Sets a \mbox{\hyperlink{expressions_call_reference}{call reference}} or \mbox{\hyperlink{expressions_closure}{closure}} to run every time a new thread is started. 

This code can be used to initialize \mbox{\hyperlink{threading_threading_and_variables}{global thread-\/local variables}}, for example.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga16d8c2b85171b6673b60b5f7d0eaf5eb}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+THREAD\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em init} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or \mbox{\hyperlink{expressions_closure}{closure}} to run every time a new thread is started or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} to clear any thread initialization code\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if there was already user initialization code set, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setThreadInit(sub () \{ var = 123; \});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
the code will be run for all new threads, but is not run by this method for the current thread
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__threading__functions_gae83c32576b59a1ecfa906d9b3c3af557}{Qore\+::set\+\_\+thread\+\_\+init()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_program_a8dc5c5f1315c9b0faebf9806548d30b2}\label{class_qore_1_1_program_a8dc5c5f1315c9b0faebf9806548d30b2}} 
\index{Qore::Program@{Qore::Program}!setTimeZone@{setTimeZone}}
\index{setTimeZone@{setTimeZone}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setTimeZone()}{setTimeZone()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Time\+Zone (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}}}]{zone }\end{DoxyParamCaption})}



Sets the default local time zone for the object. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TimeZone tz(\textcolor{stringliteral}{"{}Europe/Prague"{}});}
\DoxyCodeLine{pgm.setTimeZone(tz);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_time_zone_a7e12da4b71bf101c397f06123474403f}{Time\+Zone\+::set()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_program_a5eaa38aba68af2d1884cf014d8c7c0aa}\label{class_qore_1_1_program_a5eaa38aba68af2d1884cf014d8c7c0aa}} 
\index{Qore::Program@{Qore::Program}!setTimeZoneRegion@{setTimeZoneRegion}}
\index{setTimeZoneRegion@{setTimeZoneRegion}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setTimeZoneRegion()}{setTimeZoneRegion()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Time\+Zone\+Region (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{region }\end{DoxyParamCaption})}



Sets the default local time zone for the object from a path to a zoneinfo time zone region file. 

If there are errors opening, reading, or parsing the file (or the Windows registry entry, depending on the platform), an exception is thrown


\begin{DoxyParams}{Parameters}
{\em region} & The path to the zoneinfo file for the time zone region to set as the local time zone for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setTimeZoneRegion(\textcolor{stringliteral}{"{}Europe/Prague"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em TZINFO-\/\+ERROR} & Unable to read zoneinfo file; invalid file magic; error parsing zoneinfo file, etc \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_program_aa210b78ad95860ecc26d4489d276d180}\label{class_qore_1_1_program_aa210b78ad95860ecc26d4489d276d180}} 
\index{Qore::Program@{Qore::Program}!setTimeZoneUTCOffset@{setTimeZoneUTCOffset}}
\index{setTimeZoneUTCOffset@{setTimeZoneUTCOffset}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{setTimeZoneUTCOffset()}{setTimeZoneUTCOffset()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::set\+Time\+Zone\+UTCOffset (\begin{DoxyParamCaption}\item[{softint}]{seconds\+\_\+east }\end{DoxyParamCaption})}



Sets the default time zone for the \mbox{\hyperlink{class_qore_1_1_program}{Program}} object based on the number of seconds east of UTC; for zones west of UTC, use negative numbers. 

Time zones set with this method cannot have any daylight savings time information; to set a zone with daylight savings time information, use \mbox{\hyperlink{class_qore_1_1_program_a5eaa38aba68af2d1884cf014d8c7c0aa}{Program\+::set\+Time\+Zone\+Region()}} instead


\begin{DoxyParams}{Parameters}
{\em seconds\+\_\+east} & The number of seconds east of UTC; for zones west of UTC, use negative numbers\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}
The following examples are all equivalent, setting the time zone to +02 UTC\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setTimeZoneUTCOffset(7200);}

\end{DoxyCode}
 
\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setTimeZoneUTCOffset(2h);}

\end{DoxyCode}
 
\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.setTimeZoneUTCOffset(PT2H);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_time_zone_ad9b04e2df42c21fd1d67ad7b2a1e7f3f}{Time\+Zone\+::set\+UTCOffset()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_program_a275563ed4d95be6a9900d2966025802c}\label{class_qore_1_1_program_a275563ed4d95be6a9900d2966025802c}} 
\index{Qore::Program@{Qore::Program}!undefine@{undefine}}
\index{undefine@{undefine}!Qore::Program@{Qore::Program}}
\doxysubsubsection{\texorpdfstring{undefine()}{undefine()}}
{\footnotesize\ttfamily nothing Qore\+::\+Program\+::undefine (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{def }\end{DoxyParamCaption})}



Unsets a \mbox{\hyperlink{conditional_parsing}{parse define}} for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}}. 


\begin{DoxyParams}{Parameters}
{\em def} & The name of the define to undefine; if the given define is not defined anyway, the operation is ignored\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{pgm.undefine(\textcolor{stringliteral}{"{}PRODUCTION"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
