Public Member Functions | Private Attributes

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.

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

Detailed Description

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

Definition at line 892 of file val.h.


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

        : val_Value(a_name, a_limits, a_minNumOfVal, a_maxNumOfVal),
          m_range_p(NULL) {
            // Empty
        }

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

Definition at line 905 of file val.h.

                             {
            //Empty
        }


Member Function Documentation

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

Definition at line 913 of file val.h.

References ie_PARSER_ERROR, and ivd_Error.

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

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

References ie_INVALID_ARG, ivd_Error, and NULL.

                                                             {

            if (m_range_p == NULL) {
                //log_FUNC_m(AssignRange);
                throw ivd_Error(ie_INVALID_ARG,
                    "Target range element not specified.");
            }

            DT      low;
            DT      high;
            CNV     converter("", m_limits);

            converter.Bind(low);
            converter.Conv(a_strLow);
            converter.Bind(high);
            converter.Conv(a_strHigh);

            m_range_p->Range(low, high);
        }

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

Definition at line 909 of file val.h.

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

                                                   {
            m_range_p = &(a_dest);
        }

Here is the caller graph for this function:


Member Data Documentation

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

Reimplemented from val_Value.

Definition at line 946 of file val.h.

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

Definition at line 944 of file val.h.


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