Public Member Functions | Private Attributes

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.

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, ...) consists of following valid characters: 'A'-'Z', 'a'-'z', '-', '_', " " .

Private Attributes

 log_CLASSID_m

Detailed Description

Definition at line 662 of file val.h.


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

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

val_ObjectName::~val_ObjectName (  )  [virtual]

Definition at line 885 of file val.cpp.

                                {
    //Empty
}


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

References ie_NOT_VALID, ivd_Error, and val_Value::m_name.

                                                      {

    for(unsigned int i = 0; i < a_strVal.length(); i++) {

        if (isalnum(a_strVal[i]) ||
            a_strVal[i] == '-'   ||
            a_strVal[i] == '_'   ||
            a_strVal[i] == ' ' ) {

                // Character is valid. Continue.
            }
        else {
            throw ivd_Error(ie_NOT_VALID,
                string("Invalid objectname. Invalid character. Variable: ") + m_name);
        }
    }

    return a_strVal;
}


Member Data Documentation

Reimplemented from val_StrictString.

Definition at line 676 of file val.h.


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