OTB  9.0.0
Orfeo Toolbox
otbVectorDataSource.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 
22 #ifndef otbVectorDataSource_h
23 #define otbVectorDataSource_h
24 
25 #include "OTBVectorDataBaseExport.h"
26 #include "itkProcessObject.h"
27 #include "itkMacro.h"
28 
29 namespace otb
30 {
41 template <class TOutputVectorData>
42 class ITK_ABI_EXPORT VectorDataSource : public itk::ProcessObject
43 {
44 public:
47  typedef itk::ProcessObject Superclass;
48  typedef itk::SmartPointer<Self> Pointer;
49  typedef itk::SmartPointer<const Self> ConstPointer;
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(VectorDataSource, itk::ProcessObject);
56 
57  typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
58  typedef TOutputVectorData OutputVectorDataType;
59  typedef typename TOutputVectorData::Pointer OutputVectorDataPointer;
60 
69  virtual void GraftOutput(itk::DataObject* output);
70 
77  virtual void GraftNthOutput(unsigned int idx, itk::DataObject* output);
78 
80  virtual OutputVectorDataType* GetOutput(void);
83 
84 protected:
86  ~VectorDataSource() override;
87 
88  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
89 
91  virtual void AllocateOutputs();
92 
93 private:
94  VectorDataSource(const Self&) = delete;
95  void operator=(const Self&) = delete;
96 };
97 
98 } // end namespace otb
99 
100 #ifndef OTB_MANUAL_INSTANTIATION
101 #include "otbVectorDataSource.hxx"
102 #endif
103 
104 #endif // otbVectorDataSource_h
otb::VectorDataSource::Superclass
itk::ProcessObject Superclass
Definition: otbVectorDataSource.h:47
otb::VectorData
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::VectorDataSource::OutputVectorDataType
TOutputVectorData OutputVectorDataType
Definition: otbVectorDataSource.h:58
otb::VectorDataSource::Self
VectorDataSource Self
Definition: otbVectorDataSource.h:46
otb::VectorDataSource::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbVectorDataSource.h:49
otb::VectorDataSource::DataObjectPointerArraySizeType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: otbVectorDataSource.h:55
otbVectorDataSource.hxx
otb::VectorDataSource::OutputVectorDataPointer
TOutputVectorData::Pointer OutputVectorDataPointer
Definition: otbVectorDataSource.h:59
otb::VectorDataSource
Filter hierarchy for generating VectorData.
Definition: otbVectorDataSource.h:42
otb::VectorDataSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataSource.h:48