#include <xrb_datafilevalue.hpp>
Public Member Functions | |
virtual DataFileElementType | ElementType () const =0 |
DataFileValue const * | PathElement (std::string const &path) const |
bool | PathElementBoolean (std::string const &path) const throw (std::string) |
Sint32 | PathElementSint32 (std::string const &path) const throw (std::string) |
Uint32 | PathElementUint32 (std::string const &path) const throw (std::string) |
Float | PathElementFloat (std::string const &path) const throw (std::string) |
char | PathElementCharacter (std::string const &path) const throw (std::string) |
std::string const & | PathElementString (std::string const &path) const throw (std::string) |
DataFileArray const * | PathElementArray (std::string const &path) const throw (std::string) |
DataFileStructure const * | PathElementStructure (std::string const &path) const throw (std::string) |
virtual void | Print (IndentFormatter &formatter) const =0 |
virtual void | PrintAST (IndentFormatter &formatter) const =0 |
Protected Member Functions | |
virtual DataFileValue const * | SubpathElement (std::string const &path, Uint32 start) const =0 |
Friends | |
class | DataFileKeyPair |
class | DataFileArray |
class | DataFileStructure |
A data file is a human-readable text file which functions as a generalized storage medium. The file is organized up into sets of potentially nested primitives.
The primitive types are
The basic data types (boolean, integer, floating point, character, string) are equivalent to C++ builtin types (where string is stored using an STL basic_string). The significance of the key/value pair is to give the ability to give a name to a particular value. The structure is used to store nested key/value pairs (where the values can be anything except key/value pairs). The array is used to store nested values (where the values can be any of the above).
Here is an example of a data file.
blah - do later
See xrb_datafilescanner.lpp and xrb_datafileparser.ypp for technical details.
Definition at line 268 of file xrb_datafilevalue.hpp.