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.


Detailed Description

Definition at line 460 of file val.h.


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

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 462 of file val.h.

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

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 471 of file val.h.

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


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 1337 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.

01337                                                 {
01338     cmn_Path path(a_strVal);
01339     path.HostPathSeparator(); // convert original to local path separator
01340     path.RemoveTrailingPathSeparator();
01341     if (path.find_first_of(WRONG_CHARS_IN_PATH) != string::npos) {
01342         ostringstream oss;
01343         oss << "Invalid character(s) found in path. Variable:" << m_name
01344             << " = " << a_strVal;
01345         throw ivd_Error(ie_NOT_VALID, oss.str());
01346     }
01347     return path;
01348 }

Here is the call graph for this function:


Member Data Documentation

Reimplemented from val_String.

Reimplemented in val_FileNamePattern.

Definition at line 484 of file val.h.


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

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