CatapultServer  v0.5.0.1 (Elephant)
DiagnosticCounterId.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <string>
23 
24 namespace catapult { namespace utils {
25 
28  public:
30  static constexpr auto Max_Counter_Name_Size = 13u;
31 
32  public:
35 
37  explicit DiagnosticCounterId(const std::string& name);
38 
40  explicit DiagnosticCounterId(uint64_t value);
41 
42  public:
44  const std::string& name() const {
45  return m_name;
46  }
47 
49  uint64_t value() const {
50  return m_value;
51  }
52 
53  private:
54  std::string m_name;
55  uint64_t m_value;
56  };
57 }}
catapult::utils::DiagnosticCounterId
A diagnostic counter id.
Definition: DiagnosticCounterId.h:27
exceptions.h
catapult::utils::DiagnosticCounterId::name
const std::string & name() const
Gets the id name.
Definition: DiagnosticCounterId.h:44
catapult::utils::DiagnosticCounterId::m_name
std::string m_name
Definition: DiagnosticCounterId.h:54
catapult::utils::DiagnosticCounterId::DiagnosticCounterId
DiagnosticCounterId()
Creates an empty id.
Definition: DiagnosticCounterId.cpp:30
DiagnosticCounterId.h
CATAPULT_THROW_INVALID_ARGUMENT_1
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
m_name
std::string m_name
Definition: JointValidator.cpp:90
catapult::utils::DiagnosticCounterId::value
uint64_t value() const
Gets the id value.
Definition: DiagnosticCounterId.h:49
catapult::utils::DiagnosticCounterId::m_value
uint64_t m_value
Definition: DiagnosticCounterId.h:55
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::DiagnosticCounterId::Max_Counter_Name_Size
static constexpr auto Max_Counter_Name_Size
Maximum counter name size.
Definition: DiagnosticCounterId.h:30