val_ObjectName Class Reference
[Parser for config files; validation]

#include <val.h>

Inheritance diagram for val_ObjectName:

Inheritance graph
[legend]
Collaboration diagram for val_ObjectName:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 648 of file val.h.


Public Member Functions

 val_ObjectName (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal=1, const UInt32_t a_maxNumOfVal=cfg_INFINITE, const string &a_defaultStr="")
virtual ~val_ObjectName ()
virtual string Validate (const string &a_strVal)
 ObjectName (Partitionname, PoolName, driveName, .

Private Attributes

 log_CLASSID_m

Constructor & Destructor Documentation

val_ObjectName::val_ObjectName ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal = 1,
const UInt32_t  a_maxNumOfVal = cfg_INFINITE,
const string &  a_defaultStr = "" 
)

Definition at line 860 of file val.cpp.

00866     : val_StrictString(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal,  a_defaultStr ) {
00867     // Empty
00868 }

val_ObjectName::~val_ObjectName (  )  [virtual]

Definition at line 871 of file val.cpp.

00871                                 {
00872     //Empty
00873 }


Member Function Documentation

string val_ObjectName::Validate ( const string &  a_strVal  )  [virtual]

ObjectName (Partitionname, PoolName, driveName, .

..) consists of following valid characters: 'A'-'Z', 'a'-'z', '-', '_', " " .

Reimplemented from val_Value.

Definition at line 879 of file val.cpp.

References ie_NOT_VALID, ivd_Error, and val_Value::m_name.

00879                                                       {
00880 
00881     for(unsigned int i = 0; i < a_strVal.length(); i++) {
00882 
00883         if (isalnum(a_strVal[i]) ||
00884             a_strVal[i] == '-'   ||
00885             a_strVal[i] == '_'   ||
00886             a_strVal[i] == ' ' ) {
00887 
00888                 // Character is valid. Continue.
00889             }
00890         else {
00891             throw ivd_Error(ie_NOT_VALID,
00892                 string("Invalid objectname. Invalid character. Variable: ") + m_name);
00893         }
00894     }
00895 
00896     return a_strVal;
00897 }


Member Data Documentation

Reimplemented from val_StrictString.

Definition at line 662 of file val.h.


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

Generated on Mon Feb 27 19:51:50 2012 for OPENARCHIVE by  doxygen 1.5.6