/*
* File: Value.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_Value_h_)
#define _Value_h_
protected:
uint32_t m_value; //!< The integer value.
};
/*!
* \brief Adds a word size attribute to IntegerValue.
*
* The word size really only acts as an attribute that is carried along
* with the integer value. It doesn't affect the actual value at all.
* However, you can use the getWordSizeMask() method to mask off bits
* that should not be there.
*
* The word size defaults to a 32-bit word.
*/
class SizedIntegerValue : public IntegerValue
{
public:
SizedIntegerValue() : IntegerValue(), m_size(kWordSize) {}
SizedIntegerValue(uint32_t value, int_size_t size=kWordSize) : IntegerValue(value), m_size(size) {}
SizedIntegerValue(uint16_t value) : IntegerValue(value), m_size(kHalfWordSize) {}
SizedIntegerValue(uint8_t value) : IntegerValue(value), m_size(kByteSize) {}
SizedIntegerValue(const SizedIntegerValue & other) : IntegerValue(other), m_size(other.m_size) {}