#include <dcFile.h>
Public Types | |
typedef pvector< DCClass * > | Classes |
typedef pmap< string, DCClass * > | ClassesByName |
Public Member Functions | |
DCFile () | |
~DCFile () | |
bool | read (Filename filename) |
Opens and reads the indicated .dc file by name. | |
bool | read (istream &in, const string &filename=string()) |
Parses the already-opened input stream for distributed class descriptions. | |
bool | write (Filename filename) const |
Opens the indicated filename for output and writes a parseable description of all the known distributed classes to the file. | |
bool | write (ostream &out, const string &filename=string()) const |
Writes a parseable description of all the known distributed classes to the file. | |
int | get_num_classes () |
Returns the number of classes read from the .dc file(s). | |
DCClass * | get_class (int n) |
Returns the nth class read from the .dc file(s). | |
DCClass * | get_class_by_name (const string &name) |
Returns the class that has the indicated name, or NULL if there is no such class. | |
unsigned long | get_hash () const |
Returns a 32-bit hash index associated with this file. | |
void | generate_hash (HashGenerator &hash) const |
Accumulates the properties of this file into the hash. | |
bool | add_class (DCClass *dclass) |
Adds the newly-allocated distributed class definition to the file. | |
Public Attributes | |
Classes | _classes |
ClassesByName | _classes_by_name |
Definition at line 39 of file dcFile.h.
|
|
|
|
|
Definition at line 42 of file dcFile.cxx. References _classes. |
|
Definition at line 53 of file dcFile.cxx. References VirtualFileSystem::get_global_ptr(), NULL, VirtualFileSystem::open_read_file(), and read(). |
|
Adds the newly-allocated distributed class definition to the file. The DCFile becomes the owner of the pointer and will delete it when it destructs. Returns true if the class is successfully added, or false if there was a name conflict. Definition at line 332 of file dcFile.cxx. |
|
Accumulates the properties of this file into the hash.
Definition at line 307 of file dcFile.cxx. |
|
Returns the nth class read from the .dc file(s).
Definition at line 247 of file dcFile.cxx. References _classes_by_name, and DCClass::_name. |
|
Returns the class that has the indicated name, or NULL if there is no such class.
Definition at line 263 of file dcFile.cxx. References _classes. |
|
Returns a 32-bit hash index associated with this file. This number is guaranteed to be consistent if the contents of the file have not changed, and it is very likely to be different if the contents of the file do change. Definition at line 290 of file dcFile.cxx. |
|
Returns the number of classes read from the .dc file(s).
Definition at line 234 of file dcFile.cxx. References _classes, and HashGenerator::add_int(). |
|
Parses the already-opened input stream for distributed class descriptions. The filename parameter is optional and is only used when reporting errors. The distributed classes defined in the file will be appended to the set of distributed classes already recorded, if any. Returns true if the file is successfully read, false if there was an error (in which case the file might have been partially read). Definition at line 143 of file dcFile.cxx. |
|
Opens and reads the indicated .dc file by name. The distributed classes defined in the file will be appended to the set of distributed classes already recorded, if any. Returns true if the file is successfully read, false if there was an error (in which case the file might have been partially read). Definition at line 83 of file dcFile.cxx. Referenced by ~DCFile(). |
|
Writes a parseable description of all the known distributed classes to the file. The filename parameter is optional and is only used when reporting errors. Returns true if the description is successfully written, false otherwise. Definition at line 208 of file dcFile.cxx. |
|
Opens the indicated filename for output and writes a parseable description of all the known distributed classes to the file. Returns true if the description is successfully written, false otherwise. Definition at line 170 of file dcFile.cxx. |
|
Definition at line 65 of file dcFile.h. Referenced by DCFile(), get_class_by_name(), and get_num_classes(). |
|
Definition at line 70 of file dcFile.h. Referenced by get_class(). |