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

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

#include <KIM_ModelWriteParameterizedModel.hpp>

Public Member Functions

void GetPath (std::string const **const path) const
 Get the directory path where the parameterized model files should be written. More...
 
void GetModelName (std::string const **const modelName) const
 Get the name of the new parameterized model. More...
 
void SetParameterFileName (std::string const &fileName) const
 Set the file name for the next parameter file. 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::WriteParameterizedModel routine.

See also
KIM_ModelWriteParameterizedModel, kim_model_write_parameterized_model_module::kim_model_write_parameterized_model_handle_type
Since
2.0

Definition at line 52 of file KIM_ModelWriteParameterizedModel.hpp.

Member Function Documentation

◆ GetModelBufferPointer()

void KIM::ModelWriteParameterizedModel::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_ModelWriteParameterizedModel_GetModelBufferPointer, kim_model_write_parameterized_model_module::kim_get_model_buffer_pointer
Since
2.0

◆ GetModelName()

void KIM::ModelWriteParameterizedModel::GetModelName ( std::string const **const  modelName) const

Get the name of the new parameterized model.

The model name is a valid C identifier and is available as a convenience. It is not required for the model to use this name in any way.

Parameters
[out]modelNameThe parameterized model name.
See also
KIM_ModelWriteParameterizedModel_GetModelName, kim_model_write_parameterized_model_module::kim_get_model_name
Since
2.0

◆ GetPath()

void KIM::ModelWriteParameterizedModel::GetPath ( std::string const **const  path) const

Get the directory path where the parameterized model files should be written.

Parameters
[out]pathPath string.
See also
KIM_ModelWriteParameterizedModel_GetPath, kim_model_write_parameterized_model_module::kim_get_path
Since
2.0

◆ LogEntry() [1/2]

void KIM::ModelWriteParameterizedModel::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_ModelWriteParameterizedModel_LogEntry, kim_model_write_parameterized_model_module::kim_log_entry
Since
2.0

◆ LogEntry() [2/2]

void KIM::ModelWriteParameterizedModel::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.

◆ SetParameterFileName()

void KIM::ModelWriteParameterizedModel::SetParameterFileName ( std::string const &  fileName) const

Set the file name for the next parameter file.

This routine must be called once for each parameter file. The order of these calls is important and determines the order in which the parameter files will be listed in the automatically generated CMakeLists.txt file.

Parameters
[in]fileNameFile name (basename and extension, without path).
See also
KIM_ModelWriteParameterizedModel_SetParameterFileName, kim_model_write_parameterized_model_module::kim_set_parameter_file_name
Since
2.0

◆ ToString()

std::string const& KIM::ModelWriteParameterizedModel::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_ModelWriteParameterizedModel_ToString, kim_model_write_parameterized_model_module::kim_to_string
Since
2.0

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