NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeRe::ClusterDoubleItem Class Reference

This is a cluster item, which contains a double. It features conversions to and from strings on-the-fly. More...

#include <cluster.hpp>

Inheritance diagram for NumeRe::ClusterDoubleItem:
Collaboration diagram for NumeRe::ClusterDoubleItem:

Public Member Functions

 ClusterDoubleItem (const mu::value_type &value)
 
virtual ~ClusterDoubleItem () override
 
virtual mu::value_type getDouble () override
 Returns the internal value. More...
 
virtual void setDouble (const mu::value_type &val) override
 Overwrites the internal value. More...
 
virtual std::string getString () override
 Returns the internal value converted to a string. More...
 
virtual std::string getInternalString () override
 Returns the internal value converted to a string. More...
 
virtual std::string getParserString () override
 Returns the internal value converted to a string. More...
 
virtual void setString (const std::string &strval) override
 Overwrites the internal value with the passed string, which will converted to a value first. More...
 
- Public Member Functions inherited from NumeRe::ClusterItem
 ClusterItem (unsigned short type)
 
virtual ~ClusterItem ()
 
unsigned short getType () const
 Returns the ClusterItemType. More...
 
virtual mu::value_type getDouble ()
 Base implementation. Returns always NaN. More...
 
virtual void setDouble (const mu::value_type &val)
 Base implementation. Does nothing. More...
 
virtual std::string getString ()
 Base implementation. Always returns an empty string. More...
 
virtual std::string getInternalString ()
 Base implementation. Returns an empty string. More...
 
virtual std::string getParserString ()
 Base implementation. Returns a string with quotation marks. More...
 
virtual void setString (const std::string &strval)
 Base implementation. Does nothing. More...
 

Private Attributes

mu::value_type dData
 

Additional Inherited Members

- Public Types inherited from NumeRe::ClusterItem
enum  ClusterItemType { ITEMTYPE_INVALID = -1 , ITEMTYPE_MIXED , ITEMTYPE_DOUBLE , ITEMTYPE_STRING }
 Defines the available types of clusters. More...
 

Detailed Description

This is a cluster item, which contains a double. It features conversions to and from strings on-the-fly.

Definition at line 144 of file cluster.hpp.

Constructor & Destructor Documentation

◆ ClusterDoubleItem()

NumeRe::ClusterDoubleItem::ClusterDoubleItem ( const mu::value_type value)
inline

Definition at line 150 of file cluster.hpp.

◆ ~ClusterDoubleItem()

virtual NumeRe::ClusterDoubleItem::~ClusterDoubleItem ( )
inlineoverridevirtual

Definition at line 151 of file cluster.hpp.

Member Function Documentation

◆ getDouble()

virtual mu::value_type NumeRe::ClusterDoubleItem::getDouble ( )
inlineoverridevirtual

Returns the internal value.

Returns
virtual mu::value_type

Reimplemented from NumeRe::ClusterItem.

Definition at line 159 of file cluster.hpp.

References dData.

◆ getInternalString()

virtual std::string NumeRe::ClusterDoubleItem::getInternalString ( )
inlineoverridevirtual

Returns the internal value converted to a string.

Returns
virtual std::string

Reimplemented from NumeRe::ClusterItem.

Definition at line 198 of file cluster.hpp.

References date::abs(), dData, mu::isnan(), and toString().

Referenced by getParserString().

Here is the call graph for this function:

◆ getParserString()

virtual std::string NumeRe::ClusterDoubleItem::getParserString ( )
inlineoverridevirtual

Returns the internal value converted to a string.

Returns
virtual std::string

Reimplemented from NumeRe::ClusterItem.

Definition at line 213 of file cluster.hpp.

References getInternalString().

Here is the call graph for this function:

◆ getString()

virtual std::string NumeRe::ClusterDoubleItem::getString ( )
inlineoverridevirtual

Returns the internal value converted to a string.

Returns
virtual std::string

Reimplemented from NumeRe::ClusterItem.

Definition at line 183 of file cluster.hpp.

References date::abs(), dData, mu::isnan(), toExternalString(), and toString().

Here is the call graph for this function:

◆ setDouble()

virtual void NumeRe::ClusterDoubleItem::setDouble ( const mu::value_type val)
inlineoverridevirtual

Overwrites the internal value.

Parameters
valconst mu::value_type&
Returns
virtual void

Reimplemented from NumeRe::ClusterItem.

Definition at line 171 of file cluster.hpp.

References dData.

◆ setString()

virtual void NumeRe::ClusterDoubleItem::setString ( const std::string &  strval)
inlineoverridevirtual

Overwrites the internal value with the passed string, which will converted to a value first.

Parameters
strvalconst std::string&
Returns
virtual void

Reimplemented from NumeRe::ClusterItem.

Definition at line 227 of file cluster.hpp.

References CONVTYPE_VALUE, dData, isConvertible(), StrToCmplx(), and toInternalString().

Here is the call graph for this function:

Member Data Documentation

◆ dData

mu::value_type NumeRe::ClusterDoubleItem::dData
private

Definition at line 147 of file cluster.hpp.

Referenced by getDouble(), getInternalString(), getString(), setDouble(), and setString().


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