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

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

#include <cluster.hpp>

Inheritance diagram for NumeRe::ClusterStringItem:
Collaboration diagram for NumeRe::ClusterStringItem:

Public Member Functions

 ClusterStringItem (const std::string &strval)
 
virtual ~ClusterStringItem () override
 
virtual mu::value_type getDouble () override
 Returns the internal string converted to a value. More...
 
virtual void setDouble (const mu::value_type &val) override
 Overwrites the internal string with the passed value, which will be converted to a string first. More...
 
virtual std::string getString () override
 Returns the internal string. More...
 
virtual std::string getInternalString () override
 Returns the internal string. More...
 
virtual void setString (const std::string &strval) override
 Overwrites the internal string. 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

std::string sData
 

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 string. It features conversions to and from doubles on-the-fly.

Definition at line 242 of file cluster.hpp.

Constructor & Destructor Documentation

◆ ClusterStringItem()

NumeRe::ClusterStringItem::ClusterStringItem ( const std::string &  strval)
inline

Definition at line 248 of file cluster.hpp.

References setString().

Here is the call graph for this function:

◆ ~ClusterStringItem()

virtual NumeRe::ClusterStringItem::~ClusterStringItem ( )
inlineoverridevirtual

Definition at line 249 of file cluster.hpp.

Member Function Documentation

◆ getDouble()

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

Returns the internal string converted to a value.

Returns
virtual mu::value_type

Reimplemented from NumeRe::ClusterItem.

Definition at line 258 of file cluster.hpp.

References CONVTYPE_VALUE, isConvertible(), sData, and StrToCmplx().

Here is the call graph for this function:

◆ getInternalString()

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

Returns the internal string.

Returns
virtual std::string

Reimplemented from NumeRe::ClusterItem.

Definition at line 297 of file cluster.hpp.

References sData.

◆ getString()

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

Returns the internal string.

Returns
virtual std::string

Reimplemented from NumeRe::ClusterItem.

Definition at line 286 of file cluster.hpp.

References sData, and toExternalString().

Here is the call graph for this function:

◆ setDouble()

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

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

Parameters
valconst mu::value_type&
Returns
virtual void

Reimplemented from NumeRe::ClusterItem.

Definition at line 275 of file cluster.hpp.

References sData, and toString().

Here is the call graph for this function:

◆ setString()

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

Overwrites the internal string.

Parameters
strvalconst std::string&
Returns
virtual void

Reimplemented from NumeRe::ClusterItem.

Definition at line 309 of file cluster.hpp.

References sData.

Referenced by ClusterStringItem().

Member Data Documentation

◆ sData

std::string NumeRe::ClusterStringItem::sData
private

Definition at line 245 of file cluster.hpp.

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


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