7 #if !defined(_Value_h_) 25 virtual std::string getTypeName()
const = 0;
26 virtual size_t getSize()
const = 0;
48 virtual std::string getTypeName()
const {
return "integer"; }
49 virtual size_t getSize()
const {
return sizeof(m_value); }
50 inline uint32_t getValue()
const {
return m_value; }
51 inline operator uint32_t()
const {
return m_value; }
87 , m_size(kHalfWordSize)
101 virtual std::string getTypeName()
const {
return "sized integer"; }
102 virtual size_t getSize()
const;
104 inline int_size_t getWordSize()
const {
return m_size; }
105 inline void setWordSize(int_size_t size) { m_size = size; }
107 uint32_t getWordSizeMask()
const;
121 m_size = kHalfWordSize;
157 : m_value(other.m_value)
161 virtual std::string getTypeName()
const {
return "string"; }
162 virtual size_t getSize()
const {
return m_value.size(); }
163 operator const char *()
const {
return m_value.c_str(); }
164 operator const std::string &()
const {
return m_value; }
165 operator std::string &() {
return m_value; }
166 operator const std::string *() {
return &m_value; }
167 operator std::string *() {
return &m_value; }
170 m_value = other.m_value;
200 virtual std::string getTypeName()
const {
return "binary"; }
201 virtual size_t getSize()
const {
return getLength(); }
Binary object value of arbitrary size.
Definition: apps/elftosb/common/Value.h:191
32-bit signed integer value.
Definition: apps/elftosb/common/Value.h:32
uint32_t m_value
The integer value.
Definition: apps/elftosb/common/Value.h:59
Adds a word size attribute to IntegerValue.
Definition: apps/elftosb/common/Value.h:72
Definition: BootImage.h:13
Abstract base class for values of arbitrary types.
Definition: apps/elftosb/common/Value.h:20
String value.
Definition: apps/elftosb/common/Value.h:141
int_size_t m_size
Size of the integer.
Definition: apps/elftosb/common/Value.h:133
Manages a binary object of arbitrary length.
Definition: apps/elftosb/common/Blob.h:18