PLaSK library
|
Helper class for easy constructing string representations of complex materials. More...
#include <plask/material/material.hpp>
Public Member Functions | |
operator std::string () const | |
Cast to string operator. | |
StringBuilder & | operator() (const std::string &objectName) |
Append name of object (without ammount) to built string. | |
StringBuilder (const std::string &objectName) | |
Construct builder and append name of object (without ammount) to built string. | |
StringBuilder & | operator() (const std::string &objectName, double ammount) |
Append name of object (with ammount) to built string. | |
StringBuilder (const std::string &objectName, double ammount) | |
Construct builder and append name of object (with ammount) to built string. | |
std::string | dopant (const std::string &dopant, double dopantConcentration) |
Append information about doping to built string. | |
Public Attributes | |
std::stringstream | str |
Part of name which has been already built. | |
Helper class for easy constructing string representations of complex materials.
Typically this is used to implement str() method.
Example:
Definition at line 238 of file material.hpp.
|
inline |
Construct builder and append name of object (without ammount) to built string.
objectName | name of object to add |
Definition at line 260 of file material.hpp.
|
inline |
Construct builder and append name of object (with ammount) to built string.
objectName | name of object to add |
ammount | ammount of added object |
Definition at line 277 of file material.hpp.
std::string plask::Material::StringBuilder::dopant | ( | const std::string & | dopant, |
double | dopantConcentration | ||
) |
Append information about doping to built string.
dopant | name of dopant |
dopantConcentration | dopant concentration |
Definition at line 77 of file material.cpp.
|
inline |
Cast to string operator.
Definition at line 247 of file material.hpp.
|
inline |
Append name of object (without ammount) to built string.
objectName | name of object to add |
Definition at line 254 of file material.hpp.
Material::StringBuilder & plask::Material::StringBuilder::operator() | ( | const std::string & | objectName, |
double | ammount | ||
) |
Append name of object (with ammount) to built string.
objectName | name of object to add |
ammount | ammount of added object |
Definition at line 69 of file material.cpp.
std::stringstream plask::Material::StringBuilder::str |
Part of name which has been already built.
Definition at line 241 of file material.hpp.