Functions that operate on ChannelDirection enum.
More...
Functions that operate on ChannelDirection enum.
This is a small namespace holding functions that only operate on ChannelDirection enum.
This is part of lib Codec.
◆ fromString()
Convert ChannelDirection string to enum.
- Parameters
-
[in] | s | The channel's direction as a string. Matches against these strings "Forward", "Return", or "notapplicable". Matching is not sensitive to case. |
- Returns
- Enum value.
- Exceptions
-
std::invalid_argument | Throws for unrecognized strings. isConvertibleFrom() can be used if throw is not needed. |
◆ fromUnsigned()
Convert to enum from unsigned integer.
- Parameters
-
[in] | v | The enum as an unsigned integer. |
- Returns
- Enum value. Returns Invalid for an unrecognized conversion.
◆ isConvertibleFrom()
bool EnumChannelDirection::isConvertibleFrom |
( |
const std::string & | s | ) |
|
|
noexcept |
Determines if given string can convert to enum.
- Parameters
-
[in] | s | The string of interest. |
- Returns
- True if convertible; false otherwise.
◆ listAsString()
std::string EnumChannelDirection::listAsString |
( |
| ) |
|
Returns a std::string of the enums separated by a space.
- Returns
- Returns a std::string of the enums separated by a space.
◆ toString()
Convert enum to string.
- Parameters
-
[in] | d | The enum of interest. |
- Returns
- Enum as a string.
◆ enumerators
Initial value:{
}
@ Forward
Traffic channel flows forward.
Definition EnumChannelDirection.h:24
@ NotApplicable
Direction doesn't apply, note this is valid.
Definition EnumChannelDirection.h:23
@ Return
Traffic channel flows return.
Definition EnumChannelDirection.h:25
Initialized array of enums for iterating.