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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by aw0a, Tue Dec 7 17:37:58 2004 UTC revision 54 by jds, Tue Aug 2 11:20:09 2005 UTC
# Line 27  Line 27 
27   *  COPYING.  COPYING is found in ../compiler.   *  COPYING.  COPYING is found in ../compiler.
28   */   */
29    
30  #ifndef UserData_module_loaded  /** @file
31  #define UserData_module_loaded   *  User data procedures.
32     *  <pre>
 /*  
33   *  To include this header, you must include the following:   *  To include this header, you must include the following:
34   *      #include "tcl.h"   *      #include "tcl.h"
35     *      #include "utilities/ascConfig.h"
36   *      #include "interface/UserData.h"   *      #include "interface/UserData.h"
37     *  </pre>
38     *  @todo See note at bottom of interface/UserData.h.
39   */   */
40    
41    #ifndef UserData_module_loaded
42    #define UserData_module_loaded
43    
44  extern void Asc_UserDataLibraryInitialize(void);  extern void Asc_UserDataLibraryInitialize(void);
45  /*  /**<
46   *  Initializes the user data library to NULL. Should only be   *  Initializes the user data library to NULL. Should only be
47   *  called once. Does not check for existence or anything.   *  called once. Does not check for existence or anything.
48   */   */
49    
50  extern int Asc_UserDataInitializeCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataInitializeCmd(ClientData cdata, Tcl_Interp *interp,
51                                       int argc, CONST84 char *argv[]);                                       int argc, CONST84 char *argv[]);
52  /*  /**<
  *  Registered as:  __userdata_init  
53   *  The tcl command to allow initialization interactively.   *  The tcl command to allow initialization interactively.
54   *  Initializes the user data library to NULL. Should only be   *  Initializes the user data library to NULL. Should only be
55   *  called once. Does not check for existence or anything.   *  called once. Does not check for existence or anything.<br><br>
56     *
57     *  Registered as:  __userdata_init
58   */   */
59    
60  extern int Asc_UserDataDestroyCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataDestroyCmd(ClientData cdata, Tcl_Interp *interp,
61                                int argc, CONST84 char *argv[]);                                    int argc, CONST84 char *argv[]);
62  /*  /**<
  *  Registered as: __userdata_destroy ?one?all? id  
  *  Usage : __userdata_destroy one foo;  
  *  Usage : __userdata_destroy all;  
63   *  Will deallocate the memory associated with the user data with given   *  Will deallocate the memory associated with the user data with given
64   *  id. In the 'all' mode, will deallocate everything and set up the   *  id. In the 'all' mode, will deallocate everything and set up the
65   *  user data library for initializion. This is the mode that would be   *  user data library for initializion. This is the mode that would be
66   *  used if the entire library were to be flushed if say, a simulation   *  used if the entire library were to be flushed if say, a simulation
67   *  were to be deleted.   *  were to be deleted.<br><br>
68     *
69     *  Usage :
70     *    - __userdata_destroy one foo;
71     *    - __userdata_destroy all;
72     *
73     *  Registered as: __userdata_destroy ?one?all? id
74   */   */
75    
76  extern int Asc_UserDataCreateCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataCreateCmd(ClientData cdata, Tcl_Interp *interp,
77                               int argc, CONST84 char *argv[]);                                   int argc, CONST84 char *argv[]);
78  /*  /**<
  *  Registered as : __userdata_create type  
79   *  This creates a node and stores it in the UserData table.   *  This creates a node and stores it in the UserData table.
80   *  Type is any valid string of "real_info", "inst_info",   *  Type is any valid string of "real_info", "inst_info",
81   *  "probe_info", "list_info". The id of the user_data node created will   *  "probe_info", "list_info". The id of the user_data node created will
82   *  be returned and has to be the refence id for subsequent queries on the   *  be returned and has to be the refence id for subsequent queries on the
83   *  object.   *  object.<br><br>
84     *
85     *  Registered as : __userdata_create type
86   */   */
87    
88  extern int Asc_UserDataSaveValuesCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataSaveValuesCmd(ClientData cdata, Tcl_Interp *interp,
89                                   int argc, CONST84 char *argv[]);                                       int argc, CONST84 char *argv[]);
90  /*  /**<
  *  Registered as : __userdata_save from to  
  *  Here 'from' is either of current, search, of an id which has been  
  *  previously been stored in the table as an inst_info.  
91   *  The userdata library is searched for the given from instance. If found   *  The userdata library is searched for the given from instance. If found
92   *  will simply update the REAL_ATOM_INST in the virtual file. Otherwise   *  will simply update the REAL_ATOM_INST in the virtual file. Otherwise
93   *  it will create a userdata node, visit the instance tree to write to the   *  it will create a userdata node, visit the instance tree to write to the
94   *  virtual file, and add this node to the userdata table.   *  virtual file, and add this node to the userdata table.
95   *  The id of the node is returned if all goes well.   *  The id of the node is returned if all goes well.
96     *  Here 'from' is either of current, search, of an id which has been
97     *  previously been stored in the table as an inst_info.<br><br>
98     *
99     *  Registered as : __userdata_save from to
100   */   */
101    
102  extern int Asc_UserDataRestoreValuesCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataRestoreValuesCmd(ClientData cdata, Tcl_Interp *interp,
103                                      int argc, CONST84 char *argv[]);                                          int argc, CONST84 char *argv[]);
104  /*  /**<
  *  Registered as : __userdata_restore id  
105   *  The id is looked up in the userdata library. If not found an error will   *  The id is looked up in the userdata library. If not found an error will
106   *  be returned. Otherwise the values stored in the virtual file will be   *  be returned. Otherwise the values stored in the virtual file will be
107   *  copied back to the instance tree. The userdata associated with this id   *  copied back to the instance tree. The userdata associated with this id
108   *  must be of type real_info.   *  must be of type real_info.<br><br>
109     *
110     *  Registered as : __userdata_restore id
111   */   */
112    
113  extern int Asc_UserDataQueryCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataQueryCmd(ClientData cdata, Tcl_Interp *interp,
114                              int argc, CONST84 char *argv[]);                                  int argc, CONST84 char *argv[]);
115  /*  /**<
  *  Registered as : __userdata_query ?type?exist? id.  
116   *  This provides some general query commands. At the moment the only   *  This provides some general query commands. At the moment the only
117   *  queries supported are the type of an id and whether a given id   *  queries supported are the type of an id and whether a given id
118   *  exists within the user_data library. In case a given id does not   *  exists within the user_data library. In case a given id does not
119   *  exist the string "error_info" will be returned.   *  exist the string "error_info" will be returned.<br><br>
120     *
121     *  Registered as : __userdata_query ?type?exist? id.
122   */   */
123    
124  extern int Asc_UserDataPrintLibrary(ClientData cdata, Tcl_Interp *interp,  extern int Asc_UserDataPrintLibrary(ClientData cdata, Tcl_Interp *interp,
125                                  int argc, CONST84 char *argv[]);                                      int argc, CONST84 char *argv[]);
126  /*  /**<
  *  Registered as : __userdata_print  
127   *  This command will return a formatted string of containing the contents   *  This command will return a formatted string of containing the contents
128   *  of the user_data library. The string will be a proper list with list   *  of the user_data library. The string will be a proper list with list
129   *  elements of the form {id type}.   *  elements of the form {id type}.<br><br>
130     *
131     *  Registered as : __userdata_print
132   */   */
133    
134  /*  /*
# Line 130  extern int Asc_UserDataPrintLibrary(Clie Line 143  extern int Asc_UserDataPrintLibrary(Clie
143   *    that will operate over the different user data types stored in   *    that will operate over the different user data types stored in
144   *    in the userdata library.   *    in the userdata library.
145   */   */
146  #endif /* UserData_module_loaded */  
147    #endif  /* UserData_module_loaded */
148    

Legend:
Removed from v.17  
changed lines
  Added in v.54

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