concepts::ParseObjectFromString< F > Class Template Reference

Class for parsing objects like "Circle(1.0)" or "Edge(1,2)" from a string. More...

#include <stringFunc.hh>

Inheritance diagram for concepts::ParseObjectFromString< F >:
concepts::OutputOperator

Public Member Functions

Sequence< F > & data ()
 Returns the data. More...
 
std::string & name ()
 Returns the name of the object. More...
 
bool parse (const std::string s)
 Parser from a string. More...
 
 ParseObjectFromString (const char *name, const F data)
 Constructor with default name and default first data entry. More...
 
 ParseObjectFromString (const char *name, const F data1, const F data2)
 Constructor with default name and default first two data entries. More...
 
 ParseObjectFromString (const char *name, const F data1, const F data2, const F data3)
 Constructor with default name and default first three data entries. More...
 
 ParseObjectFromString (const char *name="", const Sequence< F > data=Sequence< F >())
 Constructor with default name and default data. More...
 

Protected Member Functions

std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Attributes

Sequence< F > data_
 Data of the object. More...
 
std::string name_
 Name of the object. More...
 

Detailed Description

template<class F>
class concepts::ParseObjectFromString< F >

Class for parsing objects like "Circle(1.0)" or "Edge(1,2)" from a string.

Author
Kersten Schmidt, 2009

Definition at line 102 of file stringFunc.hh.

Constructor & Destructor Documentation

◆ ParseObjectFromString() [1/4]

template<class F >
concepts::ParseObjectFromString< F >::ParseObjectFromString ( const char *  name = "",
const Sequence< F >  data = Sequence<F>() 
)
inline

Constructor with default name and default data.

Definition at line 105 of file stringFunc.hh.

◆ ParseObjectFromString() [2/4]

template<class F >
concepts::ParseObjectFromString< F >::ParseObjectFromString ( const char *  name,
const F  data 
)
inline

Constructor with default name and default first data entry.

Definition at line 109 of file stringFunc.hh.

◆ ParseObjectFromString() [3/4]

template<class F >
concepts::ParseObjectFromString< F >::ParseObjectFromString ( const char *  name,
const F  data1,
const F  data2 
)
inline

Constructor with default name and default first two data entries.

Definition at line 112 of file stringFunc.hh.

◆ ParseObjectFromString() [4/4]

template<class F >
concepts::ParseObjectFromString< F >::ParseObjectFromString ( const char *  name,
const F  data1,
const F  data2,
const F  data3 
)
inline

Constructor with default name and default first three data entries.

Definition at line 115 of file stringFunc.hh.

Member Function Documentation

◆ data()

template<class F >
Sequence<F>& concepts::ParseObjectFromString< F >::data ( )
inline

Returns the data.

Definition at line 126 of file stringFunc.hh.

◆ info()

template<class F >
std::ostream & concepts::ParseObjectFromString< F >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Definition at line 160 of file stringFunc.hh.

◆ name()

template<class F >
std::string& concepts::ParseObjectFromString< F >::name ( )
inline

Returns the name of the object.

Definition at line 124 of file stringFunc.hh.

◆ parse()

template<class F >
bool concepts::ParseObjectFromString< F >::parse ( const std::string  s)

Parser from a string.

Definition at line 140 of file stringFunc.hh.

Member Data Documentation

◆ data_

template<class F >
Sequence<F> concepts::ParseObjectFromString< F >::data_
private

Data of the object.

Definition at line 136 of file stringFunc.hh.

◆ name_

template<class F >
std::string concepts::ParseObjectFromString< F >::name_
private

Name of the object.

Definition at line 134 of file stringFunc.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich