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.


Detailed Description

Definition at line 403 of file val.h.


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 ()

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 188 of file val.cpp.

00193   : val_Value(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal),
00194     m_str_p(NULL) {
00195     // Empty
00196 }

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 198 of file val.cpp.

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

val_String::~val_String (  )  [virtual]

Definition at line 210 of file val.cpp.

00210                         {
00211     //Empty
00212 }


Member Function Documentation

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

Reimplemented from val_BasicValue.

Definition at line 214 of file val.cpp.

References m_str_p.

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

00214                                     {
00215     m_str_p = &(a_dest);
00216 }

Here is the caller graph for this function:

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

Implements val_BasicValue.

Reimplemented in val_StrictString.

Definition at line 219 of file val.cpp.

References m_str_p, and NULL.

00219                                               {
00220     if (m_str_p == NULL) {
00221         return;
00222     };
00223 
00224     *m_str_p = a_strVal;
00225 }

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

Reimplemented from val_Value.

Definition at line 227 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.

00227                              {
00228     if (this->m_str_p == NULL) return;
00229 
00230     if (m_str_p->length() < m_limits.lower ||
00231         m_str_p->length() > m_limits.upper) {
00232         ostringstream errorDescription;
00233         errorDescription
00234             << "Out of range:" << *m_str_p << " at variable: "
00235             << m_name << " = " << *m_str_p << endl
00236             << "Limits for string length are: " << endl
00237             << "Lower: " << m_limits.lower << endl
00238             << "Upper: " << m_limits.upper;
00239 
00240         throw ivd_Error(ie_PARSER_ERROR, errorDescription.str());
00241     };
00242 }


Member Data Documentation

string* val_String::m_str_p [protected]

Definition at line 427 of file val.h.

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

Reimplemented from val_Value.

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

Definition at line 429 of file val.h.


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

Generated on Mon Feb 27 19:52:07 2012 for OPENARCHIVE by  doxygen 1.5.6