kim-api  2.1.2+v2.1.2.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--2019, 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.1.2 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 ModelImplementation;
52 class ComputeArgumentsImplementation;
53 
54 
63 {
64  public:
77  int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName,
78  SupportStatus * const supportStatus) const;
79 
92  int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName,
93  SupportStatus * const supportStatus) const;
94 
113  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
114  int const * const ptr);
115 
117  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
118  int * const ptr);
119 
121  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
122  double const * const ptr);
123 
125  int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
126  double * const ptr);
127 
147  int SetCallbackPointer(ComputeCallbackName const computeCallbackName,
148  LanguageName const languageName,
149  Function * const fptr,
150  void * const dataObject);
151 
163  void AreAllRequiredArgumentsAndCallbacksPresent(int * const result) const;
164 
177  void SetSimulatorBufferPointer(void * const ptr);
178 
179 
192  void GetSimulatorBufferPointer(void ** const ptr) const;
193 
205  std::string const & ToString() const;
206 
217  void SetLogID(std::string const & logID);
218 
228  void PushLogVerbosity(LogVerbosity const logVerbosity);
229 
237  void PopLogVerbosity();
238 
245  friend class ModelImplementation;
246 
247  private:
248  // do not allow copy constructor or operator=
250  void operator=(ComputeArguments const &);
251 
253  ~ComputeArguments();
254 
255  ComputeArgumentsImplementation * pimpl;
256 }; // class ComputeArguments
257 } // namespace KIM
258 
259 #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.