val_Range< CNV, DT > Class Template Reference
[Parser for config files; validation]

#include <val.h>

Inheritance diagram for val_Range< CNV, DT >:

Inheritance graph
[legend]
Collaboration diagram for val_Range< CNV, DT >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class CNV, class DT>
class val_Range< CNV, DT >

Definition at line 878 of file val.h.


Public Member Functions

 val_Range (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal=1, const UInt64_t a_maxNumOfVal=cfg_INFINITE, const string &a_defaultStr="")
virtual ~val_Range ()
virtual void Bind (val_Element< DT > &a_dest)
virtual void Assign (const string &a_strVal)
virtual void AssignRange (const string &a_strLow, const string &a_strHigh)
 Assign assigns value to a target and implicitly uses Validate() and CheckLimits().

Private Attributes

val_Element< DT > * m_range_p
 log_CLASSID_m

Constructor & Destructor Documentation

template<class CNV, class DT>
val_Range< CNV, DT >::val_Range ( const string &  a_name,
const val_Limit  a_limits,
const UInt32_t  a_minNumOfVal = 1,
const UInt64_t  a_maxNumOfVal = cfg_INFINITE,
const string &  a_defaultStr = "" 
) [inline]

Definition at line 880 of file val.h.

00886         : val_Value(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal),
00887           m_range_p(NULL) {
00888             // Empty
00889         }

template<class CNV, class DT>
virtual val_Range< CNV, DT >::~val_Range (  )  [inline, virtual]

Definition at line 891 of file val.h.

00891                              {
00892             //Empty
00893         }


Member Function Documentation

template<class CNV, class DT>
virtual void val_Range< CNV, DT >::Bind ( val_Element< DT > &  a_dest  )  [inline, virtual]

Definition at line 895 of file val.h.

Referenced by val_List< val_FileNamePattern, string >::AddRange(), and val_SlotList::AddRange().

00895                                                    {
00896             m_range_p = &(a_dest);
00897         }

Here is the caller graph for this function:

template<class CNV, class DT>
virtual void val_Range< CNV, DT >::Assign ( const string &  a_strVal  )  [inline, virtual]

Implements val_BasicValue.

Definition at line 899 of file val.h.

References ie_PARSER_ERROR, and ivd_Error.

00899                                                     {
00900             throw ivd_Error(ie_PARSER_ERROR,
00901                     "Ranges don't have Assign(str) function.");
00902         }

template<class CNV, class DT>
virtual void val_Range< CNV, DT >::AssignRange ( const string &  a_strLow,
const string &  a_strHigh 
) [inline, virtual]

Assign assigns value to a target and implicitly uses Validate() and CheckLimits().

Reimplemented from val_Value.

Definition at line 908 of file val.h.

References ie_INVALID_ARG, ivd_Error, and NULL.

00909                                                              {
00910 
00911             if (m_range_p == NULL) {
00912                 //log_FUNC_m(AssignRange);
00913                 throw ivd_Error(ie_INVALID_ARG,
00914                     "Target range element not specified.");
00915             }
00916 
00917             DT      low;
00918             DT      high;
00919             CNV     converter("", m_limits);
00920 
00921             converter.Bind(low);
00922             converter.Conv(a_strLow);
00923             converter.Bind(high);
00924             converter.Conv(a_strHigh);
00925 
00926             m_range_p->Range(low, high);
00927         }


Member Data Documentation

template<class CNV, class DT>
val_Element<DT>* val_Range< CNV, DT >::m_range_p [private]

Definition at line 930 of file val.h.

template<class CNV, class DT>
val_Range< CNV, DT >::log_CLASSID_m [private]

Reimplemented from val_Value.

Definition at line 932 of file val.h.


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

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