conf::ConfIf Class Reference

Base class for all conditional directives. More...

#include <directives.h>

Inheritance diagram for conf::ConfIf:

conf::ConfDir conf::ConfIfnset conf::ConfIfset

List of all members.

Public Member Functions

 ConfIf (std::string const &name, unsigned short min=2, unsigned short max=2)
 Constructor setting the name of the directive.
virtual bool set (Conf &conf, unsigned short count, std::string const params[])
 Calls can_process(params[0]) and processes params[1] if true.

Protected Member Functions

virtual bool can_process (Conf &conf, std::string const &expr) const =0
 Determines whether to process the block.


Detailed Description

This class implements the basics of conditional directives.

Conditional directives can inherit this class and override the can_process() member function to have a brand new and fully functional conditional directive.


Member Function Documentation

virtual bool conf::ConfIf::can_process ( Conf conf,
std::string const &  expr 
) const [protected, pure virtual]

Determines whether to process the block of directives in params[1], based on the evaluation of the given expression (which is implementer-defined).

Parameters:
[in] conf The Conf object that called set().
[in] expr The expression to evaluate.
Returns:
true to process the block, false otherwise.

Implemented in conf::ConfIfnset, and conf::ConfIfset.


The documentation for this class was generated from the following file:
Generated on Fri Apr 18 22:03:28 2008 for Epona API by  doxygen 1.5.3