class Universe

Declared in: Universe.h
Library: libUniverse.so
Derived from: aggregatef << primitivef << BArchivable

Description

class Universe is derived from class aggregatef. At the moment, it contains in its list Systems, but in the future it may be required to hold more other types of structures, such as nebulae or black holes, or star ships.

Constructors and Destructors

Universe();
Initializes to a zero-item universe.
Universe(BMesssage *);
Constructs a universe that has been archived in the BMessage.

Members

status_t Archive(BMessage *, bool)
Archived information:
NAME TYPE VALUE
GType B_STRING_TYPE "AGGREGATE"
Subelements B_MESSAGE_TYPE {messages archiving substructures}
class B_STRING_TYPE Universe

static BArchive *Instantiate(BMessage *)
Takes a BMessage and returns the BArchivable-cast pointer to the new Universe. The calling procedure now owns the Universe.

void Save(BFile *)
Archives the universe and saves it as a message-file, with the command code 'UNVS'.
static Universe *Open(BFile *)
Returns a pointer to the Universe created from the passeed file. If something goes wrong, a "null" is passed. Note that the command code stored in the file must be 'UNVS'.