source: tol/toltcl/generic/toltclInt.h @ 8593497

1941-docker-image-to-testdevel
Last change on this file since 8593497 was 5fbda58, checked in by Jorge Pérez <josp.jorge@…>, 15 years ago

refs #1388, Se implementa el metodo stats para el comando seriegrp. El grupo de series precalcula los estadísticos.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3990 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 12.7 KB
Line 
1/* toltclInt.h - Declarations of things used internally by the
2                 toltcl extension.
3                 GNU/tolTcl Library
4
5   Copyright (C) 2001, 2002, 2003 - Bayes Decisión, SL
6
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 2, or (at your option)
10   any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software
19   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20   USA.
21 */
22
23#ifndef TOLTCLINT_H
24#define TOLTCLINT_H 1
25
26#include <tt_common.h>
27#include <tcl.h>
28
29#ifndef __GNUC__
30#if !defined(strncasecmp)
31#    define strncasecmp _strnicmp
32#endif
33#if !defined(strcasecmp)
34#    define strcasecmp  _stricmp
35#endif
36#if !defined(isinf)
37#    define isinf       !_finite
38#endif
39#endif
40
41BEGIN_C_DECLS
42
43extern Tcl_Interp * TT_interp;
44
45/*! Fill in obj_result the version info corresponding to tol
46 *   {major MajorNum minor MinorNum release ReleaseNum coment Comment}
47 */
48extern int Tol_InfoVersion _ANSI_ARGS_((Tcl_Interp * interp,
49                                        Tcl_Obj * obj_result));
50
51/*! Set the language to be used  by TOL. Fill in obj_result the previous
52 *  language.
53 */
54extern int Tol_SetLanguage _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * lang,
55                                        Tcl_Obj * obj_result));
56
57/*! Return the language used  by TOL. Fill in obj_result the current
58 *  language.
59 */
60extern int Tol_GetLanguage _ANSI_ARGS_((Tcl_Interp * interp,
61                                        Tcl_Obj * obj_result));
62
63/*! Fill in obj_result the result of evaluating including the file
64 *  given as argument: the absolute path.
65 */
66extern int Tol_IncludeFile _ANSI_ARGS_((Tcl_Interp * interp,
67                                        Tcl_Obj * obj_file,
68                                        Tcl_Obj * obj_result));
69
70extern int Tol_DecompileFile _ANSI_ARGS_((Tcl_Interp * interp,
71                                          Tcl_Obj * obj_file,
72                                          Tcl_Obj * obj_result));
73
74extern int Tol_InfoFile _ANSI_ARGS_((Tcl_Interp * interp,
75                                     Tcl_Obj * file,
76                                     Tcl_Obj * obj_result));
77
78/*! Fill in obj_result the result of evaluating in TOL the given
79 *  string.
80 */
81extern int Tol_EvalExpr _ANSI_ARGS_((Tcl_Obj * obj_expr,
82                                     int hidden,
83                                     Tcl_Obj * obj_result));
84
85/*! Fill in obj_result the content of the given tol object's names. The
86 *  object are searched in the console's stack.
87 */
88extern int Tol_ListStack _ANSI_ARGS_((Tcl_Interp * interp,
89                                      int objc,
90                                      Tcl_Obj *CONST objv[],
91                                      Tcl_Obj * obj_result));
92
93/*! Release the given tol object's names. The object are searched in
94 *  the console's stack.
95 */
96extern int Tol_ReleaseStack _ANSI_ARGS_((Tcl_Interp * interp,
97                                         int objc,
98                                         Tcl_Obj *CONST objv[],
99                                         Tcl_Obj * obj_result));
100
101                                         
102/*! Return the fields of a TOL structure.
103 *  { name1 type1 ... namej typej }
104 *  type could be the name of a grammar or {STRUCT struct-name}
105 */
106extern int Tol_GetStructure _ANSI_ARGS_(( Tcl_Interp * interp,
107                                          Tcl_Obj * name, Tcl_Obj * obj_result));
108
109/*! Puts in obj_result the global reference of the given
110 *  syntaxobject. The syntaxobject could be given as set member or as
111 *  global variable. In case of error leave in obj_result the message.
112 *  Returns TCL_OK if succesfull or TCL_ERROR in case of error.
113 */
114int Tol_GetReference(Tcl_Interp *interp, int objc,
115                     Tcl_Obj *CONST objv[], Tcl_Obj * obj_result);
116
117/*
118 * Fill in obj_result the result the string representation of the
119 * address of the object referenced in obj_ref.
120 */
121extern int Tol_GetAddressFromObject _ANSI_ARGS_( (Tcl_Interp * interp,
122                                                 Tcl_Obj * obj_ref,
123                                                 Tcl_Obj * obj_result));
124/*
125 * Fill in obj_result the specific type for an Anything object, could
126 * be: Struct, Class or Anything.
127 */
128extern int Tol_GetAnythingType _ANSI_ARGS_( (Tcl_Interp * interp,
129                                             Tcl_Obj * obj_ref,
130                                             Tcl_Obj * obj_result));
131
132/*! Return the path of a set if it is a file, trigger an error in other case
133 */
134extern int Tol_GetSetPath _ANSI_ARGS_(( Tcl_Interp * interp,
135                                        Tcl_Obj * name, Tcl_Obj * obj_result));
136
137/*! Iterate over a first level's children of a given set.  The set
138 *  could be tolset if the indexes is empty or tolset[i1][i2]...[ik]
139 *  for the given indexes {i1,i2,...,ik}
140 */
141extern int Tol_IterChildren _ANSI_ARGS_((Tcl_Interp * interp,
142                                         int objc,
143                                         Tcl_Obj *CONST objv[],
144                                         Tcl_Obj * obj_result));
145
146/*! Implement a foreach proc similar to the one provided in Tcl except
147 *  that instead of iterating over the list's items it iterates over
148 *  the Set's items. The set could be tolset if the indexes is empty
149 *  or tolset[i1][i2]...[ik] for the given indexes {i1,i2,...,ik}
150 */
151extern int Tol_ForEach _ANSI_ARGS_((Tcl_Interp * interp,
152                                    int objc,
153                                    Tcl_Obj *CONST objv[],
154                                    Tcl_Obj * obj_result));
155
156/*! Fill in obj_result the content of the matrix variable.
157 */
158extern int Tol_GetMatrixContent _ANSI_ARGS_((Tcl_Interp * interp,
159                                             Tcl_Obj * obj_name,
160                                             Tcl_Obj * obj_result));
161
162/*! Fill in obj_result the content of the serie variable.
163 */
164extern int Tol_GetSerieContent _ANSI_ARGS_((Tcl_Interp * interp,
165                                            int objc,
166                                            Tcl_Obj *CONST objv[],
167                                            Tcl_Obj * obj_result));
168
169/*! Create a new command to manipulate a group of series.
170 */
171extern int Tol_CreateSerieGrp _ANSI_ARGS_((Tcl_Interp * interp,
172                                           int objc,
173                                           Tcl_Obj *CONST series[],
174                                           Tcl_Obj * obj_result));
175
176/*! Create a new command to manipulate a group of series.
177 */
178extern int Tol_DestroySerieGrp _ANSI_ARGS_((Tcl_Interp * interp,
179                                           int objc,
180                                           Tcl_Obj *CONST objv[],
181                                           Tcl_Obj * obj_result));
182
183/*! Create a new command to manipulate a group of sets (only one set)
184 */
185extern int Tol_CreateTable _ANSI_ARGS_((Tcl_Interp * interp,
186                                        Tcl_Obj * tblcmd,
187                                        Tcl_Obj * objref,
188                                        int ismat,
189                                        Tcl_Obj * obj_result));
190
191/*! Create a new command to manipulate a group of sets (only one set)
192 */
193extern int Tol_DestroyTable _ANSI_ARGS_((Tcl_Interp * interp,
194                                         int objc,
195                                         Tcl_Obj *CONST objv[],
196                                         Tcl_Obj * obj_result));
197
198/*! Fill in obj_result the list of tol files included
199 */
200extern int Tol_InfoIncluded _ANSI_ARGS_((Tcl_Interp * interp,
201                                         Tcl_Obj * obj_result));
202
203/*! Fill in obj_result the list of grammars defined in TOL
204 */
205extern int Tol_SetGrammarsObj _ANSI_ARGS_((Tcl_Interp * interp,
206                                           Tcl_Obj * obj_result));
207
208/*! Fill in obj_result the list of packages defined in TOL
209 */
210extern int Tol_SetPackagesObj _ANSI_ARGS_((Tcl_Interp * interp,
211                                           Tcl_Obj * obj_result));
212
213/*! Fill in obj_result the description of gra_name.
214 */
215int Tol_SetGrammarDescObj _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * gra_name,
216                                        Tcl_Obj * obj_result));
217
218/*! Fill in obj_result the description of pkgName.
219 */
220int Tol_SetPackageDescObj _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj *pkgName,
221                                       Tcl_Obj * obj_result));
222
223/*! Fill in obj_result the functions defined for grammar gra_name.
224 */
225extern int Tol_SetFunctionsObj _ANSI_ARGS_((Tcl_Interp * interp,
226                                            Tcl_Obj * gra_name,
227                                            Tcl_Obj * obj_result));
228
229/*! Fill in obj_result the function's prototype and description
230 *  for a given function in a given grammar.
231 */
232int Tol_SetFunctionInfoObj _ANSI_ARGS_((Tcl_Obj * gra_name,
233                            Tcl_Obj * fun_name,
234                            Tcl_Obj * obj_result));
235/*! Fill in obj_result the variables defined for grammar gra_name.
236 */
237extern
238int Tol_SetVariablesObj _ANSI_ARGS_((Tcl_Interp * interp,
239                                    Tcl_Obj * gra_name,
240                                    Tcl_Obj * obj_result));
241
242/*! Fill in obj_result the variables's description for a given function
243 *  in a given grammar.
244 */
245extern
246int Tol_SetVariableInfoObj _ANSI_ARGS_((Tcl_Obj * gra_name,
247                                       Tcl_Obj * var_name,
248                                       Tcl_Obj * obj_result));
249
250/*! Create a new command to access the given TOL timeset object name.
251 */
252extern
253int Tol_CreateTMSCmd _ANSI_ARGS_((Tcl_Interp * interp,
254                                  Tcl_Obj * tmscmd,
255                                  Tcl_Obj * tmsname,
256                                  Tcl_Obj * obj_result));
257
258/*! Destroy the tcl tms commands given in objv.
259 */
260extern
261int Tol_DestroyTMSCmd _ANSI_ARGS_((Tcl_Interp * interp,
262                                  int objc, Tcl_Obj *CONST objv[],
263                                  Tcl_Obj * obj_result));
264
265/*! Implement tol::date
266 */
267extern
268int Tol_DateOption _ANSI_ARGS_((Tcl_Interp * interp,
269                                int objc, Tcl_Obj *CONST objv[],
270                                Tcl_Obj * obj_result));
271
272/*! Implement tol::autocorr
273 */
274extern
275int Tol_GetAutoCorr _ANSI_ARGS_((Tcl_Interp * interp,
276                                int objc, Tcl_Obj *CONST objv[],
277                                Tcl_Obj * obj_result));
278
279/*! Implement tol::seriestat
280 */
281extern
282int Tol_ComputeSerieStat _ANSI_ARGS_((Tcl_Interp * interp,
283                                  int objc, Tcl_Obj *CONST objv[],
284                                  Tcl_Obj * obj_result));
285extern
286int Tol_StopEvaluation _ANSI_ARGS_(());
287
288extern
289int Tol_LCFormat _ANSI_ARGS_((Tcl_Interp*   interp,
290                              Tcl_Obj*CONST value,
291                              Tcl_Obj*      obj_result));
292extern
293void Tol_InstallHciWriter _ANSI_ARGS_(());
294
295extern
296void Tol_InstallMethodsHook _ANSI_ARGS_(());
297
298END_C_DECLS
299
300//------------------------------------------------------------
301#ifdef __cplusplus
302
303//#define FINDVARIABLE FindVariable
304#define FINDVARIABLE(name) FindOperand(name,true)
305
306class BSyntaxObject;
307class BGrammar;
308class BDate;
309class BList;
310
311extern
312int Tol_CreateSerieGrp _ANSI_ARGS_((Tcl_Interp * interp,
313                                    char * sgrp_name,
314                                    BList * series,
315                                    Tcl_Obj * obj_result));
316
317extern
318int Tol_ParseDate(Tcl_Interp * interp, char * what, BDate & date);
319
320/*!
321 *  Tol_ResolveObject --
322 *
323 *     Resolve a SyntaxObject given a toltcl object reference. A
324 *     reference is {TYPE ?container? i1 i2 ... in} or a global
325 *     container's name of type File|Set|NameBlock|Console. When TYPE
326 *     is Console then container is not given. The grammar of the
327 *     object found is matched to the given argument grammar. If the
328 *     return value is NULL an error message is left in interp.
329 */
330extern
331BSyntaxObject * Tol_ResolveObject(Tcl_Interp *interp,
332                                  Tcl_Obj    *obj_ref,
333                                  Tcl_Obj    *obj_result/*,
334                                                          BGrammar   *grammar=NULL*/);
335
336extern
337int Tol_ListToDate _ANSI_ARGS_(( Tcl_Interp * interp, Tcl_Obj * list,
338                    BDate & date, Tcl_Obj * obj_result ));
339
340extern
341int Tol_DateToList _ANSI_ARGS_(( BDate & date, Tcl_Obj * obj_result ));
342
343#endif /* __cplusplus */
344//------------------------------------------------------------
345
346#endif /* TOLTCLINT_H */
Note: See TracBrowser for help on using the repository browser.