PLaSK library
|
Held names of axises. More...
#include <plask/axes.hpp>
Classes | |
struct | Register |
Register of axis names. More... | |
Public Member Functions | |
AxisNames () | |
Construct uninitialized object, with empty names of axes. | |
AxisNames (const std::string &c0_name, const std::string &c1_name, const std::string &c2_name) | |
const std::string & | operator[] (const std::size_t i) const |
Get axis name by index. | |
std::size_t | operator[] (const std::string &name) const |
Get axis index by name. | |
Primitive< 3 >::Direction | get3D (const std::string &name) const |
Get axis index by name. | |
Primitive< 2 >::Direction | get2D (const std::string &name) const |
Get axis index in 2D by name. | |
template<int DIMS> | |
Primitive< DIMS >::Direction | get (const std::string &name) const |
Get axis index in 2D/3D by name. | |
std::string | str () const |
std::string | getNameForLong () const |
std::string | getNameForTran () const |
std::string | getNameForVert () const |
bool | operator== (const AxisNames &to_compare) const |
Check if this and to_compare have equals names of all axes. | |
bool | operator!= (const AxisNames &to_compare) const |
Check if this and to_compare have not equals names of all axes. | |
template<> | |
Primitive< 2 >::Direction | get (const std::string &name) const |
template<> | |
Primitive< 3 >::Direction | get (const std::string &name) const |
Static Public Member Functions | |
static const AxisNames & | getAbsoluteNames () |
Get absolute names. | |
Public Attributes | |
std::string | byIndex [3] |
Name of axes (by index). | |
Static Public Attributes | |
static Register | axisNamesRegister |
Register of standard axis names. | |
Held names of axises.
Can change: axis number (from 0 to 2) <-> axis name (string)
|
inline |
Primitive< DIMS >::Direction plask::AxisNames::get | ( | const std::string & | name | ) | const |
Get axis index in 2D/3D by name.
Throws exception if name is not proper name of axis in 2D/3D.
name | axis name |
name
|
inline |
|
inline |
|
inline |
std::size_t plask::AxisNames::operator[] | ( | const std::string & | name | ) | const |
std::string plask::AxisNames::str | ( | ) | const |
|
static |
std::string plask::AxisNames::byIndex[3] |