kim-api 2.3.0+AppleClang.AppleClang.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Loading...
Searching...
No Matches
KIM_ComputeArguments.hpp
Go to the documentation of this file.
1//
2// KIM-API: An API for interatomic models
3// Copyright (c) 2013--2022, Regents of the University of Minnesota.
4// All rights reserved.
5//
6// Contributors:
7// Ryan S. Elliott
8//
9// SPDX-License-Identifier: LGPL-2.1-or-later
10//
11// This library is free software; you can redistribute it and/or
12// modify it under the terms of the GNU Lesser General Public
13// License as published by the Free Software Foundation; either
14// version 2.1 of the License, or (at your option) any later version.
15//
16// This library is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19// Lesser General Public License for more details.
20//
21// You should have received a copy of the GNU Lesser General Public License
22// along with this library; if not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24//
25
26//
27// Release: This file is part of the kim-api-2.3.0 package.
28//
29
30
31#ifndef KIM_COMPUTE_ARGUMENTS_HPP_
32#define KIM_COMPUTE_ARGUMENTS_HPP_
33
34#include <string>
35
36#ifndef KIM_FUNCTION_TYPES_HPP_
37#include "KIM_FunctionTypes.hpp" // IWYU pragma: export
38#endif
39
40namespace KIM
41{
42// Forward declarations
43class LogVerbosity;
44class LanguageName;
45class ComputeArgumentName;
46class ComputeCallbackName;
47class SupportStatus;
48class ComputeArgumentsImplementation;
49
50
59{
60 public:
73 int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName,
74 SupportStatus * const supportStatus) const;
75
88 int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName,
89 SupportStatus * const supportStatus) const;
90
109 int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
110 int const * const ptr);
111
113 int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
114 int * const ptr);
115
117 int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
118 double const * const ptr);
119
121 int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
122 double * const ptr);
123
143 int SetCallbackPointer(ComputeCallbackName const computeCallbackName,
144 LanguageName const languageName,
145 Function * const fptr,
146 void * const dataObject);
147
159 void AreAllRequiredArgumentsAndCallbacksPresent(int * const result) const;
160
173 void SetSimulatorBufferPointer(void * const ptr);
174
175
188 void GetSimulatorBufferPointer(void ** const ptr) const;
189
201 std::string const & ToString() const;
202
213 void SetLogID(std::string const & logID);
214
224 void PushLogVerbosity(LogVerbosity const logVerbosity);
225
234
242
243 private:
244 // do not allow copy constructor or operator=
246 void operator=(ComputeArguments const &);
247
250
251 ComputeArgumentsImplementation * pimpl;
252}; // class ComputeArguments
253} // namespace KIM
254
255#endif // KIM_COMPUTE_ARGUMENTS_HPP_
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simula...
int SetArgumentPointer(ComputeArgumentName const computeArgumentName, int const *const ptr)
Set the data pointer for a ComputeArgumentName.
void PushLogVerbosity(LogVerbosity const logVerbosity)
Push a new LogVerbosity onto the ComputeArguments object's Log object verbosity stack.
int SetArgumentPointer(ComputeArgumentName const computeArgumentName, double const *const ptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int SetArgumentPointer(ComputeArgumentName const computeArgumentName, double *const ptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void PopLogVerbosity()
Pop a LogVerbosity from the ComputeArguments object's Log object verbosity stack.
int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName, SupportStatus *const supportStatus) const
Get the SupportStatus of a ComputeCallbackName.
void AreAllRequiredArgumentsAndCallbacksPresent(int *const result) const
Determine if non-NULL pointers have been set for all ComputeArgumentName's and ComputeCallbackName's ...
friend class ModelImplementation
Allows Model objects to directly access private member data of a ComputeArguments object.
int SetArgumentPointer(ComputeArgumentName const computeArgumentName, int *const ptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void GetSimulatorBufferPointer(void **const ptr) const
Get the Simulator's buffer pointer from the ComputeArguments object.
int SetCallbackPointer(ComputeCallbackName const computeCallbackName, LanguageName const languageName, Function *const fptr, void *const dataObject)
Set the function pointer for a ComputeCallbackName.
std::string const & ToString() const
Get a string representing the internal state of the ComputeArguments object.
void SetSimulatorBufferPointer(void *const ptr)
Set the Simulator's buffer pointer within the ComputeArguments object.
void SetLogID(std::string const &logID)
Set the identity of the Log object associated with the ComputeArguments object.
int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName, SupportStatus *const supportStatus) const
Get the SupportStatus of a ComputeArgumentName.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.
An Extensible Enumeration for the LanguageName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
An Extensible Enumeration for the SupportStatus's supported by the KIM API.
void() Function(void)
Generic function type.