ansys::dpf::UnitSystem Struct Reference
Last update: 10.07.2023
ansys::dpf::UnitSystem Struct Reference
#include <dpf_api_base.h>
Public Member Functions | |
UnitSystem (std::string const &name, int id) | |
UnitSystem (std::string const &name, std::string const &unit_names) | |
operator std::string () const | |
const char * | c_str () const |
dp_id | getId () const |
std::string | getUnitNames () const |
bool | operator== (UnitSystem const &rhs) const |
Detailed Description
System of measurement units.
Constructor & Destructor Documentation
◆ UnitSystem() [1/2]
|
explicit |
Create new unit system.
- Parameters
-
[in] name Name of unit system. [in] id Common unit system identifier used by Ansys.
◆ UnitSystem() [2/2]
|
explicit |
Creates a new custom unit system from its base unit strings
- Parameters
-
[in] name Name of unit system [in] unit_names semicolon-separated list of base units (Length, Mass, Time, Temperature, Electric Charge and Angle)
Member Function Documentation
◆ c_str()
const char * ansys::dpf::UnitSystem::c_str | ( | ) | const |
Gets name of unit system.
- Returns
- Name of unit system.
◆ getId()
dp_id ansys::dpf::UnitSystem::getId | ( | ) | const |
Gets identifer of unit system.
- Returns
- Id of unit system.
◆ getUnitNames()
std::string ansys::dpf::UnitSystem::getUnitNames | ( | ) | const |
Gets unit_names of unit system (if it is custom).
- Returns
- unit_names string of unit system (if it is custom).
◆ operator std::string()
ansys::dpf::UnitSystem::operator std::string | ( | ) | const |
Name of unit system.