12 #ifndef _H_SST_CORE_STATISTICS_FIELDINFO
13 #define _H_SST_CORE_STATISTICS_FIELDINFO
15 #include "sst/core/sst_types.h"
18 namespace Statistics {
22 template <
typename,
typename>
struct is_type_same {
static const bool value =
false;};
23 template <
typename T>
struct is_type_same<T,T> {
static const bool value =
true;};
36 enum fieldType_t {UNDEFINED, UINT32, UINT64, INT32, INT64, FLOAT, DOUBLE};
37 typedef int32_t fieldHandle_t;
49 inline const std::string&
getStatName()
const {
return m_statName;}
51 inline const std::string&
getFieldName()
const {
return m_fieldName;}
73 static const char* getFieldTypeShortName(
fieldType_t type);
74 static const char* getFieldTypeFullName(
fieldType_t type);
80 if (is_type_same<T, uint32_t >::value){
return UINT32;}
81 if (is_type_same<T, int64_t >::value){
return INT64; }
82 if (is_type_same<T, uint64_t >::value){
return UINT64;}
83 if (is_type_same<T, float >::value){
return FLOAT; }
84 if (is_type_same<T, double >::value){
return DOUBLE;}
94 std::string m_statName;
95 std::string m_fieldName;
97 fieldHandle_t m_fieldHandle;
The class for representing Statistic Output Fields
Definition: statfieldinfo.h:32
Definition: statfieldinfo.h:22
fieldType_t getFieldType() const
Return the field type related to this field info.
Definition: statfieldinfo.h:53
const std::string & getStatName() const
Return the statistic name related to this field info.
Definition: statfieldinfo.h:49
fieldHandle_t getFieldHandle()
Get the field handle.
Definition: statfieldinfo.h:71
void setFieldHandle(fieldHandle_t handle)
Set the field handle.
Definition: statfieldinfo.h:66
bool operator==(StatisticFieldInfo &FieldInfo1)
Compare two field info structures.
Definition: statfieldinfo.cc:28
StatisticFieldInfo(const char *statName, const char *fieldName, fieldType_t fieldType)
Construct a StatisticFieldInfo.
Definition: statfieldinfo.cc:20
const std::string & getFieldName() const
Return the field name related to this field info.
Definition: statfieldinfo.h:51
std::string getFieldUniqueName() const
Return the field type related to this field info.
Definition: statfieldinfo.cc:35
fieldType_t
Supported Field Types.
Definition: statfieldinfo.h:36