Book Contents | Book Index | Master Index | Previous Chapter | Next Chapter
Search STEP Tools Web Support

23.1 Overview

The RoseInterface class manages the memory workspace, including designs in memory, database search paths, EXPRESS data dictionary, and C++ type information. There is only one instance of the RoseInterface class called ROSE . This static instance is defined by the ROSE library and is declared by standard include files.

    extern RoseInterface ROSE;    /* only instance of interface object */

All RoseDesign instances are registered with the interface object upon creation. The interface object can designate one as the default or "current" design for operations. Functions that operate on the current design by default are indicated with the following parameter:

    RoseDesign * design = <Current>

The current design is where all objects created using the pnew operator are placed. Applications which use multiple designs can specify a particular design to functions by passing a pointer to the design or, in most cases, by passing the name of the design. See Current Design for more details.

Many of the functions listed below are marked as "deprecated." These functions are simply aliases of RoseDesign functions and will be removed in a future release.


23.2 addName()

void addName(
	const char * obj_name,
	RoseObject * obj,
	RoseDesign * design = <Current>
	);
void addName(
	const char * obj_name,
	RoseObject * obj,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::addName() to temporarily associate an object with a name.


23.3 addSchema()

void addSchema(
	RoseDesign * schema,
	RoseDesign * design = <Current>
	);
void addSchema(
	RoseDesign * schema,
	const char * design_name
	);
void addSchema(
	const char * schema_name,
	RoseDesign * design = <Current>
	);
void addSchema(
	const char * schema_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::addSchema() to append a schema to the list of schemas kept by each design.


23.4 beginTraversal()

void beginTraversal(); 

The beginTraversal() and endTraversal() functions and RoseObject::visit() and RoseObject::wasVisited() functions allow algorithms to traverse objects in a design and identify which objects have already been visited. This is useful in algorithms that need to detect circularity and/or avoid unnecessary search.

The beginTraversal() and endTraversal() functions put RoseInterface object into a traversal state where data objects can be marked as visited. Calls to beginTraversal() and endTraversal() cannot be nested. An appliction must end one traversal before starting a new one. Objects remain marked until endTraversal() is called. The isTraversing() function can be used to detect if a traversal is in progress. Section 5.4.2 describes how to traverse and mark objects in greater detail.

Example

The following example uses a RoseCursor to traverse an entire design object and perform some operation on objects. Object marking is used to insure that each object is only considered once. The body of the loop can mark other objects and the wasVisited() test will prevent the loop from operating on them again.

    RoseDesign * design;
    RoseCursor objs;
    RoseObject * obj;
     
    ROSE.beginTraversal();
    objs.traverse (design);
    while (obj = objs.next()) {
        if (!obj-> wasVisited()) {    /* test for mark */
            /* do something and maybe visit other objects */
            obj-> visit();         /* mark */
        }
    }
    ROSE.endTraversal();

See Also

Marking Objects During Traversal; RoseInterface::endTraversal(); RoseInterface::isTraversing(); RoseObject::unvisit(); RoseObject::visit(); RoseObject::wasVisited()


23.5 clearWorkspace()

void clearWorkspace();

The clearWorkspace() function deletes all of the design objects currently in memory. If any design has not been saved, its contents are lost. Schema designs are not removed by this function.

Example

    ROSE.clearWorkspace();


23.6 cvt<type>to<type>()

RoseBoolean cvtOIDtoSTR(
	RoseOID oid,
	char * str  /* str is char[43] */
	);
RoseBoolean cvtSTRtoOID(
	const char * str,  /* str is char[43] */
	RoseOID &oid
	);

The cvtOIDtoSTR() and cvtSTRtoOID() functions convert between a run-time "short" object identifier ( RoseOID ) and a string representing the corresponding full identifier. Full object identifiers are 160bits long, but for efficiency, they are represented as 32bit abbreviations in memory. This abbreviated id is what the RoseOID typedef is used for.

These abbreviations can change from one program execution to another, just as memory addresses do. For this reason, passing the abbreviated identifier between executing processes will not work. Applications that need to communicate identifiers via RPC or some other mechanism should use these functions to expand a 32bit RoseOID into string representations of the full 160bit object identifier before exchanging them.

The string parameter used by the functions is a 42 character hex string of the form "0x123ABC ... 123". The calling routine should allocate a buffer of size 43 characters for the string. These functions return a boolean value indicating whether the conversion was successful.

See Also

ROSE Universal Object Identifiers (OIDS)


23.7 design()

RoseDesign * design();

The design() function the current design object. This "current" design object is where all objects created using the pnew operator are placed, and is also the default target of most RoseInterface functions.

Example

We can reproduce the behavior of many RoseInterface functions by using the design() function to call an equivalent RoseDesign function on the current design.

    ROSE.display();              /* print current design */
    ROSE.design()-> display();   /* print current design */
     
    ROSE.saveDesign();           /* save current design */
    ROSE.design()-> save();      /* save current design */
     
    ROSE.setFormat("step");         /* set file format of current design */
    ROSE.design()->format("step");  /* set file format of current design */

See Also

Current Design; RoseInterface::useDesign()


23.8 designName() / setDesignName()

char * designName(
	RoseDesign * design = <Current>
	);
void setDesignName(
	const char * new_name,
	RoseDesign * design = <Current>
	);
void setDesignName(
	const char * new_name,
	const char * old_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::name() to get and set the name of the design.


23.9 display()

void display(
	RoseDesign * design = <Current>
	);
void display(
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::display() to print the contents of a design on stdout using the ROSE text working form.


23.10 endTraversal()

void endTraversal();

The beginTraversal() and endTraversal() functions put RoseInterface object into a traversal state where data objects can be marked as visited. An appliction must end one traversal by calling endTraversal() before starting a new one. Objects remain marked until endTraversal() is called. Consult RoseInterface::beginTraversal() for more information and an example.


23.11 errcode() / errcontext()

RoseErrorCode errcode();
RoseErrorContext * errcontext();

The errcode() function returns the numeric code for the last error seen, or zero if there was no error. The errcontext() function returns the context object that defines the error, or null if the error was a general one reported through error() or warning() . The error_reset() function can be used to clear the error status.

See Also

ROSE Library Predefined Errors; RoseErrorReporter::errcode() / errcontext()


23.12 error() / warning() / message()

void error(
	const char * fmat, ...
	);
void warning(
	const char * fmat, ...
	);
void message(
	const char * fmat, ...
	);

These functions are used internally to report general conditions that do not have a pre-defined code for the report() function. The functions take variable arguments and use the printf() conventions, but no trailing newline is required.

The message() function is used to report informational messages. If the quiet() flag is set to false, these messages are not printed, but warning() and error() messages will be.

Example

    RoseDesign * design;
     
    ROSE.message ("Design %s is happy", design-> name())
    ROSE.warning ("Design %s is not happy", design-> name())
    ROSE.error ("Design %s is extremely unhappy", design-> name())

See Also

Error Reporting; RoseErrorContext::<error_severity>()


23.13 error_reporter()

RoseErrorReporter * error_reporter();
void error_reporter(
	RoseErrorReporter * eo
	);

The ST-Developer libraries use an instance of the RoseErrorReporter class to handle error reporting and logging. This instance is specified by the error_reporter() functions. Advanced applications may install a special subclass of this object in order to report errors in a specialized way.


23.14 error_reset()

void error_reset();

The error_reset() function clears the error status. This is an alias of the RoseErrorReporter::reset() function.


23.15 findDesign()

RoseDesign * findDesign(
	const char * design_name
	);

The findDesign() function searches memory and secondary storage for a design matching a name. If the design is already in the memory workspace, it will be returned immediately. If the design is not in memory, the function will search secondary storage for a matching design file. If a design file is found, it will be read into memory and returned. If no match is found, the routine will return null.

The directories searched by the findDesign() function are given by the path() function and can be specified using the $ROSE_DB environment variable. The findDesign() function does not change the current design. Call the useDesign() function to set the current design.

Note

Designs written in ROSE Working Form take precedence over an equivalent STEP Part 21 file. This is because the ROSE files contain additional information, such as object identifiers, and names. For example, if two files, data.rose and data.step , are in the same directory, the data.rose file will be chosen. The data.step file will only be chosen if it is ahead of the data.rose file in the search path.

The findDesign() function accepts full filenames with paths as well as unqualified design names. This is often useful if an application wants to read in a file that would not normally be found in the search path.

Example

The following example searches for a design called "gizmo". If the design is not in memory, the function will first look in each search path directories for a file called gizmo.rose , and then for one called gizmo.step .

    RoseDesign * design;
    design = ROSE.findDesign("gizmo");
    if (!design)
        printf ("Could not find the gizmo design\n");

The following example searches for a particular design file. If a design called "gizmo" is not in memory, the first call will look in each search path directories for a file called gizmo.step . The second call will just look for the file /usr/home/db/gizmo.step .

    RoseDesign * design;
    design = ROSE.findDesign("gizmo.step");
    design = ROSE.findDesign("/usr/home/db/gizmo.step");

See Also

Reading and Writing Design Objects; Database Search Paths; STEP Part 21 Exchange Files; ROSE Working Form Files


23.16 findDesignInWorkspace()

RoseDesign * findDesignInWorkspace(
	const char * design_name
	);

The findDesignInWorkspace() function will search the memory workspace for a design with a particular name. If the design is not in memory, the function will return null. Unlike the findDesign() function, this function does not search secondary storage.

Example

    RoseDesign * design;
    design = ROSE.findDesignInWorkspace("gizmo");
    if (!design)
        printf ("Could not find the gizmo design in memory\n");


23.17 findDomain()

RoseDomain * findDomain(
	const char * domain_name,
	RoseDesign* design = <Current>
	);
RoseDomain * findDomain(
	const char * domain_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::findDomain() to find a RoseDomain object with the given name.


23.18 findDomainInWorkspace()

RoseDomain * findDomainInWorkspace(
	const char * domain_name
	);

The findDomainInWorkspace() functions perform the findDomain() operation on all the schemas in memory. If there are multiple matches, the function returns the first domain that it finds. The function always starts the search with schemas of the current design. If no domain is found, the function returns null.

Example

    RoseDomain * pt_type = ROSE.findDomainInWorkspace ("cartesian_point");
    if (pt_type)
          printf ("Found cartesian_point domain\n");
    else  printf ("There is no cartesian_point domain in memory\n");


23.19 findObject()

RoseObject * findObject(
	const char * obj_name,
	RoseDesign * design = <Current>
	);
RoseObject * findObject(
	const char * obj_name,
	const char * design_name
	);
RoseObject * findObject(
	RoseOID oid,
	RoseDesign * design = <Current>
	);
RoseObject * findObject(
	RoseOID oid,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::findObject() to search for an object with a given name or RoseOID.


23.20 findObjectInWorkspace()

RoseObject * findObjectInWorkspace(
	const char * obj_name
	);
RoseObject * findObjectInWorkspace(
	RoseOID oid
	);

The findObjectInWorkspace() functions perform the findObject() operation on all the designs in memory. If there are multiple matches, the function returns the first one that it finds. The function always starts the search with the current design. If no object is found, the function returns null.

Example

    RoseObject * top = ROSE.findObjectInWorkspace ("top");
    if (top)
          printf ("Found top object\n");
    else  printf ("There is no top object in memory\n");


23.21 findObjects()

RoseAggregate * findObjects(
	RoseAggregate * list_to_fill,
	RoseDesign* design = <Current>
	);
RoseAggregate * findObjects(
	RoseDomain * domain,
	RoseAggregate * list_to_fill,
	RoseDesign* design = <Current>
	);
RoseAggregate * findObjects(
	RoseAggregate * list_to_fill,
	const char * design_name
	);
RoseAggregate * findObjects(
	RoseDomain * domain,
	RoseAggregate * list_to_fill,
	const char * design_name
	);
RoseAggregate * findObjects(
	RoseAggregate * list_to_fill,
	RoseObject * start
	);
RoseAggregate * findObjects(
	RoseDomain * domain,
	RoseAggregate * list_to_fill,
	RoseObject * start
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::findObjects() to search for objects which satisfy a C++ class or ROSE domain criteria.


23.22 format() / setFormat()

char * format(
	RoseDesign * design = <Current>
	);
char * format(
	const char * design_name
	);
void setFormat(
	const char * format_name,
	RoseDesign * design = <Current>
	);
void setFormat(
	const char * format_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::format() to change the format that a design is saved in.


23.23 isInPath()

RoseBoolean isInPath(
	const char * design_name
	);

The isInPath() function is used by the findDesign() function to determine whether a design with a particular name is in the database search path. The database search path is specified using the $ROSE_DB environment variable. Use the findDesign() function to retrieve a pointer to the design.

When searching directories, the search functions use filename extension to distinguish designs from other files. When a filename ends in .step , .stp , .p21 , or .pdes , it is considered to be a STEP Part 21 file. If a filename ends with .rose or .ros , it is a ROSE Working Form file.

Example

    if (ROSE.isInWorkspace ("gizmo"))
          printf ("Gizmo design is in the search path\n");
    else  printf ("Gizmo design is not in the search path\n");

See Also

Database Search Paths; RoseInterface::path(); RoseInterface::pathDesignNames()


23.24 isInWorkspace()

RoseBoolean isInWorkspace(
	const char * design_name
	);

The isInWorkspace() function indicates whether or not a design object with a given name is resident in memory. If the specified design object is in memory, isInWorkspace() returns true rather than a pointer to the design object. Use the findDesign() function to retrieve a pointer to the design.

Example

    if (ROSE.isInWorkspace ("gizmo"))
          printf ("Gizmo design is in memory\n");
    else  printf ("Gizmo design is not in memory\n");


23.25 isSystemCreate()

RoseBoolean isSystemCreate();

The isSystemCreate() function can be used within a constructor to determine the conditions under which the object is being created. There are two possibilities. If the object is created by the user (through new or pnew ), the constructor may populate attributes by creating other objects. If the object is created by the system (through copy() or findDesign() ), the the system functions may populate the attributes and the constructor should not attempt to do so.

Currently, the default constructor is used by the pnewInstance() and other system create functions. Future versions of the ROSE library may define a special constructor for this purpose.

Example

    SomeClass::SomeClass() {
        if (ROSE.isSystemCreate()) {
            /* just null out the attributes */
        }
        else {
            /* populate some attributes */
        }
    }


23.26 isTraversing()

RoseBoolean isTraversing();

The beginTraversal() and endTraversal() functions put RoseInterface object into a traversal state where data objects can be marked as visited. The isTraversing() function detects whether a traversal is in progress. Consult RoseInterface::beginTraversal() for more information and an example.


23.27 keystone()

RoseDesign * keystone();

The keystone() function returns a pointer to the ROSE "keystone" design. This design contains all the primitive domains as well as a number of other basic domains needed by all ROSE applications. This design is constructed in memory during the ROSE bootstrap process and can never be written to secondary storage.

Example

    RoseDesign * keystone = ROSE.keystone();
     
    printf ("The keystone design is called %s\n", keystone-> name());


23.28 nameTable()

Dictionary(RoseObject) * nameTable(
	RoseDesign* design = <Current>
	);
Dictionary(RoseObject) * nameTable(
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::nameTable() to access a designs internal object dictionary.


23.29 newDesign()

RoseDesign * newDesign(
	const char * design_name,
	RoseDesign * schema = NULL
	);
RoseDesign * newDesign(
	const char * design_name,
	const char * schema_name
	);

The newDesign() function creates a instance of a RoseDesign and makes it the default design. Every design must have a name. The names of designs must be unique in memory. The name will be used as the basis for the filename when the design is written to secondary storage. The new design will not contain any objects.

Every design must also have a one or more schemas. Schemas provide EXPRESS definitions for the objects within a design. When an application uses early-bound classes, each class knows it's schema, but when doing late-bound programming, the pnewInstance() and findDomain() functions must search through a list of schemas to find EXPRESS definitions.

The newDesign() function allow an application to specify one schema, either by name or by pointer. Additional schemas can be added with the addDesign() functions. An early-bound application does not need to explicitly set the schemas unless it will also be doing late-bound calls. If no schema is provided, the the schema of built in C++ classes will be assigned to the design.

Designs can be created with the new operator or the RoseInterface::newDesign() function. The new operator does not set the new design to be the default design.

Example

The example below shows two ways of creating a new design. The newDesign() function makes the new design the current design, while the new operator does not.

    RoseDesign * design;
     
    /* create and make current design */
    design = ROSE.newDesign ("gizmo","config_control_design");
     
    /* create and make current design */
    design = new RoseDesign ("gizmo","config_control_design");
    ROSE.useDesign (design);

See Also

Creating and Deleting Design Objects; RoseDesign Constructor


23.30 path()

List(String)* path();

The path() function returns the database search path used by the findDesign() function. This list of directories can be specified using the $ROSE_DB environment variable. In addition to the directories in this path, the findDesign() function will also search the ST-Developer schemas directory $ROSE/system_db/schemas .

It is a good idea to make the first directory in the search path the current directory. When the ROSE library saves a new design to secondary storage, it uses the first directory in this search path.

Example

The following example prints the search directories used by an application.

    List(String) * dirs;
    unsigned i, sz;
     
    dirs = ROSE.path();
    for (i=0, sz=dirs->size(); i<sz; i++) {
        printf ("Directory %s\n", dirs-> get(i));
    }
    printf ("Also the system_db/schemas directory\n");

See Also

Database Search Paths; RoseInterface::findDesign()


23.31 pathDesignNames()

List(String)* pathDesignNames(
	const char * dir = NULL
	);

The pathDesignNames() function returns the names of all designs the database search path used by the findDesign() function. If a directory is specified, the function returns a list of designs in that directory.

Example

The following example prints the names of all designs in the search directories.

    List(String) * designs;
    unsigned i, sz;
     
    designs = ROSE.pathDesignNames();
    for (i=0, sz=designs->size(); i<sz; i++) {
        printf ("Design %s\n", designs-> get(i));
    }


23.32 pnewInstance()

RoseObject * pnewInstance(
	const char * domain_name,
	RoseDesign * design = <Current>
	);
RoseObject * pnewInstance(
	const char * domain_name,
	const char * design_name
	);
RoseObject * pnewInstance(
	const char * domain_name,
	unsigned sz,
	RoseDesign * design = <Current>
	);
RoseObject * pnewInstance(
	const char * domain_name,
	unsigned sz
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::pnewInstance() to create a new data object within a design.


23.33 quiet()

RoseBoolean quiet();
void quiet(
	RoseBoolean quietFlag
	);

The quiet() flag determines whether or not the ROSE library displays the banner and issues messages when file I/O occurs. Setting the flag to true will prevent the banner and messages from being displayed. Setting it to false will print more informational messages. The default value is false. Since the library prints messages as soon as it is initialized, you must set this value before calling pnew or any other operations.

Example

    ROSE.quiet (ROSE_TRUE);     /* prevent messages */
    ROSE.quiet (ROSE_FALSE);    /* allow messages */
     
    if (ROSE.quiet())
        printf ("No messages will be printed\n");


23.34 removeDesign()

void removeDesign(
	RoseDesign * design = <Current>
	);
void removeDesign(
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Delete a design with the C++ delete operator or schedule it for deletion with the rose_move_to_trash() function.


23.35 removeName()

RoseObject * removeName(
	const char * obj_name,
	RoseDesign * design = <Current>
	);
RoseObject * removeName(
	const char * obj_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::removeName() to delete an object name.


23.36 report()

void report(
	RoseErrorCode, ...
	);

The report() function is used to report a predefined error or warning condition. This function is used internally to report conditions defined by the built-in error context. Applications can define their own error contexts and report to them.


23.37 rootObject() / setRootObject()

RoseObject * rootObject(
	RoseDesign* design = <Current>
	);
RoseObject * rootObject(
	const char * design_name
	);
void setRootObject(
	RoseObject * val,
	RoseDesign * design = <Current>
	);
void setRootObject(
	RoseObject * val,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::rootObject() to get and set the root object of a design.


23.38 saveDesign()

void saveDesign(
	RoseDesign * design = <Current>
	);
void saveDesign(
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::save() to save a design.


23.39 saveDesignAs()

void saveDesignAs(
	const char * new_name,
	RoseDesign * design = <Current>
	);
void saveDesignAs(
	const char * new_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::saveAs() to save a design.


23.40 saveWorkspace()

void saveWorkspace();

The saveWorkspace() function saves all of the design objects in memory. Each design will be written using the RoseDesign::save() function.


23.41 shutdown()

void shutdown();

The shutdown() function releases all of the persistent data in memory and restores the ROSE library to a pre-boot condition. You can start over and read things back in if you want to though.

See Also

RoseInterface::shutdown_everything()


23.42 shutdown_everything()

void shutdown_everything();

The shutdown_everything() function releases all of the persistent data in memory as well as any runtime C++ type information kept by the RoseType objects. Once this is done, there is no way to restart and you should not make any more calls to the ROSE library.

See Also

RoseInterface::shutdown()


23.43 useDesign()

RoseDesign * useDesign(
	const char * design_name
	);
RoseDesign * useDesign(
	RoseDesign * design
	);

The useDesign() functions change the default design object. This "current" design object is where all objects created using the pnew operator are placed, and is also the default target of most RoseInterface functions. The version which takes a design name calls findDesign() , which may read the design from secondary storage.

Example

    ROSE.useDesign ("gizmo");                     /* equivalent */
    ROSE.useDesign (ROSE.findDesign ("gizmo"));   /* equivalent */

See Also

Current Design; RoseInterface::design()RoseInterface::findDesign()


23.44 usePath()

void usePath(
	const const char * new_path
	);
void usePath(
	List(String)* dirs
	);

The usePath() function sets the database search path used by the findDesign() function. It is a good idea to make the current directory the first directory in the search path. When the ROSE library saves a new design to secondary storage, it uses the first directory in the search path.

The usePath(const char*) version expects the directories in the path to be separated by the character appropriate for the platform (colons on UNIX, semicolons on Windows, and commas on VMS). The usePath(List(String)*) version replaces the actual list object.

The initial value for the path is usually taken from the $ROSE_DB environment variable, but can be changed with the rose_get/setenv search_path() functions. Once the library has been initialized, the path can be changed with the usePath() function.

The system schemas directory is normally appended to the search path. By default this is the ST-Developer schemas directory $ROSE/system_db/schemas , but the value can be changed with rose_get/setenv system_schema_path() .

Example

The following example sets the search directories used by an application.

    ROSE.usePath (".:./schemas:/usr/home/db:/usr/home/db/schemas");

Using the second form of the function:

    List(String) * dirs = new List(String);
    dirs-> add (".");                   /* current directory */
    dirs-> add ("./schemas");           /* a relative schemas directory */
    dirs-> add ("/usr/home/db");        /* an absolute data directory */
    dirs-> add ("/usr/home/db/schemas"); /* an absolute schema directory */
    ROSE.usePath (dirs);

See Also

Database Search Paths; rose_get/setenv search_path(); rose_get/setenv system_schema_path(); RoseInterface::findDesign(); RoseInterface::path()


23.45 useSchema()

void useSchema(
	RoseDesign * schema,
	RoseDesign * design = <Current>
	);
void useSchema(
	RoseDesign * schema,
	const char * design_name
	);
void useSchema(
	const char * schema_name,
	RoseDesign * design = <Current>
	);
void useSchema(
	const char * schema_name,
	const char * design_name
	);

DEPRECATED: These functions are deprecated and will be removed in future versions. Use RoseDesign::useSchema() to set the schema of a design.


23.46 useShortNames()

RoseBoolean useShortNames();
void useShortNames(
	RoseBoolean yn
	); 

The useShortNames() functions get and set the preferences for using short names when writing STEP Part 21 files. As with reading short names, a schema equivalents file ( <schema_name>.nam ) must be present somewhere in your database search path. The short names will not be written if this file can not be found. The default is to always write long names.

Example

    ROSE.useShortNames (ROSE_TRUE);   /* short names if possible */ 
    ROSE.useShortNames (ROSE_FALSE);  /* always long names */

See Also

Short Names


23.47 userSchemaNames()

List(String) * userSchemaNames();

The userSchemaNames() function returns the names of schemas that are referenced by compiled-in C++ classes. This list does not contain system schemas such as the ROSE keystone.

Example

    List(String) * schemas;
    unsigned i, sz;
     
    schemas = ROSE.userSchemaNames();
    for (i=0, sz=schemas->size(); i<sz; i++) {
        printf ("Program uses %s schema\n", schemas-> get(i));
    }


23.48 workspaceDesigns()

List(RoseDesign) * workspaceDesigns();

The workspaceDesigns() function returns a list containing every design that has been read into the memory workspace. Do not attempt to change or free this list.

Example

    List(RoseDesign) * designs;
    unsigned i, sz;
     
    designs = ROSE.workspaceDesigns();
    for (i=0, sz=designs->size(); i<sz; i++) {
        printf ("Design %s is in memory\n", designs-> get(i)-> name());
    }


23.49 workspaceDesignNames()

List(String) * workspaceDesignNames();

The workspaceDesignNames() function returns a list containing the names of every design that has been read into the memory workspace. Do not attempt to change or free this list.

Example

    List(String) * designs;
    unsigned i, sz;
     
    designs = ROSE.workspaceDesignNames();
    for (i=0, sz=designs->size(); i<sz; i++) {
        printf ("Design %s is in memory\n", designs-> get(i));
    }


23.50 workspaceTypes()

List(RoseType) * workspaceTypes();

The workspaceTypes() function returns a list RoseType descriptors for the C++ classes and C++ primitive types that have been compiled into an application. These descriptions are used internally for matching C++ definitions to EXPRESS definitions. Do not attempt to change or free this list.

Example

    List(RoseType) * defs;
    unsigned i, sz;
     
    defs = ROSE.workspaceTypes();
    for (i=0, sz=defs->size(); i<sz; i++) {
        printf ("Definition for %s is present\n", defs-> get(i)-> name());
    }

See Also

C++ Type Information; RoseInterface::workspaceTypes()

 

| Book Contents | Book Index | Master Index | ST-Developer Home | Previous Chapter | Next Chapter |