eRPC Generator (erpcgen)  Rev. 1.12.0
NXP Semiconductors
IntegerValue Class Reference

64-bit integer value. More...

#include <Value.hpp>

Inheritance diagram for IntegerValue:
Value

Public Types

enum  int_type_t {
  kSigned,
  kSignedLong,
  kUnsigned,
  kUnsignedLong
}
 Supported sizes of integers.
 

Public Member Functions

 IntegerValue (int_type_t type=kSigned)
 Constructor.
 
 IntegerValue (uint64_t value, int_type_t type=kSigned)
 Constructor. More...
 
 IntegerValue (const IntegerValue &other)
 Copy constructor. More...
 
virtual std::string getTypeName () const override
 Get IntegerValue type name. More...
 
virtual size_t getSize () const override
 Get IntegerValue type size. More...
 
uint64_t getValue () const
 This function returns value. More...
 
int_type_t getIntType ()
 This function returns signed/unsigned type. More...
 
 operator uint64_t () const
 Casting operator. More...
 
IntegerValueoperator= (int64_t value)
 Assign operator. More...
 
virtual std::string toString () const override
 Get IntegerValue type string representation. More...
 
virtual Valueclone () const override
 Clone IntegerValue. More...
 
- Public Member Functions inherited from Value
 Value (value_type_t theType)
 Constructor. More...
 
virtual ~Value ()
 Destructor.
 
virtual value_type_t getType () const
 Get Value type. More...
 

Protected Attributes

uint64_t m_value
 The integer value.
 
int_type_t m_intType
 The integer type.
 

Detailed Description

64-bit integer value.

Constructor & Destructor Documentation

IntegerValue::IntegerValue ( uint64_t  value,
int_type_t  type = kSigned 
)
inlineexplicit

Constructor.

Parameters
[in]valueIntegerValue value.
IntegerValue::IntegerValue ( const IntegerValue other)
inline

Copy constructor.

Parameters
[in]otherIntegerValue to copy.

Member Function Documentation

virtual Value* IntegerValue::clone ( ) const
inlineoverridevirtual

Clone IntegerValue.

Returns
Cloned IntegerValue.

Implements Value.

int_type_t IntegerValue::getIntType ( )
inline

This function returns signed/unsigned type.

Returns
value IntegerValue type.
virtual size_t IntegerValue::getSize ( ) const
inlineoverridevirtual

Get IntegerValue type size.

Returns
IntegerValue type size.

Implements Value.

virtual std::string IntegerValue::getTypeName ( ) const
inlineoverridevirtual

Get IntegerValue type name.

Returns
IntegerValue type name.

Implements Value.

uint64_t IntegerValue::getValue ( ) const
inline

This function returns value.

Returns
value IntegerValue value.
IntegerValue::operator uint64_t ( ) const
inline

Casting operator.

Returns
value IntegerValue value.
IntegerValue& IntegerValue::operator= ( int64_t  value)
inline

Assign operator.

Parameters
[in]valueIntegerValue value.
Returns
IntegerValue reference.
virtual std::string IntegerValue::toString ( ) const
inlineoverridevirtual

Get IntegerValue type string representation.

Returns
IntegerValue type string representation.

Implements Value.


The documentation for this class was generated from the following file: