Public Member Functions | Protected Member Functions | Protected Attributes

val_Path Class Reference
[Parser for config files; validation]

#include <val.h>

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

List of all members.

Public Member Functions

 val_Path (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal=1, const UInt32_t a_maxNumOfVal=cfg_MAX_PATHNAME)
 val_Path (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal, const UInt32_t a_maxNumOfVal, const string &a_defaultPath)

Protected Member Functions

virtual string Validate (const string &a_strVal)

Protected Attributes

 log_CLASSID_m

Detailed Description

Definition at line 474 of file val.h.


Constructor & Destructor Documentation

val_Path::val_Path ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal = 1,
const UInt32_t  a_maxNumOfVal = cfg_MAX_PATHNAME 
) [inline]

Definition at line 476 of file val.h.

    : val_String(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal) {
        // Empty
    };

val_Path::val_Path ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal,
const UInt32_t  a_maxNumOfVal,
const string &  a_defaultPath 
) [inline]

Definition at line 485 of file val.h.

    : val_String(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal, a_defaultPath) {
        // Empty
    };


Member Function Documentation

string val_Path::Validate ( const string &  a_strVal  )  [protected, virtual]
Warning:
Validate() must return a string which is then used in Assign(). By default the argument is just returned.

Reimplemented from val_Value.

Reimplemented in val_FileNamePattern.

Definition at line 1351 of file val.cpp.

References cmn_Path::HostPathSeparator(), ie_NOT_VALID, ivd_Error, val_Value::m_name, path, cmn_Path::RemoveTrailingPathSeparator(), and WRONG_CHARS_IN_PATH.

                                                {
    cmn_Path path(a_strVal);
    path.HostPathSeparator(); // convert original to local path separator
    path.RemoveTrailingPathSeparator();
    if (path.find_first_of(WRONG_CHARS_IN_PATH) != string::npos) {
        ostringstream oss;
        oss << "Invalid character(s) found in path. Variable:" << m_name
            << " = " << a_strVal;
        throw ivd_Error(ie_NOT_VALID, oss.str());
    }
    return path;
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from val_String.

Reimplemented in val_FileNamePattern.

Definition at line 498 of file val.h.


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