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

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

#include "suif_utils.h"
#include "common/suif_vector.h"
#include "iokernel/object_factory.h"
#include "iokernel/meta_class.h"
#include "iokernel/meta_class_iter.h"
#include "iokernel/pointer_meta_class.h"
#include "iokernel/list_meta_class.h"
#include "iokernel/aggregate_meta_class.h"
#include "iokernel/stl_meta_class.h"
#include "suifkernel/module_subsystem.h"
#include "suifkernel/token_stream.h"
#include "suifkernel/suif_exception.h"
#include "suifkernel/utilities.h"
#include "basicnodes/basic.h"
#include "utils/print_utils.h"

Functions

SuifObjectsuif_get_object (const char* id, SuifEnv* suif_env)
 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_type (const Address addr, const MetaClass* mc, Tcl_DString* res)
 Get the printed form of the type in mc and append to a DString.

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* res)
 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 ( const char * id,
SuifEnv * suif_env)

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.

int suif_get_type ( const Address addr,
const MetaClass * mc,
Tcl_DString * res)

Get the printed form of the type in mc and append to a DString.


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