User Manual, Developers Guide and API Documentation

wns::pyconfig::Parser Class Reference

Load Python style config files.

#include <pyconfig/Parser.hpp>

Inheritance diagram for wns::pyconfig::Parser:

Inheritance graph
[legend]
Collaboration diagram for wns::pyconfig::Parser:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void appendPath (const std::string &pathname)
 Append pathname to the python search path.
void load (const std::string &filename)
 Load "filename".
void loadString (const std::string &s)
 Use "s" as configuration content.
 Parser (const std::string &filename, const std::string &pathname="")
 Constructor loading the given file as configuration.
 Parser ()
 Default constructor.
virtual ~Parser ()
 Destructor.

Static Public Member Functions

static View fromString (const std::string &s)
 Create a View object from a string.

Private Member Functions

void initPython ()
 initialize the Python interpreter

Private Attributes

std::string module_name

Static Private Attributes

static long serial = 0


Detailed Description

Definition at line 39 of file Parser.hpp.


Constructor & Destructor Documentation

Parser::Parser (  ) 

Definition at line 43 of file Parser.cpp.

Parser::Parser ( const std::string &  filename,
const std::string &  pathname = "" 
) [explicit]

Definition at line 51 of file Parser.cpp.

Parser::~Parser (  )  [virtual]

Definition at line 61 of file Parser.cpp.


Member Function Documentation

void Parser::appendPath ( const std::string &  pathname  ) 

Note:
sys.path is shared across Parser instances

Definition at line 143 of file Parser.cpp.

View Parser::fromString ( const std::string &  s  )  [static]

Definition at line 161 of file Parser.cpp.

void Parser::initPython (  )  [private]

Definition at line 124 of file Parser.cpp.

void Parser::load ( const std::string &  filename  ) 

Definition at line 67 of file Parser.cpp.

void Parser::loadString ( const std::string &  s  ) 

Definition at line 100 of file Parser.cpp.


Member Data Documentation

std::string wns::pyconfig::Parser::module_name [private]

Definition at line 95 of file Parser.hpp.

long Parser::serial = 0 [static, private]

Definition at line 93 of file Parser.hpp.


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

Generated on Sun May 27 03:33:02 2012 for openWNS by  doxygen 1.5.5