A factory class to help creating firewalling rules.
More...
#include "plugins/firewall/RuleFactory.h"
A factory class to help creating firewalling rules.
This class is the "low level class" that implements IRuleFactory.h
- Note
- Copy contructor, copy-assignment operator, move constructor and move-assignment operator are defined to be compliant with the "Rule of five"
- See also
- https://en.cppreference.com/w/cpp/language/rule_of_three
- Author
- Boubacar DIENE bouba.nosp@m.car..nosp@m.diene.nosp@m.@gma.nosp@m.il.co.nosp@m.m
- Date
- April 2020
◆ RuleFactory() [1/3]
Class constructor
- Parameters
-
| executor | Command executor to use |
◆ ~RuleFactory()
| service::plugins::firewall::RuleFactory::~RuleFactory |
( |
| ) |
|
|
override |
Class destructor
- Note
- The override specifier aims at making the compiler warn if the base class's destructor is not virtual.
◆ RuleFactory() [2/3]
| service::plugins::firewall::RuleFactory::RuleFactory |
( |
const RuleFactory & |
| ) |
|
|
delete |
◆ RuleFactory() [3/3]
| service::plugins::firewall::RuleFactory::RuleFactory |
( |
RuleFactory && |
| ) |
|
|
delete |
◆ createRule()
| std::unique_ptr<IRule> service::plugins::firewall::RuleFactory::createRule |
( |
const std::string & |
name, |
|
|
const std::vector< std::string > & |
commands |
|
) |
| const |
|
overridevirtual |
Create a firewalling rule.
Create a firewall rule based on informations provided by user in the configuration file.
- Parameters
-
| name | The name of the rule (For internal usage: logging, ...) |
| commands | The list of shell commands that compose the rule |
- Returns
- The created rule
Implements service::plugins::firewall::IRuleFactory.
◆ operator=() [1/2]
Class copy-assignment operator
◆ operator=() [2/2]
Class move-assignment operator
◆ m_internal
| std::unique_ptr<Internal> service::plugins::firewall::RuleFactory::m_internal |
|
private |
The documentation for this class was generated from the following file: