<<value-type>> Provides a safe, scoped enumeration based on def::type
More...
#include <SafeEnumeration.hpp>
Inherits def.
Related Functions |
(Note that these are not member functions.)
|
template<typename def , typename inner > |
std::ostream & | operator<< (std::ostream &out, const safe_enum< def, inner > &the_enum) |
| Applies operator<< to the underlying enum.
|
|
Detailed Description
template<typename def, typename inner = typename def::type>
class dds::core::safe_enum< def, inner >
<<value-type>> Provides a safe, scoped enumeration based on def::type
The purpose of this class is to provide a C++11-style enum class, where the enumeration constants are scoped.
- Template Parameters
-
def | A struct containing the actual enumeration, def::type |
See for example dds::core::policy::ReliabilityKind. The actual enumeration is in dds::core::policy::ReliabilityKind_def, but the application only needs to use the former:
Member Typedef Documentation
template<typename def, typename inner = typename def::type>
Constructor & Destructor Documentation
template<typename def, typename inner = typename def::type>
Initializes the enumeration to zero.
- Note
- Zero may not be a valid enumerator
template<typename def, typename inner = typename def::type>
Member Function Documentation
template<typename def, typename inner = typename def::type>
Retrieves the actual enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
template<typename def, typename inner = typename def::type>
Applies operator to underlying enumeration value.
Friends And Related Function Documentation
template<typename def, typename inner = typename def::type>
Swaps to underlying enumeration value.
template<typename def , typename inner >
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const safe_enum< def, inner > & |
the_enum |
|
) |
| |
|
related |
Applies operator<<
to the underlying enum.