Kea: isc::dhcp::AssignableNetwork Class Reference

| Kea 1.5.0

Protected Member Functions | List of all members
isc::dhcp::AssignableNetwork Class Referenceabstract

Represents a network that can be associated with a subnet. More...

`#include <assignable_network.h>`

Inheritance diagram for isc::dhcp::AssignableNetwork:
[legend]

## Protected Member Functions
virtual | ~AssignableNetwork ()
| Virtual destructor. More...
template<typename SubnetPtr >
void | clearSharedNetwork (const SubnetPtr &subnet)
| Removes association of a subnet with a network. More...
template<typename SubnetPtr >
void | setSharedNetwork (const SubnetPtr &subnet)
| Associates a subnet with this network. More...
virtual NetworkPtr | sharedFromThis ()=0
| Returns shared pointer to this object. More...

## Detailed Description

Represents a network that can be associated with a subnet.

This class represents a network that can be associated with a subnet using `Subnet::setSharedNetwork` method. This class is a friend of a Subnet class, so it can call its `Subnet::setSharedNetwork` private method. Association of a network with a subnet must be always conducted using this class. This prevents unwanted replacements of shared networks within subnets.

Definition at line 23 of file assignable_network.h.

## Constructor & Destructor Documentation

## ◆ ~AssignableNetwork()

virtual isc::dhcp::AssignableNetwork::~AssignableNetwork | ( |  | ) |
| inlineprotectedvirtual

Virtual destructor.

Definition at line 27 of file assignable_network.h.

## Member Function Documentation

## ◆ clearSharedNetwork()

template<typename SubnetPtr >

void isc::dhcp::AssignableNetwork::clearSharedNetwork | ( | const SubnetPtr & | subnet | ) |
| inlineprotected

Removes association of a subnet with a network.

Parameters

  subnet | Pointer to a subnet for which association should be removed.

Template Parameters

  SubnetPtr | Type of the subnet pointer.

Definition at line 54 of file assignable_network.h.

## ◆ setSharedNetwork()

template<typename SubnetPtr >

void isc::dhcp::AssignableNetwork::setSharedNetwork | ( | const SubnetPtr & | subnet | ) |
| inlineprotected

Associates a subnet with this network.

Parameters

  subnet | Pointer to a subnet to be associated with the network.

Template Parameters

  SubnetPtr | Type of the subnet pointer.

Definition at line 43 of file assignable_network.h.

References sharedFromThis().

Here is the call graph for this function:

## ◆ sharedFromThis()

virtual NetworkPtr isc::dhcp::AssignableNetwork::sharedFromThis | ( |  | ) |
| protectedpure virtual

Returns shared pointer to this object.

This abstract method must be implemented by derived classes to return shared pointers the derivation.

Returns
  Pointer to this network.

Implemented in isc::dhcp::SharedNetwork6, and isc::dhcp::SharedNetwork4.

Referenced by setSharedNetwork().

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

- assignable_network.h