Arc::Config Class Reference

Configuration element - represents (sub)tree of ARC configuration. More...

#include <ArcConfig.h>

Inheritance diagram for Arc::Config:
Arc::XMLNode

Public Member Functions

 Config ()
 Config (const char *filename)
 Config (const std::string &xml_str)
 Config (XMLNode xml)
 Config (long cfg_ptr_addr)
 Config (const Config &cfg)
void print (void)
bool parse (const char *filename)
const std::string & getFileName (void) const
void setFileName (const std::string &filename)
void save (const char *filename)

Detailed Description

Configuration element - represents (sub)tree of ARC configuration.

This class is intended to be used to pass configuration details to various parts of HED and external modules. Currently it's just a wrapper over XML tree. But than may change in a future, although interface should be preserved. Currently it is capable of loading XML configuration document from file. In future it will be capable of loading more user-readable format and process it into tree-like structure convenient for machine processing (XML-like). So far there are no schema and/or namespaces assigned.


Constructor & Destructor Documentation

Arc::Config::Config (  )  [inline]

Creates empty XML tree

Arc::Config::Config ( const char *  filename  ) 

Loads configuration document from file 'filename'

Arc::Config::Config ( const std::string &  xml_str  )  [inline]

Parse configuration document from memory

Arc::Config::Config ( XMLNode  xml  )  [inline]

Acquire existing XML (sub)tree. Content is not copied. Make sure XML tree is not destroyed while in use by this object.

Arc::Config::Config ( long  cfg_ptr_addr  ) 

Copy constructor used by language bindings

Arc::Config::Config ( const Config cfg  ) 

Copy constructor used by language bindings


Member Function Documentation

const std::string& Arc::Config::getFileName ( void   )  const [inline]

Gives back file name of config file or empty string if it was generared from the XMLNode subtree

bool Arc::Config::parse ( const char *  filename  ) 

Parse configuration document from file 'filename'

void Arc::Config::print ( void   ) 

Print structure of document. For debuging purposes. Printed content is not an XML document.

void Arc::Config::save ( const char *  filename  ) 

Save to file

void Arc::Config::setFileName ( const std::string &  filename  )  [inline]

Set the file name of config file


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:19 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3