These pages are auto-generated from self-documenting comments embedded in class files.

For more information on breve and steve, refer to the breve homepage.

Abstract : Data

Class Description:

This class is now considered obsolete and should no longer be used. See the section Archiving and Dearchiving of the breve documentation for more details.

The now obsolete class description follows.

The Data class is a special class that can be saved to disk, loaded in to simulations and otherwise manipulated in ways that other classes cannot. Because of the features of this class, it may only contain variables of type int, float or vector.

Previous versions of breve used a binary format for saving and loading data objects--the current version saves as XML files. A method for loading binary objects from previous versions still exists load-from-file, but its use is depreciated.

Class methods:


copy-contents to otherInstance (object)

Copies the contents of this data object to otherInstance. The instances must be of the same type.


load-from file theFile (string)

This method is obsolete. You should use save-as-xml and load-from-xml for saving and loading objects from now on. This method is still supported for loading in instances saved in older versions of breve.

Loads the current instance from theFile. The file is saved in the current "default" directory which may or may not be explicitly defined, depending on which breve implementation is being used. For implementations in which the user is not able to define a default directory, the default should be a "reasonable" location such as UNIX home directory or Mac OS X "Documents" directory.

Unless you are absolutely sure of which implementation and configuration will be used when your simulation is run, you should use save-with-dialog instead.


load-from-xml file theFile (string)

Loads the contents of saved XML file theFile into this object. The XML file must contain a previously archived instance of the same class (archived using save-as-xml).


load-with-dialog

Presents the user with a save dialog box in order to get a filename, and then loads the contents of the specified filename into this instance. The chosen file must contain a previously saved instance of the same object.

Previous versions of breve used a binary save of the object. The current version loads files saved in the XML file format.


save-as-xml file theFile (string)

Saves the contents of this instance to an XML file called theFile. It can later be loaded back into another instance of the same class using load-from-xml.


save-to file theFile (string)

This method is obsolete. See save-as-xml instead.


save-with-dialog

Presents the user with a save dialog box in order to get a filename, and then saves the contents of this instance to the specified filename.

Previous versions of breve used a binary save of the object. The current version saves using an XML file format.


send to theHost (string) on-port thePort (int)

Used in conjunction with NetworkServer to send the contents of this object over the network.


Documentation created Tue May 11 10:28:37 2004