#include <resourceFile.h>
Inheritance diagram for ResourceFile:

File-related methods. | |
| bool | open (const String &name) |
| void | close () |
| Close the file. | |
| void | saveAs (const String &name) |
| void | save (const Entry &entry) |
| void | save () |
| void | saveAs (const Entry &entry, const String &name) |
Processor and Visitor related methods | |
| void | host (Visitor< ResourceFile > &visitor) |
| bool | apply (UnaryProcessor< Entry > &processor) |
| bool | applyChildren (Entry &entry, UnaryProcessor< Entry > &processor) |
Public Types | |
| typedef Entry::Iterator | Iterator |
| typedef Entry::ConstIterator | ConstIterator |
Type Definition | |
| typedef ResourceEntry | Entry |
Public Member Functions | |
| Iterator | begin () |
| Iterator | end () |
| ConstIterator | begin () const |
| ConstIterator | end () const |
Constructors and Destructors | |
| ResourceFile () | |
| Default constructor. | |
| ResourceFile (const String &name) throw (Exception::FileNotFound) | |
| Detailed constructor. | |
| ResourceFile (const ResourceFile &file) throw (Exception::FileNotFound) | |
| Copy constructor. | |
| virtual | ~ResourceFile () throw () |
| Destructor. | |
| void | destroy () |
| Destroy method. | |
| virtual void | clear () throw () |
| Clear method. | |
Accessors | |
| Size | getSize () const |
| Entry & | getRoot () |
| const Entry & | getRoot () const |
| Entry * | getEntry (const String &key_path) |
| const Entry * | getEntry (const String &key_path) const |
| String * | getValue (const String &key_path) |
| const String * | getValue (const String &key_path) const |
| Entry * | insert (const String &key_path, const String &name) |
| bool | removeKey (const String &key_path) |
Attributes | |
| bool | operator== (const ResourceFile &entry) const |
| Equality operator. | |
| bool | operator!= (const ResourceFile &entry) const |
| Inequality operator. | |
| bool | hasKey (const String &key_path) const |
| bool | isEmpty () const |
Debugging and Diagnostics | |
| bool | isValid () const |
| Test if the file is valid. | |
| void | dump (std::ostream &s=std::cout, Size depth=0) const |
Static Public Attributes | |
Constants | |
| char | ENTRY_BEGIN |
| char | ENTRY_END |
| char | SEPARATOR |
Friends | |
Storers | |
| std::istream & | operator>> (std::istream &s, ResourceFile &resource_file) |
|
|
Detailed constructor.
|
|
|
Close the file.
Reimplemented from File. |
|
|
Test if the file is valid. If the filename was not set, false is returned. This function uses std::fstream::good().
Reimplemented from File. |