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

Simply container to provide the data for a StringView instance usable by all the string functions. More...

#include <stringdatastructures.hpp>

Collaboration diagram for StringArg:

Public Member Functions

 StringArg ()
 Default constructor. More...
 
 StringArg (const std::string &sStr)
 Construct a StringArg instance from a std::string instance. More...
 
 StringArg (const StringArg &sStr)
 Copy a StringArg instance. More...
 
StringArgoperator= (const StringArg &sStr)
 StringArg assignment operator overload. More...
 
StringArgoperator= (const std::string &sStr)
 StringArg assignment operator overload for a std::string instance. More...
 
bool is_string () const
 Determine, whether the contained string represents a string literal. More...
 
StringView view () const
 Get a view to the contained string. More...
 
std::string & getRef ()
 Get a reference to the contained string. More...
 

Private Attributes

std::string m_data
 

Detailed Description

Simply container to provide the data for a StringView instance usable by all the string functions.

Definition at line 38 of file stringdatastructures.hpp.

Constructor & Destructor Documentation

◆ StringArg() [1/3]

StringArg::StringArg ( )
inline

Default constructor.

Definition at line 47 of file stringdatastructures.hpp.

◆ StringArg() [2/3]

StringArg::StringArg ( const std::string &  sStr)
inline

Construct a StringArg instance from a std::string instance.

Parameters
sStrconst std::string

Definition at line 57 of file stringdatastructures.hpp.

◆ StringArg() [3/3]

StringArg::StringArg ( const StringArg sStr)
inline

Copy a StringArg instance.

Parameters
sStrconst StringArg&

Definition at line 66 of file stringdatastructures.hpp.

Member Function Documentation

◆ getRef()

std::string & StringArg::getRef ( )
inline

Get a reference to the contained string.

Returns
std::string&

Definition at line 130 of file stringdatastructures.hpp.

References m_data.

Referenced by StringVector::evalIfElse(), strfnc_getkeyval(), and strfnc_to_string().

◆ is_string()

bool StringArg::is_string ( ) const
inline

Determine, whether the contained string represents a string literal.

Returns
bool

Definition at line 104 of file stringdatastructures.hpp.

References m_data.

Referenced by strfnc_to_string(), and view().

◆ operator=() [1/2]

StringArg & StringArg::operator= ( const std::string &  sStr)
inline

StringArg assignment operator overload for a std::string instance.

Parameters
sStrconst std::string&
Returns
StringArg&

Definition at line 91 of file stringdatastructures.hpp.

References m_data.

◆ operator=() [2/2]

StringArg & StringArg::operator= ( const StringArg sStr)
inline

StringArg assignment operator overload.

Parameters
sStrconst StringArg&
Returns
StringArg&

Definition at line 77 of file stringdatastructures.hpp.

References m_data.

◆ view()

Member Data Documentation

◆ m_data

std::string StringArg::m_data
private

Definition at line 41 of file stringdatastructures.hpp.

Referenced by getRef(), is_string(), operator=(), and view().


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