Qore Programming Language Reference Manual  1.0.8
QC_ProgramControl.dox.h
1 
3 namespace Qore {
5 
15 struct StatementInfo {
19  int end_line;
21  string file;
23  int offset;
25  string source;
28 };
29 }
30 
32 namespace Qore {
34 
46 
47 public:
49 /***/
50 nothing assignBreakpoint(Breakpoint bkpt);
51 
52 public:
54 
56  constructor();
57 
58 public:
60 
62  copy();
63 
64 public:
66 /***/
67 nothing deleteAllBreakpoints();
68 
69 public:
71 /***/
72  destructor();
73 
74 public:
76 
81 bool existsFunction(string name);
82 
83 public:
85 
91 int findFunctionStatementId(string function, *list params);
92 
93 public:
95 
101 list<hash<auto>> findFunctionVariants(string function);
102 
103 public:
105 
113 int findStatementId(string file, int line);
114 
115 public:
117 
119 *hash<auto> getAllDefines();
120 
121 public:
123 /***/
124 list<Breakpoint> getBreakpoints();
125 
126 public:
128 
130 auto getDefine(string def);
131 
132 public:
134 
136 auto getGlobalVariable(string varname, *reference<bool> rexists);
137 
138 public:
140 
145 hash<auto> getGlobalVars();
146 
147 public:
149 
151 int getParseOptions();
152 
153 public:
155 
160 int getProgramId();
161 
162 public:
164 
166 *string getScriptDir();
167 
168 public:
170 
172 *string getScriptName();
173 
174 public:
176 
178 *string getScriptPath();
179 
180 public:
182 
190 hash<string,hash<string,int>> getSourceFileNames();
191 
192 public:
194 
202 hash<string,hash<string,int>> getSourceLabels();
203 
204 public:
206 
215 hash<StatementInfo> getStatementIdInfo(int statementId, bool listBreakpoints = False);
216 
217 public:
219 
224 list<int> getThreadList();
225 
226 public:
228 
231 
232 public:
234 
236 bool isDefined(string def);
237 
238 public:
240 
242 nothing setGlobalVarValue(string name, auto value);
243 
244 public:
246 
254 static list<ProgramControl> getAllPrograms();
255 
256 public:
258 
265 static ProgramControl getProgram();
266 
267 public:
269 
278 static ProgramControl resolveProgramId(int programId);
279 };
280 }
static ProgramControl resolveProgramId(int programId)
Get instance of program id.
int getParseOptions()
Returns the current binary-or&#39;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:21
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:15
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:96
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:27
The ProgramControl class provides safe information about a Qore program.
Definition: QC_ProgramControl.dox.h:45
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:11
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:27
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:19
*list breakpoints
list of assigned breakpoints, unavailable if %no-debugging (since 0.9)
Definition: QC_ProgramControl.dox.h:17
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:23
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:3
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:25
int findFunctionStatementId(string function, *list params)
Find the first statement for function entry point.