Guidelines for defining attributes represented by structures. More...
#include "abort.h"#include "tuple.h"#include <concepts>#include <functional>#include <tuple>#include <type_traits>#include <utility>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | ns3 |
| Every class exported by the ns3 library is enclosed in the ns3 namespace. | |
| namespace | ns3::internal |
| Namespace for implementation details. | |
Concepts | |
| concept | ns3::internal::SettableStructField |
| Concept matching a structure field that can be set from the given value type. | |
| concept | ns3::internal::StructFieldDescriptor |
| Concept matching a valid structure field descriptor. | |
| concept | ns3::internal::StructFieldFor |
| Concept matching a structure field that can be read from the represented structure. | |
Functions | |
| template<typename T, typename T1> | |
| Ptr< const AttributeAccessor > | ns3::MakeStructAccessor (T1 a1) |
| Create an AttributeAccessor for a structure data member, or for a lone class get functor or set method. | |
| template<typename T, typename T1, typename T2> | |
| Ptr< const AttributeAccessor > | ns3::MakeStructAccessor (T1 a1, T2 a2) |
| Create an AttributeAccessor using a pair of get functor and set methods. | |
| template<typename T, typename... Ts> | |
| Ptr< const AttributeChecker > | ns3::MakeStructChecker (Ts... checkers) |
| Create a StructChecker from the AttributeCheckers associated with the fields. | |
Guidelines for defining attributes represented by structures.
StructValue allows a structure to use the attribute system's accessors, checkers, serialization, and deserialization facilities. To define a StructValue, provide one StructField descriptor for every field, in the same order in which the field values are serialized. Choose one of the following forms according to how the structure exposes and initializes its fields (
StructValue stores the fields internally as a TupleValue. MakeStructAccessor() and MakeStructChecker() can then be used to register the structure as an attribute and validate its individual fields.
Definition in file struct.h.