kim-api  2.2.1+v2.2.1.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ComputeArguments.hpp
Go to the documentation of this file.
1 //
2 // CDDL HEADER START
3 //
4 // The contents of this file are subject to the terms of the Common Development
5 // and Distribution License Version 3.0 (the "License").
6 //
7 // You can obtain a copy of the license at
8 // http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 // specific language governing permissions and limitations under the License.
10 //
11 // When distributing Covered Code, include this CDDL HEADER in each file and
12 // include the License file in a prominent location with the name LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2020, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api-2.2.1 package.
31 //
32 
33 
34 #ifndef KIM_COMPUTE_ARGUMENTS_HPP_
35 #define KIM_COMPUTE_ARGUMENTS_HPP_
36 
37 #include <string>
38 
39 #ifndef KIM_FUNCTION_TYPES_HPP_
40 #include "KIM_FunctionTypes.hpp" // IWYU pragma: export
41 #endif
42 
43 namespace KIM
44 {
45 // Forward declarations
46 class LogVerbosity;
47 class LanguageName;
48 class ComputeArgumentName;
49 class ComputeCallbackName;
50 class SupportStatus;
51 class ComputeArgumentsImplementation;
52 
53 
62 {
63  public:
76  int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName,
77  SupportStatus * const supportStatus) const;
78 
91  int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName,
92  SupportStatus * const supportStatus) const;
93 
112  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
113  int const * const ptr);
114 
116  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
117  int * const ptr);
118 
120  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
121  double const * const ptr);
122 
124  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
125  double * const ptr);
126 
146  int SetCallbackPointer(ComputeCallbackName const computeCallbackName,
147  LanguageName const languageName,
148  Function * const fptr,
149  void * const dataObject);
150 
162  void AreAllRequiredArgumentsAndCallbacksPresent(int * const result) const;
163 
176  void SetSimulatorBufferPointer(void * const ptr);
177 
178 
191  void GetSimulatorBufferPointer(void ** const ptr) const;
192 
204  std::string const & ToString() const;
205 
216  void SetLogID(std::string const & logID);
217 
227  void PushLogVerbosity(LogVerbosity const logVerbosity);
228 
236  void PopLogVerbosity();
237 
244  friend class ModelImplementation;
245 
246  private:
247  // do not allow copy constructor or operator=
249  void operator=(ComputeArguments const &);
250 
252  ~ComputeArguments();
253 
254  ComputeArgumentsImplementation * pimpl;
255 }; // class ComputeArguments
256 } // namespace KIM
257 
258 #endif // KIM_COMPUTE_ARGUMENTS_HPP_
int SetArgumentPointer(ComputeArgumentName const computeArgumentName, int const *const ptr)
Set the data pointer for a ComputeArgumentName.
void SetSimulatorBufferPointer(void *const ptr)
Set the Simulator&#39;s buffer pointer within the ComputeArguments object.
void AreAllRequiredArgumentsAndCallbacksPresent(int *const result) const
Determine if non-NULL pointers have been set for all ComputeArgumentName&#39;s and ComputeCallbackName&#39;s ...
std::string const & ToString() const
Get a string representing the internal state of the ComputeArguments object.
An Extensible Enumeration for the ComputeCallbackName&#39;s supported by the KIM API. ...
void PushLogVerbosity(LogVerbosity const logVerbosity)
Push a new LogVerbosity onto the ComputeArguments object&#39;s Log object verbosity stack.
void() Function(void)
Generic function type.
An Extensible Enumeration for the SupportStatus&#39;s supported by the KIM API.
int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName, SupportStatus *const supportStatus) const
Get the SupportStatus of a ComputeCallbackName.
An Extensible Enumeration for the LogVerbosity&#39;s supported by the KIM API.
An Extensible Enumeration for the LanguageName&#39;s supported by the KIM API.
friend class ModelImplementation
Allows Model objects to directly access private member data of a ComputeArguments object...
int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName, SupportStatus *const supportStatus) const
Get the SupportStatus of a ComputeArgumentName.
void PopLogVerbosity()
Pop a LogVerbosity from the ComputeArguments object&#39;s Log object verbosity stack. ...
An Extensible Enumeration for the ComputeArgumentName&#39;s supported by the KIM API. ...
Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simula...
void GetSimulatorBufferPointer(void **const ptr) const
Get the Simulator&#39;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.
void SetLogID(std::string const &logID)
Set the identity of the Log object associated with the ComputeArguments object.