30 #if !defined(_Value_h_) 34 #include "blfwk/stdafx.h" 35 #include "blfwk/int_size.h" 36 #include "blfwk/Blob.h" 48 virtual std::string getTypeName()
const = 0;
49 virtual size_t getSize()
const = 0;
71 virtual std::string getTypeName()
const {
return "integer"; }
72 virtual size_t getSize()
const {
return sizeof(m_value); }
73 inline uint32_t getValue()
const {
return m_value; }
74 inline operator uint32_t()
const {
return m_value; }
110 , m_size(kHalfWordSize)
124 virtual std::string getTypeName()
const {
return "sized integer"; }
125 virtual size_t getSize()
const;
127 inline int_size_t getWordSize()
const {
return m_size; }
128 inline void setWordSize(int_size_t size) { m_size = size; }
130 uint32_t getWordSizeMask()
const;
144 m_size = kHalfWordSize;
180 : m_value(other.m_value)
184 virtual std::string getTypeName()
const {
return "string"; }
185 virtual size_t getSize()
const {
return m_value.size(); }
186 operator const char *()
const {
return m_value.c_str(); }
187 operator const std::string &()
const {
return m_value; }
188 operator std::string &() {
return m_value; }
189 operator const std::string *() {
return &m_value; }
190 operator std::string *() {
return &m_value; }
193 m_value = other.m_value;
223 virtual std::string getTypeName()
const {
return "binary"; }
224 virtual size_t getSize()
const {
return getLength(); }
Definition: BlfwkErrors.h:16
uint32_t m_value
The integer value.
Definition: src/blfwk/Value.h:82
Adds a word size attribute to IntegerValue.
Definition: src/blfwk/Value.h:95
Abstract base class for values of arbitrary types.
Definition: src/blfwk/Value.h:43
String value.
Definition: src/blfwk/Value.h:164
32-bit signed integer value.
Definition: src/blfwk/Value.h:55
Binary object value of arbitrary size.
Definition: src/blfwk/Value.h:214
Manages a binary object of arbitrary length.
Definition: apps/elftosb/common/Blob.h:18
int_size_t m_size
Size of the integer.
Definition: src/blfwk/Value.h:156