Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WsAbstractProperties Class Referenceabstract

Abstract Properties class. More...

#include <WsAbstractProperties.h>

Inheritance diagram for WsAbstractProperties:
Inheritance graph
Collaboration diagram for WsAbstractProperties:
Collaboration graph

Public Member Functions

 WsAbstractProperties ()
 Default constructor. More...
 
virtual std::string get (const std::string &section, const std::string &id, const std::string &def)=0
 

Protected Member Functions

int parse (const std::string &path)
 parse the Json config file More...
 

Protected Attributes

Json::Value m_root
 
bool m_parsed
 

Detailed Description

Abstract Properties class.

must be derived and pure virtual methods redefined

Definition at line 33 of file WsAbstractProperties.h.

Constructor & Destructor Documentation

WsAbstractProperties::WsAbstractProperties ( )

Default constructor.

Definition at line 23 of file WsAbstractProperties.cpp.

Member Function Documentation

virtual std::string WsAbstractProperties::get ( const std::string &  section,
const std::string &  id,
const std::string &  def 
)
pure virtual
int WsAbstractProperties::parse ( const std::string &  path)
protected

parse the Json config file

Parameters
paththe path to the configuration file
Returns
SUCCESS if file is ok, FAILURE otherwise

Definition at line 28 of file WsAbstractProperties.cpp.

Here is the caller graph for this function:

Member Data Documentation

bool WsAbstractProperties::m_parsed
protected

True or false whether the configuration file has already be parsed or no This flag is changed by the WsAbstractProperties::parse method

Definition at line 66 of file WsAbstractProperties.h.

Json::Value WsAbstractProperties::m_root
protected

Root of the Json tree where. This is where the contents of Json parsed file is stored

Definition at line 60 of file WsAbstractProperties.h.


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