SubdivideDataHandler.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20  /*!
21  \file terralin/vp/AbstractDataHandler.h
22 
23  \brief This class represents handler to help reading and writing data from/to a dataSource by dividing it into smaller groups
24  */
25 
26 #ifndef __TERRALIB_VP_INTERNAL_SUBDIVIDEDATAHANDLER_H
27 #define __TERRALIB_VP_INTERNAL_SUBDIVIDEDATAHANDLER_H
28 
29 #include "AbstractDataHandler.h"
30 #include "Config.h"
31 
32 #include <memory>
33 #include <vector>
34 
35 class SubdivideDataHandlerImpl;
36 
37 namespace te
38 {
39  namespace da
40  {
41  class DataAccess;
42  }
43 
44  namespace gm
45  {
46  class Envelope;
47  }
48 
49  namespace vp
50  {
51  class FeatureSet;
52 
54  {
55  public:
56  /*! \brief Default constructor. */
58 
59  /*! \brief Virtual destructor. */
60  virtual ~SubdivideDataHandler();
61 
62  //!< Initializes the data handler
63  virtual void initialize(const std::vector<te::da::DataAccess*>& vecInputData, const std::vector<te::da::DataAccess*>& vecOutputData, std::size_t maxCoordinates, te::common::TaskProgress* taskProgress) override;
64 
65  //!< Finalizes the data handler
66  virtual void finalize(te::common::TaskProgress* taskProgress) override;
67 
68  //!< Returns the number of groups of the data handler
69  virtual std::size_t getGroupCount() const override;
70 
71  //!< Returns the inputIndex-th featureSet og the groupIndex-th group considering the given filter
72  virtual te::vp::FeatureSet getFeatureSet(std::size_t groupIndex, std::size_t inputIndex, const te::gm::Envelope& filter) override;
73 
74  //!< Adds a featureSet related to groupIndex-th group the to be added to the outputIndex-th output data access
75  virtual void addFeatureSet(std::size_t groupIndex, std::size_t outputIndex, const te::vp::FeatureSet& featureSet) override;
76 
77  protected:
78 
79  std::unique_ptr<SubdivideDataHandlerImpl> m_impl;
80  };
81 
83  {
84  public:
85 
87 
88  virtual ~SubdivideDataHandlerFactory();
89 
90  protected:
91 
92  virtual te::vp::AbstractDataHandler* build() override;
93  };
94  }
95 }
96 
97 #endif //__TERRALIB_VP_INTERNAL_SUBDIVIDEDATAHANDLER_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:53
This abstract class represents handler to help reading and writing data from/to a dataSource by divid...
An alias for a set of Features.
Definition: Feature.h:60
std::unique_ptr< SubdivideDataHandlerImpl > m_impl
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
TerraLib.
Configuration flags for the Terrralib Vector Processing module.