Public Member Functions | Protected Attributes | Private Member Functions

val_String Class Reference
[Parser for config files; validation]

#include <val.h>

Inheritance diagram for val_String:
Inheritance graph
[legend]
Collaboration diagram for val_String:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 val_String (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal=1, const UInt64_t a_maxNumOfVal=cfg_INFINITE)
 val_String (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal, const UInt64_t a_maxNumOfVal, const string &a_defaultStr)
virtual ~val_String ()
virtual void Bind (string &a_dest)

Protected Attributes

string * m_str_p
 log_CLASSID_m

Private Member Functions

virtual void Assign (const string &a_strVal)
virtual void CheckLimits ()

Detailed Description

Definition at line 417 of file val.h.


Constructor & Destructor Documentation

val_String::val_String ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal = 1,
const UInt64_t  a_maxNumOfVal = cfg_INFINITE 
)

Definition at line 202 of file val.cpp.

  : val_Value(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal),
    m_str_p(NULL) {
    // Empty
}

val_String::val_String ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal,
const UInt64_t  a_maxNumOfVal,
const string &  a_defaultStr 
)

Definition at line 212 of file val.cpp.

  : val_Value(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal, a_defaultStr ),
    m_str_p(NULL) {
    // Empty
}

val_String::~val_String (  )  [virtual]

Definition at line 224 of file val.cpp.

                        {
    //Empty
}


Member Function Documentation

void val_String::Assign ( const string &  a_strVal  )  [private, virtual]

Reimplemented in val_StrictString.

Definition at line 233 of file val.cpp.

References m_str_p, and NULL.

                                              {
    if (m_str_p == NULL) {
        return;
    };

    *m_str_p = a_strVal;
}

void val_String::Bind ( string &  a_dest  )  [virtual]

Definition at line 228 of file val.cpp.

References m_str_p.

Referenced by cfg_PMClient::cfg_PMClient(), and cfg_RMHost::cfg_RMHost().

                                    {
    m_str_p = &(a_dest);
}

Here is the caller graph for this function:

void val_String::CheckLimits (  )  [private, virtual]

Reimplemented from val_Value.

Definition at line 241 of file val.cpp.

References ie_PARSER_ERROR, ivd_Error, val_Limit::lower, val_Value::m_limits, val_Value::m_name, m_str_p, NULL, and val_Limit::upper.

                             {
    if (this->m_str_p == NULL) return;

    if (m_str_p->length() < m_limits.lower ||
        m_str_p->length() > m_limits.upper) {
        ostringstream errorDescription;
        errorDescription
            << "Out of range:" << *m_str_p << " at variable: "
            << m_name << " = " << *m_str_p << endl
            << "Limits for string length are: " << endl
            << "Lower: " << m_limits.lower << endl
            << "Upper: " << m_limits.upper;

        throw ivd_Error(ie_PARSER_ERROR, errorDescription.str());
    };
}


Member Data Documentation

Reimplemented from val_Value.

Reimplemented in val_StrictString, val_Path, val_ObjectName, val_Hostname, val_DbgLevel, val_DbgFlags, and val_FileNamePattern.

Definition at line 443 of file val.h.

string* val_String::m_str_p [protected]

Definition at line 441 of file val.h.

Referenced by val_StrictString::Assign(), Assign(), Bind(), and CheckLimits().


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