/[ascend]/trunk/tcltk98/generic/interface/UserData.h
ViewVC logotype

Contents of /trunk/tcltk98/generic/interface/UserData.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations) (download) (as text)
Sat Nov 13 16:40:11 2004 UTC (17 years, 7 months ago) by aw0a
Original Path: trunk/tcltk98/interface/UserData.h
File MIME type: text/x-chdr
File size: 5378 byte(s)
try again to commit moving tcl stuff
1 /*
2 * UserData.h
3 * by Kirk Abbott and Ben Allan
4 * Created: 1/94
5 * Version: $Revision: 1.6 $
6 * Version control file: $RCSfile: UserData.h,v $
7 * Date last modified: $Date: 2003/08/23 18:43:09 $
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 #ifndef UserData_module_loaded
31 #define UserData_module_loaded
32
33 /*
34 * To include this header, you must include the following:
35 * #include "tcl.h"
36 * #include "interface/UserData.h"
37 */
38
39
40 extern void Asc_UserDataLibraryInitialize(void);
41 /*
42 * Initializes the user data library to NULL. Should only be
43 * called once. Does not check for existence or anything.
44 */
45
46 extern int Asc_UserDataInitializeCmd(ClientData cdata, Tcl_Interp *interp,
47 int argc, CONST84 char *argv[]);
48 /*
49 * Registered as: __userdata_init
50 * The tcl command to allow initialization interactively.
51 * Initializes the user data library to NULL. Should only be
52 * called once. Does not check for existence or anything.
53 */
54
55 extern int Asc_UserDataDestroyCmd(ClientData cdata, Tcl_Interp *interp,
56 int argc, CONST84 char *argv[]);
57 /*
58 * Registered as: __userdata_destroy ?one?all? id
59 * Usage : __userdata_destroy one foo;
60 * Usage : __userdata_destroy all;
61 * Will deallocate the memory associated with the user data with given
62 * id. In the 'all' mode, will deallocate everything and set up the
63 * user data library for initializion. This is the mode that would be
64 * used if the entire library were to be flushed if say, a simulation
65 * were to be deleted.
66 */
67
68 extern int Asc_UserDataCreateCmd(ClientData cdata, Tcl_Interp *interp,
69 int argc, CONST84 char *argv[]);
70 /*
71 * Registered as : __userdata_create type
72 * This creates a node and stores it in the UserData table.
73 * Type is any valid string of "real_info", "inst_info",
74 * "probe_info", "list_info". The id of the user_data node created will
75 * be returned and has to be the refence id for subsequent queries on the
76 * object.
77 */
78
79 extern int Asc_UserDataSaveValuesCmd(ClientData cdata, Tcl_Interp *interp,
80 int argc, CONST84 char *argv[]);
81 /*
82 * Registered as : __userdata_save from to
83 * Here 'from' is either of current, search, of an id which has been
84 * previously been stored in the table as an inst_info.
85 * The userdata library is searched for the given from instance. If found
86 * will simply update the REAL_ATOM_INST in the virtual file. Otherwise
87 * it will create a userdata node, visit the instance tree to write to the
88 * virtual file, and add this node to the userdata table.
89 * The id of the node is returned if all goes well.
90 */
91
92 extern int Asc_UserDataRestoreValuesCmd(ClientData cdata, Tcl_Interp *interp,
93 int argc, CONST84 char *argv[]);
94 /*
95 * Registered as : __userdata_restore id
96 * The id is looked up in the userdata library. If not found an error will
97 * be returned. Otherwise the values stored in the virtual file will be
98 * copied back to the instance tree. The userdata associated with this id
99 * must be of type real_info.
100 */
101
102 extern int Asc_UserDataQueryCmd(ClientData cdata, Tcl_Interp *interp,
103 int argc, CONST84 char *argv[]);
104 /*
105 * Registered as : __userdata_query ?type?exist? id.
106 * This provides some general query commands. At the moment the only
107 * queries supported are the type of an id and whether a given id
108 * exists within the user_data library. In case a given id does not
109 * exist the string "error_info" will be returned.
110 */
111
112 extern int Asc_UserDataPrintLibrary(ClientData cdata, Tcl_Interp *interp,
113 int argc, CONST84 char *argv[]);
114 /*
115 * Registered as : __userdata_print
116 * This command will return a formatted string of containing the contents
117 * of the user_data library. The string will be a proper list with list
118 * elements of the form {id type}.
119 */
120
121 /*
122 * It is hoped to register two functions of the form.
123 * __userdata__apply
124 * ?to_inst_info?to_list_info?to_real_info?to_probe_info?
125 * id funcname.
126 *
127 * where: id is the id of a user data stored in the user data library.
128 * funcname is the id of a function possibly also stored in
129 * the user data library, or maybe the external function library.
130 * that will operate over the different user data types stored in
131 * in the userdata library.
132 */
133 #endif /* UserData_module_loaded */

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22