vega
integer_string_manipulator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
5 
6 namespace vega {
7  class IntegerString {
8  private:
9  int m_number;
10 
11  public:
12  IntegerString();
13  IntegerString(int i);
14  IntegerString(const std::string& s);
15 
16  operator int() const;
17 
18  bool operator ==(const IntegerString& is) const;
19  bool operator !=(const IntegerString& is) const;
20 
21  std::string str() const;
22  };
23 
24  namespace manipulators {
27 
28  public:
29  virtual bool is_valid_for(const VR& vr) const override {
30  return vr == vr::IS;
31  }
32  };
33  }
34 
35  namespace vr {
36  template <>
37  bool manipulator_is_valid_for<manipulators::IntegerStringManipulator>(VR::value_type value);
38  }
39 }
std::string str() const
Definition: vr.h:13
virtual bool is_valid_for(const VR &vr) const override
Definition: integer_string_manipulator.h:29
Definition: integer_string_manipulator.h:25
uint16_t value_type
Definition: vr.h:29
Definition: integer_string_manipulator.h:7
bool operator==(const IntegerString &is) const
Definition: age.h:6
A manipulator class for VR that represent elements which are encoded in DICOM using strings...
Definition: padded_string_manipulator.h:89
const VR IS
Definition: vr_constants.h:225
bool operator!=(const IntegerString &is) const