kim-api  2.1.4-git+v2.1.3-git-1-g7847914a.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Public Member Functions | List of all members
KIM::ModelExtension Class Reference

Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Extension routine. More...

#include <KIM_ModelExtension.hpp>

Public Member Functions

void GetExtensionID (std::string const **const extensionID) const
 Get the extension identification string. More...
 
KIM::ModelModel ()
 Convert the ModelExtension interface to the Model object to a Model interface. More...
 
KIM::ModelComputeModelCompute ()
 Convert the ModelExtension interface to the Model object to a ModelCompute interface. More...
 
KIM::ModelCreateModelCreate ()
 Convert the ModelExtension interface to the Model object to a ModelCreate interface. More...
 
KIM::ModelDestroyModelDestroy ()
 Convert the ModelExtension interface to the Model object to a ModelDestroy interface. More...
 
KIM::ModelDriverCreateModelDriverCreate ()
 Convert the ModelExtension interface to the Model object to a ModelDriverCreate interface. More...
 
KIM::ModelRefreshModelRefresh ()
 Convert the ModelExtension interface to the Model object to a ModelRefresh interface. More...
 
KIM::ModelWriteParameterizedModelModelWriteParameterizedModel ()
 Convert the ModelExtension interface to the Model object to a ModelWriteParameterizedModel interface. More...
 
KIM::ModelComputeArgumentsModelComputeArguments (ComputeArguments *const computeArguments) const
 Convert the ModelExtension interface to the Model object to a ModelComputeArguments interface. More...
 
KIM::ModelComputeArgumentsCreateModelComputeArgumentsCreate (ComputeArguments *const computeArguments) const
 Convert the ModelExtension interface to the Model object to a ModelComputeArgumentsCreate interface. More...
 
KIM::ModelComputeArgumentsDestroyModelComputeArgumentsDestroy (ComputeArguments *const computeArguments) const
 Convert the ModelExtension interface to the Model object to a ModelComputeArgumentsDestroy interface. More...
 
void GetModelBufferPointer (void **const ptr) const
 Get the Model's buffer pointer within the Model object. More...
 
void LogEntry (LogVerbosity const logVerbosity, std::string const &message, int const lineNumber, std::string const &fileName) const
 Write a log entry into the log file. More...
 
void LogEntry (LogVerbosity const logVerbosity, std::stringstream const &message, int const lineNumber, std::string const &fileName) const
 
std::string const & ToString () const
 Get a string representing the internal state of the Model object. More...
 

Detailed Description

Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Extension routine.

See also
KIM_ModelExtension, kim_model_extension_module::kim_model_extension_handle_type
Since
2.0

Definition at line 65 of file KIM_ModelExtension.hpp.

Member Function Documentation

◆ GetExtensionID()

void KIM::ModelExtension::GetExtensionID ( std::string const **const  extensionID) const

Get the extension identification string.

Parameters
[out]extensionIDThe extension identification string.
See also
KIM_ModelExtension_GetExtensionID, kim_model_extension_module::kim_get_extension_id
Since
2.0

◆ GetModelBufferPointer()

void KIM::ModelExtension::GetModelBufferPointer ( void **const  ptr) const

Get the Model's buffer pointer within the Model object.

The model buffer pointer may be used by the Model to associate a memory buffer with the Model object.

Parameters
[out]ptrThe model buffer data pointer.
Note
ptr == NULL if the model has not previously called ModelCreate::SetModelBufferPointer or ModelDriverCreate::SetModelBufferPointer.
See also
KIM_ModelExtension_GetModelBufferPointer, kim_model_extension_module::kim_get_model_buffer_pointer
Since
2.0

◆ LogEntry() [1/2]

void KIM::ModelExtension::LogEntry ( LogVerbosity const  logVerbosity,
std::string const &  message,
int const  lineNumber,
std::string const &  fileName 
) const

Write a log entry into the log file.

This results in a no-op if logVerbosity is LOG_VERBOSITY::silent or if logVerbosity is greater-than the Log object's top LogVerbosity on its stack.

Parameters
[in]logVerbosityThe LogVerbosity level for the entry.
[in]messageThe body text of the log entry.
[in]lineNumberThe source code file line number.
[in]fileNameThe source code file name.
See also
KIM_ModelExtension_LogEntry, kim_model_extension_module::kim_log_entry
Since
2.0

