USBGuard
Software framework that protects your computer against rogue USB devices by implementing basic whitelisting and blacklisting capabilities.
Public Member Functions | List of all members
usbguard::RuleCondition Class Reference

Wraps any type of rule condition. More...

#include <RuleCondition.hpp>

Public Member Functions

 RuleCondition ()
 Constructs empty rule condition object. More...
 
 RuleCondition (const std::string &condition_string)
 Constructs rule condition object based on given rule string. More...
 
 RuleCondition (const RuleCondition &rhs)
 Constructs rule condition by copying rhs. More...
 
 RuleCondition (RuleCondition &&rhs)
 Constructs rule condition from rhs using move semantics. More...
 
RuleConditionoperator= (const RuleCondition &rhs)
 Copy assignes rhs rule condition to this. More...
 
RuleConditionoperator= (RuleCondition &&rhs)
 Assignes rhs rule condition to this using move semantics. More...
 
RuleConditionBaseoperator-> ()
 Returns pointer to the underlying rule condition object. More...
 
RuleConditionBaseoperator* ()
 Returns reference to the underlying rule condition object. More...
 
std::string toRuleString () const
 Returns string representation of underlying rule condition. More...
 

Detailed Description

Wraps any type of rule condition.

Constructor & Destructor Documentation

◆ RuleCondition() [1/4]

usbguard::RuleCondition::RuleCondition ( )

Constructs empty rule condition object.

In other words, the unique pointer that points to the underlying rule condition object is empty.

◆ RuleCondition() [2/4]

usbguard::RuleCondition::RuleCondition ( const std::string &  condition_string)

Constructs rule condition object based on given rule string.

Parameters
condition_stringString should be a valid rule string.
Exceptions
runtime_errorIf given string is empty or does not contain a valid rule.
See also
getImplementation()

◆ RuleCondition() [3/4]

usbguard::RuleCondition::RuleCondition ( const RuleCondition rhs)

Constructs rule condition by copying rhs.

Parameters
rhsRule condition to copy.

◆ RuleCondition() [4/4]

usbguard::RuleCondition::RuleCondition ( RuleCondition &&  rhs)

Constructs rule condition from rhs using move semantics.

Parameters
rhsRule condition to move.

Member Function Documentation

◆ operator*()

RuleConditionBase & usbguard::RuleCondition::operator* ( )

Returns reference to the underlying rule condition object.

Returns
Reference to the underlying rule condition object.

◆ operator->()

RuleConditionBase * usbguard::RuleCondition::operator-> ( )

Returns pointer to the underlying rule condition object.

Returns
Pointer to the underlying rule condition object.

◆ operator=() [1/2]

RuleCondition & usbguard::RuleCondition::operator= ( const RuleCondition rhs)

Copy assignes rhs rule condition to this.

Parameters
rhsRule condition to copy assign to this.
Returns
This object.

◆ operator=() [2/2]

RuleCondition & usbguard::RuleCondition::operator= ( RuleCondition &&  rhs)

Assignes rhs rule condition to this using move semantics.

Parameters
rhsRule condition to move assign to this.
Returns
This object.

◆ toRuleString()

std::string usbguard::RuleCondition::toRuleString ( ) const

Returns string representation of underlying rule condition.

Returns
String representation of underlying rule condition.

The documentation for this class was generated from the following files: