val_RuleVec Class Reference
[Parser for config files; validation]

#include <val.h>

List of all members.


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


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

Constructor & Destructor Documentation

val_RuleVec::val_RuleVec (  ) 

Definition at line 110 of file val.cpp.

00110                          {
00111     // Empty
00112 }

val_RuleVec::~val_RuleVec (  )  [virtual]

Definition at line 114 of file val.cpp.

References rules.

00114                           {
00115     for (unsigned int i = 0; i < rules.size(); i++) {
00116         delete rules[i];
00117     }
00118 }


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 389 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_Server::Refresh(), cfg_RMPool::Refresh(), cfg_RMLibrary::Refresh(), cfg_RMDrive::Refresh(), and cfg_PMCfg::Refresh().

00392               {
00393 
00394             a_rule->Bind(a_target);
00395             rules.push_back(a_rule);
00396         }

Here is the caller graph for this function:

unsigned int val_RuleVec::size (  ) 

Definition at line 120 of file val.cpp.

References rules.

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

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

Here is the caller graph for this function:


Member Data Documentation


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

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