attribute¶
-
struct
mikrotik::api::attribute¶ A little utility class containing an attribute name and a value.
A simple utility class, mostly used by the DSL. Upon creation it formats the values into
=<name>=<value>, where value may be empty.- Since
v1.0.0
Public Functions
-
attribute(std::string_view name)¶ A construct valueless attribute.
Constructs an attribute with the specified name with the empty string as a value.
The attribute will be in the form
=<name>=.- Since
v1.0.0
- Parameters
name: The name of the attribute to create
-
attribute(const char *name)¶ A construct valueless attribute.
Constructs an attribute with the specified name with the empty string as a value.
The attribute will be in the form
=<name>=.- Since
v1.0.0
- Parameters
name: The name of the attribute to create
-
attribute(std::string_view name, std::string_view value)¶ A construct an attribute with a specified value.
Constructs an attribute with the specified name with the specified value. The attribute will be in the form
=<name>=<value>.- Since
v1.0.0
- Parameters
name: The name of the attribute to createvalue: The value of the attribute to create
-
attribute(const char *name, const char *value)¶ A construct an attribute with a specified value.
Constructs an attribute with the specified name with the specified value. The attribute will be in the form
=<name>=<value>.- Since
v1.0.0
- Parameters
name: The name of the attribute to createvalue: The value of the attribute to create
Public Members
-
std::string
value¶ The attribute in the required format for MikroTik.