pf_Value Class Reference
[Parser for config files; validation]

#include <pf.h>

Inheritance diagram for pf_Value:

Inheritance graph
[legend]
Collaboration diagram for pf_Value:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 118 of file pf.h.


Public Member Functions

 pf_Value (UInt32_t a_lineNum=0xFFFFFFFF)
 pf_Value (const string &a_name, const string &a_val, UInt32_t a_lineNum)
 pf_Value (const string &a_name, const string &a_low, const string &a_high, UInt32_t a_lineNum)
 pf_Value (const string &a_name, const pf_List &a_list, UInt32_t a_lineNum)
 pf_Value (const string &a_name, pf_Group *a_group, UInt32_t a_lineNum)
 pf_Value (const string &a_comment, UInt32_t a_lineNum)
 pf_Value (const pf_Value &a_val)
pf_Valueoperator= (const pf_Value &a_val)
virtual ~pf_Value ()

Public Attributes

pf_ValType_e type
pf_Elem simple
pf_List list
pf_Groupgroup

Private Attributes

 log_CLASSID_m

Constructor & Destructor Documentation

pf_Value::pf_Value ( UInt32_t  a_lineNum = 0xFFFFFFFF  ) 

Definition at line 184 of file pf.cpp.

00185     : pf_ValueBase("Comment", a_lineNum),
00186       type(PF_COMMENT),
00187       simple("Comment", a_lineNum),
00188       list(lineNum)  {
00189     // Empty
00190 }

pf_Value::pf_Value ( const string &  a_name,
const string &  a_val,
UInt32_t  a_lineNum 
)

Definition at line 225 of file pf.cpp.

00226     : pf_ValueBase(a_name, a_lineNum),
00227       type(PF_SIMPLE),
00228       simple(a_val, a_lineNum),
00229       list(a_lineNum) {
00230     // Empty
00231 }

pf_Value::pf_Value ( const string &  a_name,
const string &  a_low,
const string &  a_high,
UInt32_t  a_lineNum 
)

Definition at line 233 of file pf.cpp.

00234     : pf_ValueBase(a_name, a_lineNum),
00235       type(PF_RANGE),
00236       simple(a_low, a_high, a_lineNum),
00237       list(a_lineNum) {
00238     // Empty
00239 }

pf_Value::pf_Value ( const string &  a_name,
const pf_List a_list,
UInt32_t  a_lineNum 
)

Definition at line 241 of file pf.cpp.

00242     : pf_ValueBase(a_name, a_lineNum),
00243       type(PF_LIST),
00244       simple(a_lineNum),
00245       list(a_list) {
00246     // Empty
00247 }

pf_Value::pf_Value ( const string &  a_name,
pf_Group a_group,
UInt32_t  a_lineNum 
)

Definition at line 249 of file pf.cpp.

00250     : pf_ValueBase(a_name, a_lineNum),
00251       type(PF_GROUP),
00252       simple(a_lineNum),
00253       list(a_lineNum),
00254       group(a_group) {
00255     // Empty
00256 }

pf_Value::pf_Value ( const string &  a_comment,
UInt32_t  a_lineNum 
)

Definition at line 193 of file pf.cpp.

References pf_Component::comment.

00194     : pf_ValueBase("Comment", a_lineNum),
00195       type(PF_COMMENT),
00196       simple("Comment", a_lineNum),
00197       list(a_lineNum) {
00198 
00199       comment = a_comment;
00200 }

pf_Value::pf_Value ( const pf_Value a_val  ) 

Definition at line 166 of file pf.cpp.

References pf_Component::comment, group, pf_Component::lineNum, list, pf_ValueBase::name, PF_GROUP, simple, and type.

00167     : pf_ValueBase(a_val.lineNum),
00168         simple(a_val.lineNum),
00169         list(a_val.lineNum) {
00170 
00171     type    = a_val.type;
00172     name    = a_val.name;
00173     simple  = a_val.simple;
00174     comment = a_val.comment;
00175     list    = a_val.list;
00176     lineNum = a_val.lineNum;
00177 
00178     if (type == PF_GROUP) {
00179         group = new pf_Group();
00180         *group = *(a_val.group);
00181     };
00182 }

pf_Value::~pf_Value (  )  [virtual]

Definition at line 258 of file pf.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, pf_ValueBase::name, NULL, PF_GROUP, and type.

00258                     {
00259     if (type == PF_GROUP && group != NULL) {
00260         log_FUNC_m(~pf_Value);
00261 
00262         log_DBG_m(dbg_DETAIL,
00263             "Deleting group \"" << group->grpType << " " << name << "\""
00264         );
00265         delete group; group = NULL;
00266     };
00267 }


Member Function Documentation

pf_Value & pf_Value::operator= ( const pf_Value a_val  ) 

Definition at line 202 of file pf.cpp.

References pf_Component::comment, group, pf_Component::lineNum, list, pf_ValueBase::name, PF_GROUP, simple, and type.

00202                                                    {
00203 
00204     if (&a_val == this) {
00205         return *this;
00206     }
00207 
00208     type    = a_val.type;
00209     name    = a_val.name;
00210     simple  = a_val.simple;
00211     comment = a_val.comment;
00212     list    = a_val.list;
00213     lineNum = a_val.lineNum;
00214 
00215     if (type == PF_GROUP) {
00216         group = new pf_Group();
00217         *group = *(a_val.group);
00218     };
00219 
00220     return *this;
00221 
00222 }


Member Data Documentation

Definition at line 136 of file pf.h.

Referenced by cfg_Base::Convert(), operator<<(), operator=(), pf_Value(), yyparse(), and ~pf_Value().

Definition at line 138 of file pf.h.

Referenced by cfg_Base::Convert(), operator<<(), operator=(), and pf_Value().

Definition at line 139 of file pf.h.

Referenced by cfg_Base::Convert(), operator<<(), operator=(), and pf_Value().

Reimplemented from pf_ValueBase.

Definition at line 142 of file pf.h.


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

Generated on Mon Feb 27 19:43:56 2012 for OPENARCHIVE by  doxygen 1.5.6