◆ LogEntry() [2/2]

void KIM::ModelExtension::LogEntry ( LogVerbosity const  logVerbosity,
std::stringstream const &  message,
int const  lineNumber,
std::string const &  fileName 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Model()

KIM::Model* KIM::ModelExtension::Model ( )

Convert the ModelExtension interface to the Model object to a Model interface.

See also
KIM_ModelExtension_ToModel, kim_model_extension_module::kim_to_model
Since
2.0

◆ ModelCompute()

KIM::ModelCompute* KIM::ModelExtension::ModelCompute ( )

Convert the ModelExtension interface to the Model object to a ModelCompute interface.

See also
KIM_ModelExtension_ToModelCompute, kim_model_extension_module::kim_to_model_compute
Since
2.0

◆ ModelComputeArguments()

KIM::ModelComputeArguments* KIM::ModelExtension::ModelComputeArguments ( ComputeArguments *const  computeArguments) const

Convert the ModelExtension interface to the Model object to a ModelComputeArguments interface.

See also
KIM_ModelExtension_ToModelComputeArguments, kim_model_extension_module::kim_to_model_compute_arguments
Since
2.0

◆ ModelComputeArgumentsCreate()

KIM::ModelComputeArgumentsCreate* KIM::ModelExtension::ModelComputeArgumentsCreate ( ComputeArguments *const  computeArguments) const

Convert the ModelExtension interface to the Model object to a ModelComputeArgumentsCreate interface.

See also
KIM_ModelExtension_ToModelComputeArgumentsCreate, kim_model_extension_module::kim_to_model_compute_arguments_create
Since
2.0

◆ ModelComputeArgumentsDestroy()

KIM::ModelComputeArgumentsDestroy* KIM::ModelExtension::ModelComputeArgumentsDestroy ( ComputeArguments *const  computeArguments) const

Convert the ModelExtension interface to the Model object to a ModelComputeArgumentsDestroy interface.

See also
KIM_ModelExtension_ToModelComputeArgumentsDestroy, kim_model_extension_module::kim_to_model_compute_arguments_destroy
Since
2.0

◆ ModelCreate()

KIM::ModelCreate* KIM::ModelExtension::ModelCreate ( )

Convert the ModelExtension interface to the Model object to a ModelCreate interface.

See also
KIM_ModelExtension_ToModelCreate, kim_model_extension_module::kim_to_model_create
Since
2.0

◆ ModelDestroy()

KIM::ModelDestroy* KIM::ModelExtension::ModelDestroy ( )

Convert the ModelExtension interface to the Model object to a ModelDestroy interface.

See also
KIM_ModelExtension_ToModelDestroy, kim_model_extension_module::kim_to_model_destroy
Since
2.0

◆ ModelDriverCreate()

KIM::ModelDriverCreate* KIM::ModelExtension::ModelDriverCreate ( )

Convert the ModelExtension interface to the Model object to a ModelDriverCreate interface.

See also
KIM_ModelExtension_ToModelDriverCreate, kim_model_extension_module::kim_to_model_driver_create
Since
2.0

◆ ModelRefresh()

KIM::ModelRefresh* KIM::ModelExtension::ModelRefresh ( )

Convert the ModelExtension interface to the Model object to a ModelRefresh interface.

See also
KIM_ModelExtension_ToModelRefresh, kim_model_extension_module::kim_to_model_refresh
Since
2.0

◆ ModelWriteParameterizedModel()

KIM::ModelWriteParameterizedModel* KIM::ModelExtension::ModelWriteParameterizedModel ( )

Convert the ModelExtension interface to the Model object to a ModelWriteParameterizedModel interface.

See also
KIM_ModelExtension_ToModelWriteParameterizedModel, kim_model_extension_module::kim_to_model_write_parameterized_model
Since
2.0

◆ ToString()

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

Get a string representing the internal state of the Model object.

This string is primarily meant for use as a debugging tool. The string may be quite long. It begins and ends with lines consisting only of ='s.

See also
KIM_ModelExtension_ToString, kim_model_extension_module::kim_to_string
Since
2.0

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