#include <directives.h>
Inheritance diagram for conf::ConfIf:
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. |
Conditional directives can inherit this class and override the can_process() member function to have a brand new and fully functional conditional directive.
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).
Implemented in conf::ConfIfnset, and conf::ConfIfset.