Public Member Functions | Public Attributes

val_RuleVec Class Reference
[Parser for config files; validation]

Container for conversion rules. More...

#include <val.h>

List of all members.

Public Member Functions

 val_RuleVec ()
virtual ~val_RuleVec ()
template<class CNV , class TGT >
void Add (CNV *a_rule, TGT &a_target)
 Add() should be implemented in such a way that it would be called as.
unsigned int size ()

Public Attributes

vector< val_Value * > rules

Detailed Description

Container for conversion rules.

It is used by val_Base::Convert().

Warning:
NOTE:rule arguments passed to Add() must be allocated with new. Destructor calls delete for all vector members!

Definition at line 380 of file val.h.


Constructor & Destructor Documentation

val_RuleVec::val_RuleVec (  ) 

Definition at line 124 of file val.cpp.

                         {
    // Empty
}

val_RuleVec::~val_RuleVec (  )  [virtual]

Definition at line 128 of file val.cpp.

References rules.

                          {
    for (unsigned int i = 0; i < rules.size(); i++) {
        delete rules[i];
    }
}


Member Function Documentation

template<class CNV , class TGT >
void val_RuleVec::Add ( CNV *  a_rule,
TGT &  a_target 
) [inline]

Add() should be implemented in such a way that it would be called as.

        rules.Add<val_StrictString>("variable", val_Limit(low, high), this->member);
        

Add would then create new rules based on the template parameter.

MS Visual C++ (6.0, SP4) doesn't support this template syntax. g++ 2.96 does.

Parameters:
CNV Conversion class type
DT Destination type
a_rule conversion rule (created with new!)
a_target destination value of type DT

Definition at line 403 of file val.h.

Referenced by cfg_Cli_fsc::cfg_Cli_fsc(), cfg_Cli_hsm::cfg_Cli_hsm(), cfg_CliBak::cfg_CliBak(), cfg_CliBase::cfg_CliBase(), cfg_CliCheck::cfg_CliCheck(), cfg_CliCreateFile::cfg_CliCreateFile(), cfg_CliDD::cfg_CliDD(), cfg_CliDrive::cfg_CliDrive(), cfg_CliFile::cfg_CliFile(), cfg_CliFsTest::cfg_CliFsTest(), cfg_CliJob::cfg_CliJob(), cfg_CliLibrary::cfg_CliLibrary(), cfg_CliMedium::cfg_CliMedium(), cfg_CliPartition::cfg_CliPartition(), cfg_CliPool::cfg_CliPool(), cfg_CliSystem::cfg_CliSystem(), cfg_DriveType::cfg_DriveType(), cfg_DriveVendor::cfg_DriveVendor(), cfg_ivddbg::cfg_ivddbg(), cfg_Library::cfg_Library(), cfg_PMClient::cfg_PMClient(), cfg_PMFileExpiration::cfg_PMFileExpiration(), cfg_PMTree::cfg_PMTree(), cfg_RMHost::cfg_RMHost(), cfg_Base::ConvertFileHeader(), cfg_DirHL7Info::Init(), cfg_DirCollocationInfo::Init(), cfg_Server::Refresh(), cfg_RMPool::Refresh(), cfg_RMLibrary::Refresh(), cfg_RMDrive::Refresh(), and cfg_PMCfg::Refresh().

              {

            a_rule->Bind(a_target);
            rules.push_back(a_rule);
        }

Here is the caller graph for this function:

unsigned int val_RuleVec::size (  ) 

Definition at line 134 of file val.cpp.

References rules.

Referenced by cfg_CliBase::cfg_CliBase(), cfg_Base::CheckMandatory(), and cfg_Base::FindRule().

                               {
    return static_cast<unsigned int>(rules.size());
}

Here is the caller graph for this function:


Member Data Documentation


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