Qore Programming Language Reference Manual  0.9.3.1
QC_ProgramControl.dox.h
1 namespace Qore {
4 
14 struct StatementInfo {
18  int end_line;
20  string file;
22  int offset;
24  string source;
27 };
28 };
30 namespace Qore {
32 
44 
45 public:
47 /***/
48 nothing assignBreakpoint(Breakpoint bkpt);
49 
50 public:
52 
54  constructor();
55 
56 public:
58 
60  copy();
61 
62 public:
64 /***/
65 nothing deleteAllBreakpoints();
66 
67 public:
69 /***/
70  destructor();
71 
72 public:
74 
79 bool existsFunction(string name);
80 
81 public:
83 
89 int findFunctionStatementId(string function, *list params);
90 
91 public:
93 
99 list<hash<auto>> findFunctionVariants(string function);
100 
101 public:
103 
111 int findStatementId(string file, int line);
112 
113 public:
115 
117 *hash<auto> getAllDefines();
118 
119 public:
121 /***/
122 list<Breakpoint> getBreakpoints();
123 
124 public:
126 
128 auto getDefine(string def);
129 
130 public:
132 
134 auto getGlobalVariable(string varname, *reference<bool> rexists);
135 
136 public:
138 
143 hash<auto> getGlobalVars();
144 
145 public:
147 
149 int getParseOptions();
150 
151 public:
153 
158 int getProgramId();
159 
160 public:
162 
164 *string getScriptDir();
165 
166 public:
168 
170 *string getScriptName();
171 
172 public:
174 
176 *string getScriptPath();
177 
178 public:
180 
188 hash<string,hash<string,int>> getSourceFileNames();
189 
190 public:
192 
200 hash<string,hash<string,int>> getSourceLabels();
201 
202 public:
204 
213 hash<StatementInfo> getStatementIdInfo(int statementId, bool listBreakpoints = False);
214 
215 public:
217 
222 list<int> getThreadList();
223 
224 public:
226 
229 
230 public:
232 
234 bool isDefined(string def);
235 
236 public:
238 
240 nothing setGlobalVarValue(string name, auto value);
241 
242 public:
244 
252 static list<ProgramControl> getAllPrograms();
253 
254 public:
256 
263 static ProgramControl getProgram();
264 
265 public:
267 
276 static ProgramControl resolveProgramId(int programId);
277 };
278 };
static ProgramControl resolveProgramId(int programId)
Get instance of program id.
int getParseOptions()
Returns the current binary-or'ed parse option mask for the Program object.
TimeZone getTimeZone()
Returns the default local time zone for the object.
*string getScriptPath()
Returns the current script directory and filename if known, otherwise returns NOTHING.
list< int > getThreadList()
returns a list of thread IDs active in this Program
string file
refers to the label given when parsing the code
Definition: QC_ProgramControl.dox.h:20
hash< StatementInfo > getStatementIdInfo(int statementId, bool listBreakpoints=False)
get information related to statement id
int getProgramId()
Get program id.
nothing assignBreakpoint(Breakpoint bkpt)
Assign Breakpoint instance to Program. If breakpoint has been assigned to an program then is unassign...
statement information hash as returned by ProgramControl::getStatementIdInfo()
Definition: QC_ProgramControl.dox.h:14
nothing setGlobalVarValue(string name, auto value)
set the value of a global variable
*hash< auto > getAllDefines()
Retrieves all parse defines in the current Program.
*string getScriptName()
Returns the current script name as a string or NOTHING if not set.
static list< ProgramControl > getAllPrograms()
Get instance of all programs.
const False
logical False
Definition: qc_qore.dox.h:92
destructor()
Dereferences the internal Program object and deletes the Qore object.
constructor()
Throws an exception to prevent objects of this class being created from script.
int start_line
statement start line
Definition: QC_ProgramControl.dox.h:26
The ProgramControl class provides safe information about a Qore program.
Definition: QC_ProgramControl.dox.h:43
auto getDefine(string def)
Retrieves the value of the given parse define in the current Program.
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:10
list< auto > list(...)
Returns a list of the arguments passed at the top level.
*string getScriptDir()
Returns the current script directory as a string or NOTHING if not set.
static ProgramControl getProgram()
Get control for instance of current program.
list< hash< auto > > findFunctionVariants(string function)
finds all variants of a function or class method and returns a list of the results
Breakpoint class supports breakpoint setting for particular Qore ProgramControl when debugging.
Definition: QC_Breakpoint.dox.h:26
bool existsFunction(string name)
Checks if a user function exists in the program object.
int end_line
statement end line
Definition: QC_ProgramControl.dox.h:18
*list breakpoints
list of assigned breakpoints, unavailable if %no-debugging (since 0.9)
Definition: QC_ProgramControl.dox.h:16
auto getGlobalVariable(string varname, *reference< bool > rexists)
Returns a the value of the global variable identified by the first string argument.
hash< auto > getGlobalVars()
returns a hash of global variables
int offset
the offset of the code in source
Definition: QC_ProgramControl.dox.h:22
hash< string, hash< string, int > > getSourceFileNames()
Returns a list of file names registered to a statement when parsing source code.
nothing deleteAllBreakpoints()
delete all breakpoints from instance
hash< string, hash< string, int > > getSourceLabels()
Get list of label names which has been registered to a statement when parsing source code.
list< Breakpoint > getBreakpoints()
get list of breakpoint assigned to program.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
copy()
Throws an exception to prevent objects of this class from being copied.
int findStatementId(string file, int line)
Find statement related to position in file.
bool isDefined(string def)
Returns True if the given parse define is defined in the current Program (does not have to have a val...
string source
refers to the actual file name or path of the source code (if the label does not provide this info)
Definition: QC_ProgramControl.dox.h:24
int findFunctionStatementId(string function, *list params)
Find the first statement for function entry point.