kim-api  2.3.0+v2.3.0.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Public Member Functions | Public Attributes | List of all members
KIM::SpeciesName Class Reference

An Extensible Enumeration for the SpeciesName's supported by the KIM API. More...

#include <KIM_SpeciesName.hpp>

Public Member Functions

 SpeciesName ()
 Create an uninitialized SpeciesName object. More...
 
 SpeciesName (int const id)
 Create a SpeciesName object with the specified id. More...
 
 SpeciesName (std::string const &str)
 Create a SpeciesName object corresponding to the provided string. If the string does not match one of the values defined by the KIM API, then an "unknown" object is generated. More...
 
bool Known () const
 Determines if the object is a quantity known to the KIM API. More...
 
bool operator== (SpeciesName const &rhs) const
 Compares SpeciesName objects for equality. More...
 
bool operator!= (SpeciesName const &rhs) const
 Compares SpeciesName objects for inequality. More...
 
std::string const & ToString () const
 Converts the object to a string. More...
 

Public Attributes

int speciesNameID
 Integer identifying the specific SpeciesName represented. More...
 

Detailed Description

An Extensible Enumeration for the SpeciesName's supported by the KIM API.

The enumeration constants are contained in the SPECIES_NAME namespace.

See also
KIM_SpeciesName, kim_species_name_module::kim_species_name_type
Since
2.0

Definition at line 46 of file KIM_SpeciesName.hpp.

Constructor & Destructor Documentation

◆ SpeciesName() [1/3]

KIM::SpeciesName::SpeciesName ( )

Create an uninitialized SpeciesName object.

Since
2.0

◆ SpeciesName() [2/3]

KIM::SpeciesName::SpeciesName ( int const  id)

Create a SpeciesName object with the specified id.

Note
This should not be used directly.
Since
2.0

◆ SpeciesName() [3/3]

KIM::SpeciesName::SpeciesName ( std::string const &  str)

Create a SpeciesName object corresponding to the provided string. If the string does not match one of the values defined by the KIM API, then an "unknown" object is generated.

See also
KIM_SpeciesName_FromString, kim_species_name_module::kim_from_string
Since
2.0

Member Function Documentation

◆ Known()

bool KIM::SpeciesName::Known ( ) const

Determines if the object is a quantity known to the KIM API.

SpeciesName's known to the KIM API are found in the SPECIES_NAME namespace.

See also
KIM_SpeciesName_Known, kim_species_name_module::kim_known
Since
2.0

◆ operator!=()

bool KIM::SpeciesName::operator!= ( SpeciesName const &  rhs) const

Compares SpeciesName objects for inequality.

Note
It is possible for two "unknown" objects to be not equal.
See also
KIM_SpeciesName_NotEqual, kim_species_name_module::operator(.ne.)
Since
2.0

◆ operator==()

bool KIM::SpeciesName::operator== ( SpeciesName const &  rhs) const

Compares SpeciesName objects for equality.

Note
Not all "unknown" objects are equal.
See also
KIM_SpeciesName_Equal, kim_species_name_module::operator(.eq.)
Since
2.0

◆ ToString()

std::string const& KIM::SpeciesName::ToString ( ) const

Converts the object to a string.

Returns
A string object representing the SpeciesName object.
Note
If the SpeciesName object does not correspond to a value defined by the KIM API, then the string "unknown" is returned.
See also
KIM_SpeciesName_ToString, kim_species_name_module::kim_to_string
Since
2.0

Member Data Documentation

◆ speciesNameID

int KIM::SpeciesName::speciesNameID

Integer identifying the specific SpeciesName represented.

Note
This should not be directly accessed and is only public for cross-language reasons.
See also
KIM_SpeciesName::speciesNameID, kim_species_name_module::kim_species_name_type::species_name_id
Since
2.0

Definition at line 58 of file KIM_SpeciesName.hpp.


The documentation for this class was generated from the following file: