SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smtk::model::Delete Class Reference

Delete an entity from a model resource. More...

#include <Delete.h>

Inheritance diagram for smtk::model::Delete:
[legend]
Collaboration diagram for smtk::model::Delete:
[legend]

Public Member Functions

 smtkTypeMacro (smtk::model::Delete)
 
 smtkCreateMacro (Delete)
 
 smtkSharedFromThisMacro (smtk::operation::Operation)
 
 smtkSuperclassMacro (Operation)
 
- Public Member Functions inherited from smtk::operation::XMLOperation
 smtkTypeMacro (XMLOperation)
 
 smtkSharedFromThisMacro (smtk::operation::Operation)
 
- Public Member Functions inherited from smtk::operation::Operation
 smtkTypeMacroBase (smtk::operation::Operation)
 
virtual Index index () const
 
virtual bool configure (const smtk::attribute::AttributePtr &changedAttribute=smtk::attribute::AttributePtr(), const smtk::attribute::ItemPtr &changedItem=smtk::attribute::ItemPtr())
 Update the operation's specification and operations to be consistent. More...
 
virtual bool ableToOperate ()
 Check if the operation's attribute resource is valid. More...
 
Result operate ()
 Execute the operation, log its outcome and return its results. More...
 
virtual smtk::io::Loggerlog () const
 Retrieve the operation's logger. More...
 
Specification specification ()
 This accessor facilitates the lazy construction of the specification, allowing for derived implementations of its creation. More...
 
Parameters parameters ()
 Access the operation's input parameters, constructing them if necessary. More...
 
Parameters parameters () const
 
Result createResult (Outcome)
 Create an attribute representing this operation's result type. More...
 
ManagerPtr manager () const
 Operations that are managed have a non-null pointer to their manager.
 
bool restoreTrace (const std::string &trace)
 restore operation parameters from the trace of a previously run operation.
 
void setManagers (const std::shared_ptr< smtk::common::Managers > &m)
 Operations may be passed application state in the form of a Managers type-container.
 
std::shared_ptr< smtk::common::Managersmanagers () const
 
virtual bool threadSafe () const
 Is this type of operation safe to launch in a thread?
 
smtk::resource::ManagerPtr resourceManager ()
 retrieve the resource manager, if available.
 
Result operate (Key)
 

Protected Member Functions

Result operateInternal () override
 
const char * xmlDescription () const override
 
template<typename U , typename V , typename W , typename X >
bool checkAndAddBoundingCells (const smtk::model::EntityRef &ent, bool deleteBoundingCells, U &verts, V &edges, W &faces, X &other)
 Either add boundings cells or log messages. More...
 
template<typename U , typename V , typename W , typename X >
void addBoundaryCells (const smtk::model::EntityRef &ent, U &verts, V &edges, W &faces, X &other)
 given an entity, add corresponding boundary cells For each given entity, if its lower-dimensional entity is not associated by any remaining entities, then this lower-dimensional entity would be deleted
 
- Protected Member Functions inherited from smtk::operation::XMLOperation
Specification createSpecification () override
 
- Protected Member Functions inherited from smtk::operation::Operation
virtual void postProcessResult (Result &)
 
virtual void markModifiedResources (Result &)
 
virtual bool unmanageResources (Result &)
 
virtual void generateSummary (Result &)
 
Specification createBaseSpecification () const
 

Protected Attributes

int m_numInUse
 
int m_numWarnings
 
smtk::model::EntityRefs m_notRemoved
 
smtk::model::EntityRefs m_modified
 
smtk::model::EntityArray m_expunged
 
- Protected Attributes inherited from smtk::operation::Operation
int m_debugLevel { 0 }
 
std::weak_ptr< Managerm_manager
 
std::shared_ptr< smtk::common::Managersm_managers
 

Additional Inherited Members

- Public Types inherited from smtk::operation::Operation
enum  Outcome {
  Outcome::UNABLE_TO_OPERATE, Outcome::CANCELED, Outcome::FAILED, Outcome::SUCCEEDED,
  Outcome::UNKNOWN = -1
}
 
typedef std::size_t Index
 
typedef std::shared_ptr< smtk::attribute::AttributeParameters
 
typedef std::shared_ptr< smtk::attribute::AttributeResult
 
typedef std::shared_ptr< smtk::attribute::ResourceSpecification
 
typedef std::shared_ptr< smtk::attribute::DefinitionDefinition
 
- Public Attributes inherited from smtk::operation::Operation
friend Manager
 
friend ImportPythonOperation
 

Detailed Description

Delete an entity from a model resource.

This operation is not generally what you should use; it only deletes SMTK entities and does nothing with native modeling kernels. Instead, you should prefer the delete operation provided with the model session you are using.

Member Function Documentation

◆ checkAndAddBoundingCells()

template<typename U , typename V , typename W , typename X >
bool smtk::model::Delete::checkAndAddBoundingCells ( const smtk::model::EntityRef ent,
bool  deleteBoundingCells,
U &  verts,
V &  edges,
W &  faces,
X &  other 
)
protected

Either add boundings cells or log messages.

If deleteBoundingCells is true, then for each cell in entities, add any dependents to verts, edges, or auxiliary geometry. If deleteBoundingCells is false, add a log message for the first umpteen entries in entities that have dependents. After umpteen, just print a count.

Returns true when deleteBoundingCells is true and false when both deleteBoundingCells is false and any cell in entities had a bounding cell.


The documentation for this class was generated from the following files: