networkservice
Public Member Functions | List of all members
service::plugins::firewall::IRuleFactory Interface Referenceabstract

A factory class to help creating rules thus hiding low level details to the core service. More...

#include "service/plugins/IRuleFactory.h"

Inheritance diagram for service::plugins::firewall::IRuleFactory:
Inheritance graph
[legend]

Public Member Functions

 IRuleFactory ()=default
 
virtual ~IRuleFactory ()=default
 
 IRuleFactory (const IRuleFactory &)=delete
 
IRuleFactoryoperator= (const IRuleFactory &)=delete
 
 IRuleFactory (IRuleFactory &&)=delete
 
IRuleFactoryoperator= (IRuleFactory &&)=delete
 
virtual std::unique_ptr< IRulecreateRule (const std::string &name, const std::vector< std::string > &commands) const =0
 Create a firewalling rule. More...
 

Detailed Description

A factory class to help creating rules thus hiding low level details to the core service.

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

Constructor & Destructor Documentation

◆ IRuleFactory() [1/3]

service::plugins::firewall::IRuleFactory::IRuleFactory ( )
default

Class constructor

◆ ~IRuleFactory()

virtual service::plugins::firewall::IRuleFactory::~IRuleFactory ( )
virtualdefault

Class destructor made virtual because it is used as base class by derived classes in firewall plugin

◆ IRuleFactory() [2/3]

service::plugins::firewall::IRuleFactory::IRuleFactory ( const IRuleFactory )
delete

Class copy constructor

◆ IRuleFactory() [3/3]

service::plugins::firewall::IRuleFactory::IRuleFactory ( IRuleFactory &&  )
delete

Class move constructor

Member Function Documentation

◆ createRule()

virtual std::unique_ptr<IRule> service::plugins::firewall::IRuleFactory::createRule ( const std::string &  name,
const std::vector< std::string > &  commands 
) const
pure virtual

Create a firewalling rule.

Create a firewall rule based on informations provided by user in the configuration file.

Parameters
nameThe name of the rule (For internal usage: logging, ...)
commandsThe list of shell commands that compose the rule
Returns
The created rule

Implemented in service::plugins::firewall::RuleFactory.

◆ operator=() [1/2]

IRuleFactory& service::plugins::firewall::IRuleFactory::operator= ( const IRuleFactory )
delete

Class copy-assignment operator

◆ operator=() [2/2]

IRuleFactory& service::plugins::firewall::IRuleFactory::operator= ( IRuleFactory &&  )
delete

Class move-assignment operator


The documentation for this interface was generated from the following file: