SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Delete.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_model_Delete_h
11 #define smtk_model_Delete_h
12 
13 #include "smtk/operation/XMLOperation.h"
14 
15 #include "smtk/model/EntityRef.h"
16 
17 namespace smtk
18 {
19 namespace model
20 {
21 
30 class SMTKCORE_EXPORT Delete : public smtk::operation::XMLOperation
31 {
32 public:
36  smtkSuperclassMacro(Operation);
37 
38 protected:
39  Result operateInternal() override;
40  const char* xmlDescription() const override;
41 
42  template<typename U, typename V, typename W, typename X>
43  bool checkAndAddBoundingCells(
44  const smtk::model::EntityRef& ent,
45  bool deleteBoundingCells,
46  U& verts,
47  V& edges,
48  W& faces,
49  X& other);
50  template<typename U, typename V, typename W, typename X>
51  void addBoundaryCells(const smtk::model::EntityRef& ent, U& verts, V& edges, W& faces, X& other);
52 
53  int m_numInUse;
54  int m_numWarnings;
55  smtk::model::EntityRefs m_notRemoved;
56  smtk::model::EntityRefs m_modified;
57  smtk::model::EntityArray m_expunged;
58 };
59 
60 } //namespace model
61 } // namespace smtk
62 
63 #endif // smtk_model_Delete_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::model::Delete
Delete an entity from a model resource.
Definition: Delete.h:30
smtk::operation::XMLOperation
A specialization of smtk::operation::Operation for operations whose specifications are defined by an ...
Definition: XMLOperation.h:23
EntityRef.h
smtkCreateMacro
#define smtkCreateMacro(...)
Add static create() methods to a class.
Definition: SharedFromThis.h:113
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:51
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51
smtk::model::EntityArray
std::vector< smtk::model::EntityPtr > EntityArray
Definition: PublicPointerDefs.h:427
smtkSuperclassMacro
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:87
smtk::model::EntityRefs
std::set< smtk::model::EntityRef > EntityRefs
Definition: PublicPointerDefs.h:162
smtk::model::EntityRef
A lightweight entityref pointing to a model entity's resource.
Definition: EntityRef.h:112