WSF
wsf::comm::ReservedAddressingImplementation Class Referenceabstract

#include <WsfCommReservedAddressing.hpp>

Inheritance diagram for wsf::comm::ReservedAddressingImplementation:

Classes

struct  AddressPairHash

Public Member Functions

 ReservedAddressingImplementation ()=default
virtual ~ReservedAddressingImplementation ()=default
virtual void Initialize ()=0
virtual bool IsReserved (const Address &aAddress) const
 Checks if the address/32 value is reserved.
virtual Address QueryAddressByType (const std::string &aReservedType) const

Protected Types

using ReservedSet = std::unordered_set<Address>
using ReservedPairSet = std::unordered_set<std::pair<Address, Address>, AddressPairHash>
using ReservedTypeMap = std::unordered_map<std::string, Address>

Protected Member Functions

virtual bool IsReservedSimple (const Address &aAddress) const
 Checks the simple case of an address/32 collision.

Protected Attributes

ReservedSet mReservedAddressSet
ReservedPairSet mReservedAddressRangeSet
ReservedTypeMap mReservedTypeToAddressMap

Detailed Description

The abstract implementation object for reserved addressing. Users should derive off of this object to instantiate their own set of reserved addresses, and register their implementation with the ReservedAddressing collection object held by the NetworkManager via the sim object.

Member Typedef Documentation

◆ ReservedPairSet

◆ ReservedSet

◆ ReservedTypeMap

using wsf::comm::ReservedAddressingImplementation::ReservedTypeMap = std::unordered_map<std::string, Address>
protected

Constructor & Destructor Documentation

◆ ReservedAddressingImplementation()

wsf::comm::ReservedAddressingImplementation::ReservedAddressingImplementation ( )
default

◆ ~ReservedAddressingImplementation()

virtual wsf::comm::ReservedAddressingImplementation::~ReservedAddressingImplementation ( )
virtualdefault

Member Function Documentation

◆ Initialize()

virtual void wsf::comm::ReservedAddressingImplementation::Initialize ( )
pure virtual

It is expected that all reserved addresses are set by the conclusion of the Initialize call, however the user decides to get/define those reserved addresses.

Implemented in wsf::comm::ReservedAddressBase.

◆ IsReserved()

bool wsf::comm::ReservedAddressingImplementation::IsReserved ( const Address & aAddress) const
virtual

Checks if the address/32 value is reserved.

The provided address is a range. Check for overlap. Check individual addresses first.

Check the defined ranges. If the first and last discrete reserved address are not within the address range, then all inclusive addresses are also not within the range, and there is not overlap.

References wsf::comm::IPv4::cBIT_SIZE, wsf::comm::Address::CheckInAddressRange(), wsf::comm::Address::GetBinaryInteger(), wsf::comm::Address::GetSubnetMaskBitLength(), IsReservedSimple(), mReservedAddressRangeSet, and mReservedAddressSet.

◆ IsReservedSimple()

bool wsf::comm::ReservedAddressingImplementation::IsReservedSimple ( const Address & aAddress) const
protectedvirtual

Checks the simple case of an address/32 collision.

References wsf::comm::Address::GetBinaryInteger(), mReservedAddressRangeSet, and mReservedAddressSet.

Referenced by IsReserved().

◆ QueryAddressByType()

Address wsf::comm::ReservedAddressingImplementation::QueryAddressByType ( const std::string & aReservedType) const
virtual

Member Data Documentation

◆ mReservedAddressRangeSet

ReservedPairSet wsf::comm::ReservedAddressingImplementation::mReservedAddressRangeSet
protected

◆ mReservedAddressSet

ReservedSet wsf::comm::ReservedAddressingImplementation::mReservedAddressSet
protected

◆ mReservedTypeToAddressMap

ReservedTypeMap wsf::comm::ReservedAddressingImplementation::mReservedTypeToAddressMap
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved