SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Protected Member Functions | List of all members
smtk::session::polygon::Operation Class Reference

An operator using the polygon kernel. More...

#include <Operation.h>

Inheritance diagram for smtk::session::polygon::Operation:
[legend]
Collaboration diagram for smtk::session::polygon::Operation:
[legend]

Protected Member Functions

template<typename T , typename U , typename V >
void pointsForLoop (T &polypts, int numPtsToUse, U &start, U finish, int numCoordsPerPoint, V pmodel)
 
template<typename T , typename U , typename V , typename W >
void pointsForLoop (T &polypts, int numEdgesToUse, U &curEdge, U edgesFinish, V &curEdgeDir, V edgeDirFinish, W &outerLoopEdges)
 
template<typename T , typename U >
void pointsInLoopOrderFromOrientedEdges (T &polypts, U begin, U end, smtk::shared_ptr< internal::pmodel > pmodel)
 
- Protected Member Functions inherited from smtk::operation::XMLOperation
Result operateInternal () override=0
 Perform the actual operation and construct the result.
 
Specification createSpecification () override
 
- Protected Member Functions inherited from smtk::operation::Operation
virtual ResourceAccessMap identifyLocksRequired ()
 Identify resources to lock, and whether to lock them for reading or writing. More...
 
const ResourceAccessMaplockedResources () const
 Returns the set of resources that are currently locked by this operation.
 
virtual void postProcessResult (Result &)
 
virtual void markModifiedResources (Result &)
 
virtual bool unmanageResources (Result &)
 
virtual void generateSummary (Result &)
 
Specification createBaseSpecification () const
 

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
}
 
enum  LockOption { LockAll, ParentLocksOnly, SkipLocks }
 When running a nested operation, specify how resource locks should be handled. More...
 
enum  ObserverOption { InvokeObservers, SkipObservers }
 When running a nested operation, specify whether observers should be invoked. More...
 
enum  ParametersOption { Validate, SkipValidation }
 When running a nested operation, specify whether to call the operation's ableToOperate() method or skip it. More...
 
using Priority = int
 A priority for Handlers.
 
typedef std::size_t Index
 A hash value uniquely representing the operation.
 
typedef std::shared_ptr< smtk::attribute::AttributeParameters
 An attribute describing the operation's input.
 
typedef std::shared_ptr< smtk::attribute::AttributeResult
 An attribute containing the operation's result.
 
typedef std::shared_ptr< smtk::attribute::ResourceSpecification
 An attribute resource containing the operation's execution definition result definition.
 
typedef std::shared_ptr< smtk::attribute::DefinitionDefinition
 
- 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...
 
Outcome safeOperate ()
 Execute the operation in an asynchronous environment. More...
 
Outcome safeOperate (Handler handler)
 
virtual bool releaseResult (Result &result)
 Release the operation result returned by operate(). 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...
 
void addHandler (Handler handler, Priority priority)
 Pass a handler to invoke after the operation's completion (successful or not). More...
 
bool removeHandler (Handler handler, Priority priority)
 Remove a handler from the operation.
 
bool clearHandlers ()
 Clear all handlers from the operation.
 
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 (const BaseKey &key)
 Run an operation given a key returned by Operation::childKey().
 
- Public Attributes inherited from smtk::operation::Operation
friend Manager
 
friend ImportPythonOperation
 
- Protected Attributes inherited from smtk::operation::Operation
int m_debugLevel { 0 }
 
std::weak_ptr< Managerm_manager
 
std::shared_ptr< smtk::common::Managersm_managers
 

Detailed Description

An operator using the polygon kernel.

This is a base class for actual polygon operators. It provides convenience methods for accessing polygon-specific data for its subclasses to use internally.


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