Loading...
Searching...
No Matches
te::vp::AbstractOperation Class Referenceabstract

Abstract class used to define an operation. More...

#include <AbstractOperation.h>

Inheritance diagram for te::vp::AbstractOperation:
te::vp::DifferenceOperation te::vp::DissolveOperation te::vp::DissolveSubdivisionOperation te::vp::IdentityOperation te::vp::IntersectionOperation te::vp::MakeValidOperation te::vp::SubdivideOperation te::vp::UnionOperation

Public Member Functions

void abort ()
 Aborts the execution of the operation.
 
 AbstractOperation (const std::string &operationName)
 Default constructor.
 
virtual te::vp::FeaturecreateOutputFeature (std::size_t outputIndex)
 It creates the output feature based on the given output dataaccess index.
 
virtual std::vector< te::vp::FeatureSetexecute (const std::vector< te::vp::FeatureSet > &vecInput)
 It executes the operation.
 
virtual std::unique_ptr< te::vp::AbstractOperationCapabilitiesgetCapabilities () const
 Makes all the necessaries adaptations to the input dataAccess to avoid duplicate column names.
 
virtual const te::da::DataSetTypegetDataSetType (std::size_t outputIndex)
 Gets the dataSetType of the 'outputIndex-th' output.
 
const std::string & getName () const
 Gets the output geometry type.
 
te::gm::GeomType getOutputGeometryType () const
 
AbstractParametersgetParameters () const
 Gets the operation report.
 
OperationReportgetReport () const
 Gets the operation name.
 
bool handleOutputPropertyNamesChanges (const te::da::DataSetType *baseOutputDataSetType, const te::da::DataSetType *actualOutputDataSetType)
 
virtual void initialize ()
 
bool isAborted () const
 Returns TRUE if the operation has been aborted. FALSE otherwise.
 
bool prepareInputData ()
 
bool prepareOutputData ()
 
void setOutputGeometryType (const te::gm::GeomType newType)
 Set the output geometry type.
 
void setParameters (AbstractParameters *params)
 Gets the operation current parameters.
 
virtual ~AbstractOperation ()
 Virtual destructor.
 

Protected Member Functions

virtual void addOutputColumns (te::da::DataSetType *outputDataSetType)
 Initializes the operation input.
 
virtual te::da::DataSetTypecreateBasicOutputDataSetType (const std::string &dataSetName, int srid, te::gm::GeomType geometryType, const std::string &geometryColumnName) const
 < Creates the basic dataSetType for the output containing all the columns that are required
 
virtual std::vector< te::vp::FeatureSetexecuteImpl (const std::vector< te::vp::FeatureSet > &vecInput)=0
 
virtual bool initializeInput ()
 Initializes the operation output.
 
virtual bool initializeOutput ()
 Function that effectivelly executes the operation. It must be implemented by the concrete classes.
 

Private Attributes

bool m_aborted
 Becames true if the abort function is called. Concrete classes must check for this value from time to time.
 
AbstractOperationImpl * m_impl
 Holds all the attributes of the class.
 
std::recursive_mutex m_mutex
 

Detailed Description

Abstract class used to define an operation.

Definition at line 204 of file AbstractOperation.h.

Constructor & Destructor Documentation

◆ AbstractOperation()

te::vp::AbstractOperation::AbstractOperation ( const std::string &  operationName)

Default constructor.

Note
This class will take the ownership of AbstractParameters pointer

◆ ~AbstractOperation()

virtual te::vp::AbstractOperation::~AbstractOperation ( )
virtual

Virtual destructor.

Initializes the operation input and output

Member Function Documentation

◆ abort()

void te::vp::AbstractOperation::abort ( )

Aborts the execution of the operation.

Note
Thread-safe method (using internal mutex).

◆ addOutputColumns()

virtual void te::vp::AbstractOperation::addOutputColumns ( te::da::DataSetType outputDataSetType)
protectedvirtual

Initializes the operation input.

◆ createBasicOutputDataSetType()

virtual te::da::DataSetType * te::vp::AbstractOperation::createBasicOutputDataSetType ( const std::string &  dataSetName,
int  srid,
te::gm::GeomType  geometryType,
const std::string &  geometryColumnName 
) const
protectedvirtual

