SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
XMLOperation.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 #ifndef smtk_operation_XMLOperation_h
11 #define smtk_operation_XMLOperation_h
12 
13 #include "smtk/operation/Operation.h"
14 
15 namespace smtk
16 {
17 namespace operation
18 {
19 
23 class SMTKCORE_EXPORT XMLOperation : public smtk::operation::Operation
24 {
25 public:
28 
29  ~XMLOperation() override;
30 
31 protected:
32  XMLOperation();
33 
34  // Perform the actual operation and construct the result.
35  Result operateInternal() override = 0;
36 
37  // Construct the operation's specification from the class's XML description.
38  Specification createSpecification() override;
39 
40 private:
41  // Access a block of text representing the XML description of the operation.
42  virtual const char* xmlDescription() const = 0;
43 };
44 } // namespace operation
45 } // namespace smtk
46 
47 #endif // smtk_operation_XMLOperation_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::operation::XMLOperation
A specialization of smtk::operation::Operation for operations whose specifications are defined by an ...
Definition: XMLOperation.h:23
smtkSharedFromThisMacro
#define smtkSharedFromThisMacro(...)
A macro to help with derived classes whose bases enable shared_from_this().
Definition: SharedFromThis.h:190
smtk::operation::Operation
Operation is a base class for all SMTK operations.
Definition: Operation.h:47
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51