frepple::utils::XMLInputFile Class Reference

This class reads XML data from a file system. More...

#include <utils.h>

Inheritance diagram for frepple::utils::XMLInputFile:

Public Member Functions

string getFileName ()
 
void parse (Object *, bool=false)
 
void setFileName (const string &s)
 
 XMLInputFile (const string &s)
 
 XMLInputFile ()
 
- Public Member Functions inherited from frepple::utils::XMLInput
bool getAbortOnDataError () const
 
const AttributeListgetAttributes () const
 
const datapairgetCurrentElement () const
 
const datapairgetParentElement () const
 
ObjectgetParentObject () const
 
ObjectgetPreviousObject () const
 
void * getUserArea () const
 
PythonFunction getUserExit () const
 
void IgnoreElement ()
 
void invalidateCurrentObject ()
 
bool isObjectEnd ()
 
void parse (xercesc::InputSource &, Object *, bool=false)
 
void readto (Object *)
 
void setAbortOnDataError (bool i)
 
void setUserArea (void *v)
 
void setUserExit (PyObject *p)
 
void shutdown ()
 
 XMLInput (unsigned short maxNestedElmnts=20)
 
virtual ~XMLInput ()
 

Additional Inherited Members

- Public Types inherited from frepple::utils::XMLInput
typedef pair< Attribute,
XMLElement
datapair
 
- Static Public Member Functions inherited from frepple::utils::XMLInput
static char * transcodeUTF8 (const XMLCh *)
 
- Protected Member Functions inherited from frepple::utils::NonCopyable
 NonCopyable ()
 
 ~NonCopyable ()
 

Detailed Description

This class reads XML data from a file system.

The filename argument can be the name of a file or a directory. If a directory is passed, all files with the extension ".xml" will be read from it. Subdirectories are not recursed.

Definition at line 4651 of file utils.h.

Constructor & Destructor Documentation

frepple::utils::XMLInputFile::XMLInputFile ( const string &  s)
inline

Constructor. The argument passed is the name of a file or a directory.

Definition at line 4656 of file utils.h.

frepple::utils::XMLInputFile::XMLInputFile ( )
inline

Default constructor.

Definition at line 4659 of file utils.h.

Member Function Documentation

string frepple::utils::XMLInputFile::getFileName ( )
inline

Returns the name of the file or directory to process.

Definition at line 4665 of file utils.h.

void frepple::utils::XMLInputFile::parse ( Object pRoot,
bool  validate = false 
)
virtual

Parse the specified file. When a directory was passed as the argument a failure is flagged as soon as a single file returned a failure. All files in an directory are processed however, regardless of failure with one of the files.

Exceptions
RuntimeExceptionGenerated in the following conditions:
  • no input file or directory has been specified.
  • read access to the input file is not available
  • the program doesn't support reading directories on your platform

Reimplemented from frepple::utils::XMLInput.

Definition at line 857 of file xmlparser.cpp.

void frepple::utils::XMLInputFile::setFileName ( const string &  s)
inline

Update the name of the file to be processed.

Definition at line 4662 of file utils.h.


The documentation for this class was generated from the following files: