Viskores  1.0
FunctorBase.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_exec_FunctorBase_h
19 #define viskores_exec_FunctorBase_h
20 
21 #include <viskores/Types.h>
22 
24 
26 
27 namespace viskores
28 {
29 namespace exec
30 {
31 
38 class VISKORES_ALWAYS_EXPORT FunctorBase
39 {
40 public:
43 
45  void RaiseError(const char* message) const { this->ErrorMessage.RaiseError(message); }
46 
52  void SetErrorMessageBuffer(const viskores::exec::internal::ErrorMessageBuffer& buffer)
53  {
54  this->ErrorMessage = buffer;
55  }
56 
57 private:
58  viskores::exec::internal::ErrorMessageBuffer ErrorMessage;
59 };
60 }
61 } // namespace viskores::exec
62 
63 #endif //viskores_exec_FunctorBase_h
viskores::exec::FunctorBase::ErrorMessage
viskores::exec::internal::ErrorMessageBuffer ErrorMessage
Definition: FunctorBase.h:58
viskores::exec::FunctorBase
Base class for all user worklets invoked in the execution environment from a call to viskores::cont::...
Definition: FunctorBase.h:38
Types.h
VISKORES_EXEC_CONT
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
ErrorMessageBuffer.h
viskores::exec::FunctorBase::SetErrorMessageBuffer
void SetErrorMessageBuffer(const viskores::exec::internal::ErrorMessageBuffer &buffer)
Set the error message buffer so that running algorithms can report errors.
Definition: FunctorBase.h:52
viskores::exec::FunctorBase::FunctorBase
FunctorBase()
Definition: FunctorBase.h:42
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59
viskores::exec::FunctorBase::RaiseError
void RaiseError(const char *message) const
Definition: FunctorBase.h:45
viskores_cont_export.h