te::dt::SimpleData< T, typeCode > Class Template Reference

A template for atomic data types (integers, floats, strings and others). More...

#include <SimpleData.h>

Inheritance diagram for te::dt::SimpleData< T, typeCode >:
te::dt::AbstractData

Public Member Functions

AbstractDataclone () const
 It returns a clone of this object. More...
 
virtual int getTypeCode () const
 It returns the data type code associated to the data value. More...
 
getValue () const
 It returns the associated value. More...
 
SimpleDataoperator= (const SimpleData &rhs)
 Copy constructor. More...
 
 SimpleData (T value)
 Constructor. More...
 
 SimpleData (const SimpleData &rhs)
 Copy constructor. More...
 
virtual std::string toString () const
 It returns the data value in a string representation. More...
 
virtual ~SimpleData ()
 Virtual destructor. More...
 

Private Attributes

m_val
 The data value. More...
 

Detailed Description

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
class te::dt::SimpleData< T, typeCode >

A template for atomic data types (integers, floats, strings and others).

Requirements on type T:

  • T must be a copy constructible type.
  • T must be used with output streams via operator <<.
See also
AbstractData, CompositeData, DataType, DateTime, ByteArray

Definition at line 59 of file SimpleData.h.

Constructor & Destructor Documentation

◆ SimpleData() [1/2]

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
te::dt::SimpleData< T, typeCode >::SimpleData ( value)
inline

Constructor.

Parameters
valueThe value associated.

Definition at line 68 of file SimpleData.h.

Referenced by te::dt::SimpleData< boost::int64_t, INT64_TYPE >::clone().

◆ SimpleData() [2/2]

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
te::dt::SimpleData< T, typeCode >::SimpleData ( const SimpleData< T, typeCode > &  rhs)
inline

Copy constructor.

Parameters
rhsThe right-hand-side data.

Definition at line 78 of file SimpleData.h.

◆ ~SimpleData()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
virtual te::dt::SimpleData< T, typeCode >::~SimpleData ( )
inlinevirtual

Virtual destructor.

Definition at line 84 of file SimpleData.h.

Member Function Documentation

◆ clone()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
AbstractData* te::dt::SimpleData< T, typeCode >::clone ( ) const
inlinevirtual

It returns a clone of this object.

Returns
A clone of this object.

Implements te::dt::AbstractData.

Definition at line 106 of file SimpleData.h.

◆ getTypeCode()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
virtual int te::dt::SimpleData< T, typeCode >::getTypeCode ( ) const
inlinevirtual

It returns the data type code associated to the data value.

Returns
The data type code associated to the data value.

Implements te::dt::AbstractData.

Definition at line 116 of file SimpleData.h.

◆ getValue()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
T te::dt::SimpleData< T, typeCode >::getValue ( ) const
inline

It returns the associated value.

Returns
The associated value.

Definition at line 139 of file SimpleData.h.

◆ operator=()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
SimpleData& te::dt::SimpleData< T, typeCode >::operator= ( const SimpleData< T, typeCode > &  rhs)
inline

Copy constructor.

Parameters
rhsThe right-hand-side data.

Definition at line 91 of file SimpleData.h.

◆ toString()

template<class T, int typeCode = te::dt::UNKNOWN_TYPE>
virtual std::string te::dt::SimpleData< T, typeCode >::toString ( void  ) const
inlinevirtual

It returns the data value in a string representation.

Returns
The data value in a string representation.

Implements te::dt::AbstractData.

Definition at line 126 of file SimpleData.h.

Member Data Documentation

◆ m_val


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