indigoX
|
Singleton class for storing and access elemental information. More...
#include <indigox/classes/periodictable.hpp>
Public Member Functions | |
Element | GetElement (const int32_t z) const |
Get the element with the given atomic number. More... | |
Element | GetElement (const std::string name) const |
Get the element with the given name or symbol. More... | |
Element | GetUndefined () const |
Get the element for use when an element is not defined. More... | |
size_t | NumElements () const |
Number of elements in the PeriodicTable. More... | |
Element | operator[] (const int32_t z) const |
Get the element with the given atomic number. More... | |
Element | operator[] (const std::string name) const |
Get the element with the given name or symbol. More... | |
Friends | |
const PeriodicTable & | GetPeriodicTable () |
Friendship allows for access to a single PeriodicTable instance. More... | |
struct | indigox::test::TestPeriodicTable |
Friendship allws for testing implementation. More... | |
Singleton class for storing and access elemental information.
The IXPeriodicTable class provides the only means to access the IXElement class. Access to the instance should only be obtained using the GetInstance() method. Like most other classes in the indigoX library, usage is primarily intended through the use of smart pointers.
Element GetElement | ( | const int32_t | z | ) | const |
Get the element with the given atomic number.
z | the atomic number of the element to get. |
std::invalid_argument | If the requested atomic number does not exist within the PeriodicTable. |
Referenced by PeriodicTable::operator[]().
Element GetElement | ( | const std::string | name | ) | const |
Get the element with the given name or symbol.
Name based matches are made ignoring case. Symbol matches are made checking case as well.
name | the name or symbol of the element to get. |
std::invalid_argument | If the requested name or symbol does not exist within the PeriodicTable. |
|
inline |
Get the element for use when an element is not defined.
As there is not much point in an undefined element, this method is intended for internal use.
|
inline |
Number of elements in the PeriodicTable.
|
inline |
Get the element with the given atomic number.
z | the atomic number of the element to get. |
|
inline |
Get the element with the given name or symbol.
name | the name or symbol of the element to get. |
|
friend |
Friendship allows for access to a single PeriodicTable instance.
|
friend |
Friendship allws for testing implementation.