< Creates the basic dataSetType for the output containing all the columns that are required

Reimplemented in te::vp::SubdivideOperation.

◆ createOutputFeature()

virtual te::vp::Feature * te::vp::AbstractOperation::createOutputFeature ( std::size_t  outputIndex)
virtual

It creates the output feature based on the given output dataaccess index.

Parameters
outputIndexThe index of the output dataAccess.

◆ execute()

virtual std::vector< te::vp::FeatureSet > te::vp::AbstractOperation::execute ( const std::vector< te::vp::FeatureSet > &  vecInput)
virtual

It executes the operation.

Parameters
inputInput vector data to be processed.
Precondition
The parameters must be valid (internal check)
Exceptions
ExceptionIt throws an exception if something goes wrong during the execution.

\Return The output memory data processed.

◆ executeImpl()

◆ getCapabilities()

virtual std::unique_ptr< te::vp::AbstractOperationCapabilities > te::vp::AbstractOperation::getCapabilities ( ) const
virtual

Makes all the necessaries adaptations to the input dataAccess to avoid duplicate column names.

Reimplemented in te::vp::DissolveOperation, te::vp::DissolveSubdivisionOperation, te::vp::MakeValidOperation, and te::vp::SubdivideOperation.

◆ getDataSetType()

virtual const te::da::DataSetType * te::vp::AbstractOperation::getDataSetType ( std::size_t  outputIndex)
virtual

Gets the dataSetType of the 'outputIndex-th' output.

Parameters
outputIndexThe index of the output dataAccess. Sets the parameters to be used by the operation

◆ getName()

const std::string & te::vp::AbstractOperation::getName ( ) const

Gets the output geometry type.

◆ getOutputGeometryType()

te::gm::GeomType te::vp::AbstractOperation::getOutputGeometryType ( ) const

◆ getParameters()

AbstractParameters * te::vp::AbstractOperation::getParameters ( ) const

Gets the operation report.

◆ getReport()

OperationReport * te::vp::AbstractOperation::getReport ( ) const

Gets the operation name.

◆ handleOutputPropertyNamesChanges()

bool te::vp::AbstractOperation::handleOutputPropertyNamesChanges ( const te::da::DataSetType baseOutputDataSetType,
const te::da::DataSetType actualOutputDataSetType 
)

◆ initialize()

virtual void te::vp::AbstractOperation::initialize ( )
virtual

◆ initializeInput()

virtual bool te::vp::AbstractOperation::initializeInput ( )
protectedvirtual

Initializes the operation output.

◆ initializeOutput()

virtual bool te::vp::AbstractOperation::initializeOutput ( )
protectedvirtual

Function that effectivelly executes the operation. It must be implemented by the concrete classes.

◆ isAborted()

bool te::vp::AbstractOperation::isAborted ( ) const

Returns TRUE if the operation has been aborted. FALSE otherwise.

Note
Thread-safe method (using internal mutex). Get the capabilities of the operation. Basically, operation will have 2 inputs, 1 output, and support subdivision. If it is not the case of the concrete class, this function should be overriden

◆ prepareInputData()

bool te::vp::AbstractOperation::prepareInputData ( )

◆ prepareOutputData()

bool te::vp::AbstractOperation::prepareOutputData ( )

◆ setOutputGeometryType()

void te::vp::AbstractOperation::setOutputGeometryType ( const te::gm::GeomType  newType)

Set the output geometry type.

Note
Default value: te::gm::UnknownGeometryType

◆ setParameters()

void te::vp::AbstractOperation::setParameters ( AbstractParameters params)

Gets the operation current parameters.

Member Data Documentation

◆ m_aborted

bool te::vp::AbstractOperation::m_aborted
private

Becames true if the abort function is called. Concrete classes must check for this value from time to time.

Definition at line 310 of file AbstractOperation.h.

◆ m_impl

AbstractOperationImpl* te::vp::AbstractOperation::m_impl
private

Holds all the attributes of the class.

Definition at line 309 of file AbstractOperation.h.

◆ m_mutex

std::recursive_mutex te::vp::AbstractOperation::m_mutex
mutableprivate

Definition at line 311 of file AbstractOperation.h.


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