OptFieldWithPresenceInd is a class modeling an optional field (in an Information Element, a management frame, etc.) having an associated Presence Indicator bit. More...
#include "wifi-opt-field.h"
Inheritance diagram for ns3::OptFieldWithPresenceInd< T >:
Collaboration diagram for ns3::OptFieldWithPresenceInd< T >:Public Member Functions | |
| OptFieldWithPresenceInd (bool &presenceFlag) | |
| constructor | |
| template<class... Args> | |
| constexpr T & | emplace (Args &&... args) |
| Construct the contained value in-place. | |
| constexpr bool | has_value () const |
| Check whether this object contains a value. | |
| constexpr | operator bool () const |
| Operator bool. | |
| constexpr T & | operator* () |
| constexpr const T & | operator* () const |
| constexpr T * | operator-> () |
| constexpr const T * | operator-> () const |
| constexpr OptFieldWithPresenceInd & | operator= (const std::optional< T > &other) |
| Assign the given value to the optional field. | |
| constexpr OptFieldWithPresenceInd & | operator= (std::nullopt_t) |
| Destroy the value (if any) contained in the optional field. | |
| constexpr OptFieldWithPresenceInd & | operator= (std::optional< T > &&other) |
| Assign the given value to the optional field. | |
| constexpr void | reset () |
| Destroy the value (if any) contained in the optional field. | |
Private Attributes | |
| std::optional< T > | m_field |
| the optional field | |
| std::reference_wrapper< bool > | m_presenceFlag |
| the Presence Indicator flag | |
OptFieldWithPresenceInd is a class modeling an optional field (in an Information Element, a management frame, etc.) having an associated Presence Indicator bit.
This class is a wrapper around std::optional (most of its functions are exposed, more can be added if needed) that additionally sets the Presence Indicator flag appropriately when operations like reset or assignment of a value are performed on the optional field.
Definition at line 28 of file wifi-opt-field.h.
| ns3::OptFieldWithPresenceInd< T >::OptFieldWithPresenceInd | ( | bool & | presenceFlag | ) |
constructor
| presenceFlag | the Presence Indicator flag |
Definition at line 94 of file wifi-opt-field.h.
References m_presenceFlag.
Referenced by operator bool().
Here is the caller graph for this function:
|
constexpr |
Construct the contained value in-place.
| Args | the type of arguments to pass to the constructor |
| args | the arguments to pass to the constructor |
Definition at line 171 of file wifi-opt-field.h.
References m_field, and m_presenceFlag.
|
constexpr |
Check whether this object contains a value.
Definition at line 135 of file wifi-opt-field.h.
References m_field.
|
explicitconstexpr |
Operator bool.
Definition at line 128 of file wifi-opt-field.h.
References OptFieldWithPresenceInd(), and m_field.
Here is the call graph for this function:
|
constexpr |
Definition at line 163 of file wifi-opt-field.h.
References m_field.
|
constexpr |
Definition at line 156 of file wifi-opt-field.h.
References m_field.
|
constexpr |
Definition at line 149 of file wifi-opt-field.h.
|
constexpr |
Definition at line 142 of file wifi-opt-field.h.
|
constexpr |
Assign the given value to the optional field.
| other | the given value |
Definition at line 111 of file wifi-opt-field.h.
References m_field, and m_presenceFlag.
|
constexpr |
Destroy the value (if any) contained in the optional field.
Definition at line 102 of file wifi-opt-field.h.
References m_field, and m_presenceFlag.
|
constexpr |
Assign the given value to the optional field.
| other | the given value |
Definition at line 120 of file wifi-opt-field.h.
References m_field, and m_presenceFlag.
|
constexpr |
Destroy the value (if any) contained in the optional field.
Definition at line 180 of file wifi-opt-field.h.
References m_field, and m_presenceFlag.
|
private |
the optional field
Definition at line 80 of file wifi-opt-field.h.
Referenced by emplace(), has_value(), operator bool(), operator*(), operator*(), operator=(), operator=(), operator=(), and reset().
|
private |
the Presence Indicator flag
Definition at line 81 of file wifi-opt-field.h.
Referenced by OptFieldWithPresenceInd(), emplace(), operator=(), operator=(), operator=(), and reset().