1 |
/* |
2 |
* BrowserMethod.h |
3 |
* by Kirk Abbott and Ben Allan |
4 |
* Created: 1/94 |
5 |
* Version: $Revision: 1.11 $ |
6 |
* Version control file: $RCSfile: BrowserMethod.h,v $ |
7 |
* Date last modified: $Date: 2003/08/23 18:43:04 $ |
8 |
* Last modified by: $Author: ballan $ |
9 |
* |
10 |
* This file is part of the ASCEND Tcl/Tk interface |
11 |
* |
12 |
* Copyright 1997, Carnegie Mellon University |
13 |
* |
14 |
* The ASCEND Tcl/Tk interface is free software; you can redistribute |
15 |
* it and/or modify it under the terms of the GNU General Public License as |
16 |
* published by the Free Software Foundation; either version 2 of the |
17 |
* License, or (at your option) any later version. |
18 |
* |
19 |
* The ASCEND Tcl/Tk interface is distributed in hope that it will be |
20 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
22 |
* General Public License for more details. |
23 |
* |
24 |
* You should have received a copy of the GNU General Public License |
25 |
* along with the program; if not, write to the Free Software Foundation, |
26 |
* Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named |
27 |
* COPYING. COPYING is found in ../compiler. |
28 |
*/ |
29 |
|
30 |
/** @file |
31 |
* Browser Method Routines |
32 |
* <pre> |
33 |
* To include this header, you must include the following: |
34 |
* #include "tcl.h" |
35 |
* #include "utilities/ascConfig.h" |
36 |
* #include "interface/BrowserMethod.h" |
37 |
* </pre> |
38 |
*/ |
39 |
|
40 |
#ifndef Browser_procedure_io_module |
41 |
#define Browser_procedure_io_module |
42 |
|
43 |
STDHLF_H(Asc_BrowInitializeCmd); |
44 |
extern int Asc_BrowInitializeCmd(ClientData cdata, |
45 |
Tcl_Interp *interp, |
46 |
int argc, |
47 |
CONST84 char **argv); |
48 |
/** Registered as */ |
49 |
#define Asc_BrowInitializeCmdHN "brow_runmethod" |
50 |
/** Usage */ |
51 |
#define Asc_BrowInitializeCmdHU \ |
52 |
Asc_BrowInitializeCmdHN "-method name -qlfdid instance_name options" |
53 |
/** Short help text */ |
54 |
#define Asc_BrowInitializeCmdHS \ |
55 |
"Runs the method named in the instance named" |
56 |
/** Long help text */ |
57 |
#define Asc_BrowInitializeCmdHL "\ |
58 |
* Runs a method with control of where output goes, what kind of error \n\ |
59 |
* handling, and so forth according to the options:\n\ |
60 |
* -stopOnErr 1 causes error to be reported immediately.\n\ |
61 |
* -stopOnErr 0 ignores errors (message, but continue).\n\ |
62 |
* -backtrace 0 on stopping, offer only local message.\n\ |
63 |
* -backtrace 1 on stopping, print method stack unwind.\n\ |
64 |
* -output file send output to file. If not set, to ASCERR.\n\ |
65 |
" |
66 |
|
67 |
extern int Asc_BrowRunAssignmentCmd(ClientData cdata, Tcl_Interp *interp, |
68 |
int argc, CONST84 char *argv[]); |
69 |
/**< |
70 |
* <!-- Asc_BrowRunAssignmentCmd --> |
71 |
* usage: brow_assign [-search] value [units] {browser inst assignment} |
72 |
* Checks for Boolean, Integers and Reals. |
73 |
* A null inst returns a TCL_ERROR. |
74 |
* Bad data or setting an already set integer gets a TCL_ERROR w/message. |
75 |
* If units are present and type is Real, will attempt to use units in |
76 |
* assignment. If units dimensionally incompatible, returns an error. |
77 |
* If units are missing or "*" will assign the value directly without |
78 |
* conversion and without changing the dimensionality of the real. |
79 |
* If value is "UNDEFINED" returns without doing anything, regardless |
80 |
* of units. |
81 |
*/ |
82 |
|
83 |
extern int Asc_BrowRunAssignQlfdidCmd2(ClientData cdata, Tcl_Interp *interp, |
84 |
int argc, CONST84 char *argv[]); |
85 |
/**< |
86 |
* <!-- Asc_BrowRunAssignQlfdidCmd2 --> |
87 |
* Usage : qassgn2 qlfdid value [units] {qualified id assignment} |
88 |
* See the notes for Asc_BrowRunAssignment. The same applies only this |
89 |
* function requires a qulaified id. An errors will return a TCL_ERROR; |
90 |
*/ |
91 |
|
92 |
extern int Asc_BrowRunAssignQlfdidCmd3(ClientData cdata, Tcl_Interp *interp, |
93 |
int argc, CONST84 char *argv[]); |
94 |
/**< |
95 |
* <!-- Asc_BrowRunAssignQlfdidCmd3 --> |
96 |
* Usage : qassgn3 qlfdid value [units] [-relative] {qualified id assignment} |
97 |
* Yet another variant to try to get some more speed. This version |
98 |
* uses Asc_QlfdidSearch3, which is the mininal implementation of |
99 |
* searching for a name. |
100 |
* If -relative arguement provided then the assignment is expected to |
101 |
* be relative to the results of the last call to qlfdid (tcl call). |
102 |
*/ |
103 |
|
104 |
extern int Asc_BrowWriteProcedure(ClientData cdata, Tcl_Interp *interp, |
105 |
int argc, CONST84 char *argv[]); |
106 |
/**< |
107 |
* <!-- bgetproc procname pathname [search] --> |
108 |
* Write the statements of a named procedure |
109 |
* (assumed to be in g_curinst unless search appears) |
110 |
* to a full file pathname given. |
111 |
*/ |
112 |
|
113 |
extern int Asc_BrowSetAtomAttribute(Tcl_Interp *interp, |
114 |
struct Instance *atominstance, |
115 |
symchar *childname, |
116 |
enum inst_t childtype, |
117 |
void *dataptr); |
118 |
/**< |
119 |
* <!-- status = Asc_BrowSetAtomAttribute(interp,atominstance, --> |
120 |
* <!-- childname,childtype,dataptr)-->; |
121 |
* Sets the value of an attribute of the ATOM/REL instance given. |
122 |
* Childname must be from the compiler symbol table via AddSymbol or |
123 |
* AddSymbolL. Childtype determines what dataptr contains. |
124 |
* Childtype must be REAL_INST, INTEGER_INST, BOOLEAN_INST, SYMBOL_INST. |
125 |
* SET_INST is not supported at this time. dataptr must be |
126 |
* an appropriate value object for each of the INST types above: |
127 |
* double *, long *, int *, symchar **, respectively. |
128 |
* |
129 |
* Notes: |
130 |
* - A symbol value MUST come from the symbol table. |
131 |
* - You cannot change the dimens of a real child this way |
132 |
* and the double * given is assumed in SI. |
133 |
* |
134 |
* Return a value and message other than TCL_OK if these conditions |
135 |
* are not met. Except that if the childname or symbol value given |
136 |
* are not in the symbol table, then does not return. |
137 |
*/ |
138 |
|
139 |
#endif /* Browser_procedure_io_module loaded */ |
140 |
|