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

Represents a single firewall rule. More...

#include "service/plugins/IRule.h"

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

Public Member Functions

 IRule ()=default
 
virtual ~IRule ()=default
 
 IRule (const IRule &)=delete
 
IRuleoperator= (const IRule &)=delete
 
 IRule (IRule &&)=delete
 
IRuleoperator= (IRule &&)=delete
 
virtual void applyCommands () const =0
 Apply all commands in this rule. More...
 

Detailed Description

Represents a single firewall rule.

This class is the high level interface that must be implemented in firewall plugin. The core service depends on it and not on its implementation(s) to respect the Dependency Inversion Principle. Firewalling is made possible by a set of rules.

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

◆ IRule() [1/3]

service::plugins::firewall::IRule::IRule ( )
default

Class constructor

◆ ~IRule()

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

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

◆ IRule() [2/3]

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

Class copy constructor

◆ IRule() [3/3]

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

Class move constructor

Member Function Documentation

◆ applyCommands()

virtual void service::plugins::firewall::IRule::applyCommands ( ) const
pure virtual

Apply all commands in this rule.

It's about iterating the commands which are shell commands and apply them one by one. To do so, one can rely on helper classes that can execute shell command securely.

Implemented in service::plugins::firewall::Rule.

◆ operator=() [1/2]

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

Class copy-assignment operator

◆ operator=() [2/2]

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

Class move-assignment operator


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