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::ChargeUnit Class Reference

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

#include <KIM_ChargeUnit.hpp>

Public Member Functions

 ChargeUnit ()
 Create an uninitialized ChargeUnit object. More...
 
 ChargeUnit (int const id)
 Create a ChargeUnit object with the specified id. More...
 
 ChargeUnit (std::string const &str)
 Create a ChargeUnit 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== (ChargeUnit const &rhs) const
 Compares ChargeUnit objects for equality. More...
 
bool operator!= (ChargeUnit const &rhs) const
 Compares ChargeUnit objects for inequality. More...
 
std::string const & ToString () const
 Converts the object to a string. More...
 

Public Attributes

int chargeUnitID
 Integer identifying the specific ChargeUnit represented. More...
 

Detailed Description

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

The enumeration constants are contained in the CHARGE_UNIT namespace.

See also
KIM_ChargeUnit, kim_charge_unit_module
Since
2.0

Definition at line 46 of file KIM_ChargeUnit.hpp.

Constructor & Destructor Documentation

◆ ChargeUnit() [1/3]

KIM::ChargeUnit::ChargeUnit ( )

Create an uninitialized ChargeUnit object.

Since
2.0

◆ ChargeUnit() [2/3]

KIM::ChargeUnit::ChargeUnit ( int const  id)

Create a ChargeUnit object with the specified id.

Note
This should not be used directly.
Since
2.0

◆ ChargeUnit() [3/3]

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

Create a ChargeUnit 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_ChargeUnit_FromString, kim_charge_unit_module::kim_from_string
Since
2.0

Member Function Documentation

◆ Known()

bool KIM::ChargeUnit::Known ( ) const

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

ChargeUnit's known to the KIM API are found in the CHARGE_UNIT namespace.

See also
KIM_ChargeUnit_Known, kim_charge_unit_module::kim_known
Since
2.0

◆ operator!=()

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

Compares ChargeUnit objects for inequality.

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

◆ operator==()

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

Compares ChargeUnit objects for equality.

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

◆ ToString()

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

Converts the object to a string.

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

Member Data Documentation

◆ chargeUnitID

int KIM::ChargeUnit::chargeUnitID

Integer identifying the specific ChargeUnit represented.

Note
This should not be directly accessed and is only public for cross-language reasons.
See also
KIM_ChargeUnit::chargeUnitID, kim_charge_unit_module::kim_charge_unit_type::charge_unit_id
Since
2.0

Definition at line 58 of file KIM_ChargeUnit.hpp.


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