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

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

#include <KIM_Collection.hpp>

Public Member Functions

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

Public Attributes

int collectionID
 Integer identifying the specific Collection represented. More...
 

Detailed Description

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

The enumeration constants are contained in the COLLECTION namespace.

See also
KIM_Collection, kim_collection_module::kim_collection_type
Since
2.1

Definition at line 46 of file KIM_Collection.hpp.

Constructor & Destructor Documentation

◆ Collection() [1/3]

KIM::Collection::Collection ( )

Create an uninitialized Collection object.

Since
2.1

◆ Collection() [2/3]

KIM::Collection::Collection ( int const  id)

Create a Collection object with the specified id.

Note
This should not be used directly.
Since
2.1

◆ Collection() [3/3]

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

Create a Collection 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_Collection_FromString, kim_collection_module::kim_from_string
Since
2.1

Member Function Documentation

◆ Known()

bool KIM::Collection::Known ( ) const

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

Collection's known to the KIM API are found in the COLLECTION namespace.

See also
KIM_Collection_Known, kim_collection_module::kim_known
Since
2.1

◆ operator!=()

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

Compares Collection objects for inequality.

Note
It is possible for two "unknown" objects to be not equal.
See also
KIM_Collection_NotEqual, kim_collection_module::operator(.ne.)
Since
2.1

◆ operator==()

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

Compares Collection objects for equality.

Note
Not all "unknown" objects are equal.
See also
KIM_Collection_Equal, kim_collection_module::operator(.eq.)
Since
2.1

◆ ToString()

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

Converts the object to a string.

Returns
A string object representing the Collection object.
Note
If the Collection object does not correspond to a value defined by the KIM API, then the string "unknown" is returned.
See also
KIM_Collection_ToString, kim_collection_module::kim_to_string
Since
2.1

Member Data Documentation

◆ collectionID

int KIM::Collection::collectionID

Integer identifying the specific Collection represented.

Note
This should not be directly accessed and is only public for cross-language reasons.
See also
KIM_Collection::collectionID, kim_collection_module::kim_collection_type::collection_id
Since
2.1

Definition at line 58 of file KIM_Collection.hpp.


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