Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

nci/suif/suif2b/tclsuif/tclsuif/suif_utils.h File Reference

#include "tcl.h"
#include "suifkernel/suif_object.h"
#include "suifkernel/suif_env.h"

Functions

SuifObjectsuif_get_object (SuifEnv* suif_env, const char* id)
 Find the SuifObject from the current file set block. More...

SuifObjectsuif_get_object_with_test (const char* id, SuifEnv *suif_env, Tcl_Interp* interp)
 Find the SuifObject from the current file set block. More...

unsigned suif_get_children (SuifObject* root, suif_vector<SuifObject*>* children)
 Get all immediate children (owned objects). More...

unsigned suif_get_referenced (SuifObject* root, suif_vector<SuifObject*> *referenced)
 Get all immediate referenced object. More...

int suif_get_field_names (const Address addr, const MetaClass* mc, Tcl_DString* dstr)
 Get the name of all fields in this object. More...

int suif_get_field_values (const Address addr, const MetaClass* mc, Tcl_DString* dstr)
 Get the printed form of all field values in this object. More...

int suif_get_field_types (const Address addr, const MetaClass* mc, Tcl_DString* dstr)
 Get the printed form of a field type. More...


Function Documentation

unsigned suif_get_children ( SuifObject * root,
suif_vector<SuifObject *>* children)

Get all immediate children (owned objects).

Parameters:
root   IN the parent.
children   OUT into which the children are dumped.
Returns:
number of immediate children.

int suif_get_field_names ( const Address addr,
const MetaClass * mc,
Tcl_DString * dstr)

Get the name of all fields in this object.

Parameters:
dstr   OUT which hold the result.
Returns:
TCL_OK or TCL_ERROR.

int suif_get_field_types ( const Address addr,
const MetaClass * mc,
Tcl_DString * dstr)

Get the printed form of a field type.

result in one of : {elementary classname} {pointer basetype owned_or_referenced} {list element_type} {object classname} {aggregate classname fieldnames fieldtypes} {unknown metaclassname}

Returns:
TCL_OK or TCL_ERROR.

int suif_get_field_values ( const Address addr,
const MetaClass * mc,
Tcl_DString * dstr)

Get the printed form of all field values in this object.

Parameters:
dstr   OUT which hold the result.
Returns:
TCL_OK or TCL_ERROR.

SuifObject * suif_get_object ( SuifEnv * suif_env,
const char * id)

Find the SuifObject from the current file set block.

Search only via the owner link.

Parameters:
suif_env   IN
id   IN name of the object searching for.

SuifObject * suif_get_object_with_test ( const char * id,
SuifEnv * suif_env,
Tcl_Interp * interp)

Find the SuifObject from the current file set block.

If not found, enter an error message to the tcl interpreter.

Parameters:
id   IN name of the object being sought for.
suif_env   IN the suif env.
interp   IN result will be set to an error message if the object is not found.
Returns:
the object or NULL if not found.

unsigned suif_get_referenced ( SuifObject * root,
suif_vector<SuifObject *>* referenced)

Get all immediate referenced object.

Parameters:
root   IN the parent.
children   OUT into which the children are dumped.
Returns:
number of immediate children.

Generated at Mon Jul 31 13:42:33 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000