A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::StructField< Value, Getter, Setter > Struct Template Reference

Describe a structure field and the AttributeValue used to represent it. More...

#include "struct.h"

Collaboration diagram for ns3::StructField< Value, Getter, Setter >:

Public Types

using getter_type = decltype(Getter)
 Type of the data member pointer or getter.
using setter_type = decltype(Setter)
 Type of the setter.
using value_type = Value
 AttributeValue type used to represent the field.

Static Public Attributes

static constexpr auto getter = Getter
 Pointer to the represented data member or to its getter.
static constexpr auto setter = Setter
 Pointer to the setter associated with a getter.

Detailed Description

template<typename Value, auto Getter, auto Setter = nullptr>
struct ns3::StructField< Value, Getter, Setter >

Describe a structure field and the AttributeValue used to represent it.

A field can be accessed either directly through a pointer to a data member:

Describe a structure field and the AttributeValue used to represent it.
Definition struct.h:227

or through a getter and a setter:

Template Parameters
ValueThe AttributeValue type used to represent the field.
GetterPointer to the represented data member or to its getter.
SetterPointer to the setter associated with a getter. It must be omitted when Getter points to a data member and may be omitted when a StructConstructor is provided.

Definition at line 226 of file struct.h.

Member Typedef Documentation

◆ getter_type

template<typename Value, auto Getter, auto Setter = nullptr>
using ns3::StructField< Value, Getter, Setter >::getter_type = decltype(Getter)

Type of the data member pointer or getter.

Definition at line 231 of file struct.h.

◆ setter_type

template<typename Value, auto Getter, auto Setter = nullptr>
using ns3::StructField< Value, Getter, Setter >::setter_type = decltype(Setter)

Type of the setter.

Definition at line 233 of file struct.h.

◆ value_type

template<typename Value, auto Getter, auto Setter = nullptr>
using ns3::StructField< Value, Getter, Setter >::value_type = Value

AttributeValue type used to represent the field.

Definition at line 229 of file struct.h.

Member Data Documentation

◆ getter

template<typename Value, auto Getter, auto Setter = nullptr>
auto ns3::StructField< Value, Getter, Setter >::getter = Getter
staticconstexpr

Pointer to the represented data member or to its getter.

Definition at line 236 of file struct.h.

◆ setter

template<typename Value, auto Getter, auto Setter = nullptr>
auto ns3::StructField< Value, Getter, Setter >::setter = Setter
staticconstexpr

Pointer to the setter associated with a getter.

Definition at line 238 of file struct.h.


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