16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_TYPEINDEX_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_TYPEINDEX_H_ 22 #include <type_traits> 39 using Value = std::type_index;
41 #else // ACSDK_USE_RTTI 51 template <
typename Type>
56 #endif // ACSDK_USE_RTTI 92 template <
typename Type>
106 #ifdef ACSDK_USE_RTTI 113 template <
typename Type>
119 return m_value.name();
122 #else // ACSDK_USE_RTTI 124 template <
typename Type>
132 template <
typename Type>
139 std::stringstream ss;
140 ss <<
'[' << m_value <<
']';
144 #endif // ACSDK_USE_RTTI 146 inline TypeIndex::TypeIndex(
Value value) : m_value{value} {
150 return m_value == x.m_value;
154 return m_value != x.m_value;
158 return m_value < x.m_value;
168 template <
typename Type>
172 .d(
"TypeIndex", getTypeIndex<Type>().
getName()));
178 #define ACSDK_LOG_TYPE_INDEX(type) logTypeIndex<type>(#type) 191 inline std::size_t hash<alexaClientSDK::avsCommon::utils::TypeIndex>::operator()(
193 return hash<alexaClientSDK::avsCommon::utils::TypeIndex::Value>()(typeIndex.m_value);
198 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_TYPEINDEX_H_ static char m_instance
Definition: TypeIndex.h:53
friend TypeIndex getTypeIndex()
Definition: TypeIndex.h:133
::std::string string
Definition: gtest-port.h:1097
Definition: TypeIndex.h:35
bool operator<(TypeIndex rhs) const
Definition: TypeIndex.h:157
void * Value
Definition: TypeIndex.h:45
Definition: CapabilityConfiguration.h:190
bool operator!=(TypeIndex rhs) const
Definition: TypeIndex.h:153
std::string getName() const
Definition: TypeIndex.h:138
void logTypeIndex(const std::string &name)
Definition: TypeIndex.h:169
void acsdkInfo(const LogEntry &entry)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
type
Definition: upload.py:443
bool operator==(TypeIndex rhs) const
Definition: TypeIndex.h:149
Type
Definition: Type.h:26
Definition: TypeIndex.h:52
LogEntry is used to compile the log entry text to log via Logger.
Definition: LogEntry.h:33