Public Member Functions | Public Attributes | Private Attributes

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.

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

Detailed Description

Definition at line 132 of file pf.h.


Constructor & Destructor Documentation

pf_Value::pf_Value ( UInt32_t  a_lineNum = 0xFFFFFFFF  ) 

Definition at line 198 of file pf.cpp.

    : pf_ValueBase("Comment", a_lineNum),
      type(PF_COMMENT),
      simple("Comment", a_lineNum),
      list(lineNum)  {
    // Empty
}

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

Definition at line 239 of file pf.cpp.

    : pf_ValueBase(a_name, a_lineNum),
      type(PF_SIMPLE),
      simple(a_val, a_lineNum),
      list(a_lineNum) {
    // Empty
}

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

Definition at line 247 of file pf.cpp.

    : pf_ValueBase(a_name, a_lineNum),
      type(PF_RANGE),
      simple(a_low, a_high, a_lineNum),
      list(a_lineNum) {
    // Empty
}

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

Definition at line 255 of file pf.cpp.

    : pf_ValueBase(a_name, a_lineNum),
      type(PF_LIST),
      simple(a_lineNum),
      list(a_list) {
    // Empty
}

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

Definition at line 263 of file pf.cpp.

    : pf_ValueBase(a_name, a_lineNum),
      type(PF_GROUP),
      simple(a_lineNum),
      list(a_lineNum),
      group(a_group) {
    // Empty
}

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

Definition at line 207 of file pf.cpp.

References pf_Component::comment.

    : pf_ValueBase("Comment", a_lineNum),
      type(PF_COMMENT),
      simple("Comment", a_lineNum),
      list(a_lineNum) {

      comment = a_comment;
}

pf_Value::pf_Value ( const pf_Value a_val  ) 

Definition at line 180 of file pf.cpp.

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

    : pf_ValueBase(a_val.lineNum),
        simple(a_val.lineNum),
        list(a_val.lineNum) {

    type    = a_val.type;
    name    = a_val.name;
    simple  = a_val.simple;
    comment = a_val.comment;
    list    = a_val.list;
    lineNum = a_val.lineNum;

    if (type == PF_GROUP) {
        group = new pf_Group();
        *group = *(a_val.group);
    };
}

pf_Value::~pf_Value (  )  [virtual]

Definition at line 272 of file pf.cpp.

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

                    {
    if (type == PF_GROUP && group != NULL) {
        log_FUNC_m(~pf_Value);

        log_DBG_m(dbg_DETAIL,
            "Deleting group \"" << group->grpType << " " << name << "\""
        );
        delete group; group = NULL;
    };
}


Member Function Documentation

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

Definition at line 216 of file pf.cpp.

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

                                                   {

    if (&a_val == this) {
        return *this;
    }

    type    = a_val.type;
    name    = a_val.name;
    simple  = a_val.simple;
    comment = a_val.comment;
    list    = a_val.list;
    lineNum = a_val.lineNum;

    if (type == PF_GROUP) {
        group = new pf_Group();
        *group = *(a_val.group);
    };

    return *this;

}


Member Data Documentation

Definition at line 153 of file pf.h.

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

Definition at line 152 of file pf.h.

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

Reimplemented from pf_ValueBase.

Definition at line 156 of file pf.h.

Definition at line 150 of file pf.h.

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


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