Skip to content
Snippets Groups Projects
Commit 72fb83f5 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: pointer instead of smart pointer

parent b2938f25
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define __otb_DataNode_h #define __otb_DataNode_h
#include "itkPoint.h" #include "itkPoint.h"
#include "itkPolyLineParametricPath.h" #include "otbPolyLineParametricPathWithValue.h"
#include "otbPolygon.h" #include "otbPolygon.h"
#include "otbObjectList.h" #include "otbObjectList.h"
...@@ -67,7 +67,7 @@ class DataNode ...@@ -67,7 +67,7 @@ class DataNode
/** Internal data typedef */ /** Internal data typedef */
typedef itk::Point<PrecisionType,VDimension> PointType; typedef itk::Point<PrecisionType,VDimension> PointType;
typedef itk::PolyLineParametricPath<VDimension> LineType; typedef otb::PolyLineParametricPathWithValue<double,VDimension> LineType;
typedef typename LineType::Pointer LinePointerType; typedef typename LineType::Pointer LinePointerType;
typedef Polygon<PrecisionType> PolygonType; typedef Polygon<PrecisionType> PolygonType;
typedef typename PolygonType::Pointer PolygonPointerType; typedef typename PolygonType::Pointer PolygonPointerType;
...@@ -121,18 +121,18 @@ class DataNode ...@@ -121,18 +121,18 @@ class DataNode
* Set the line data. Node type is automatically set to FEATURE_LINE. * Set the line data. Node type is automatically set to FEATURE_LINE.
* \param line The line. * \param line The line.
*/ */
void SetLine(LinePointerType line); void SetLine(LineType* line);
/** /**
* Set the polygon exterior ring. Node type is automatically set to FEATURE_POLYGON. * Set the polygon exterior ring. Node type is automatically set to FEATURE_POLYGON.
* \param polygon The polygon exterior ring. * \param polygon The polygon exterior ring.
*/ */
void SetPolygonExteriorRing(PolygonPointerType polygon); void SetPolygonExteriorRing(PolygonType* polygon);
/** /**
* Set the polygon interior rings. Node type is automatically set to FEATURE_POLYGON. * Set the polygon interior rings. Node type is automatically set to FEATURE_POLYGON.
* \param polygonList The polygon interior rings list. * \param polygonList The polygon interior rings list.
*/ */
void SetPolygonInteriorRings(PolygonListPointerType polygonList); void SetPolygonInteriorRings(PolygonListType* polygonList);
/** /**
* \return True if node type is DOCUMENT. * \return True if node type is DOCUMENT.
......
...@@ -52,7 +52,7 @@ DataNode<TPrecision,VDimension> ...@@ -52,7 +52,7 @@ DataNode<TPrecision,VDimension>
template <class TPrecision, unsigned int VDimension> template <class TPrecision, unsigned int VDimension>
void DataNode<TPrecision,VDimension> void DataNode<TPrecision,VDimension>
::SetLine(LinePointerType line) ::SetLine(LineType* line)
{ {
m_NodeType = FEATURE_LINE; m_NodeType = FEATURE_LINE;
m_Data.line = line; m_Data.line = line;
...@@ -61,7 +61,7 @@ template <class TPrecision, unsigned int VDimension> ...@@ -61,7 +61,7 @@ template <class TPrecision, unsigned int VDimension>
template <class TPrecision, unsigned int VDimension> template <class TPrecision, unsigned int VDimension>
void void
DataNode<TPrecision,VDimension> DataNode<TPrecision,VDimension>
::SetPolygonExteriorRing(PolygonPointerType polygon) ::SetPolygonExteriorRing(PolygonType* polygon)
{ {
m_NodeType = FEATURE_POLYGON; m_NodeType = FEATURE_POLYGON;
m_Data.exteriorRing = polygon; m_Data.exteriorRing = polygon;
...@@ -75,7 +75,7 @@ DataNode<TPrecision,VDimension> ...@@ -75,7 +75,7 @@ DataNode<TPrecision,VDimension>
template <class TPrecision, unsigned int VDimension> template <class TPrecision, unsigned int VDimension>
void void
DataNode<TPrecision,VDimension> DataNode<TPrecision,VDimension>
::SetPolygonInteriorRings(PolygonListPointerType polygonList) ::SetPolygonInteriorRings(PolygonListType* polygonList)
{ {
m_NodeType = FEATURE_POLYGON; m_NodeType = FEATURE_POLYGON;
m_Data.interiorRings = polygonList; m_Data.interiorRings = polygonList;
......
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
* Append an element to the list. * Append an element to the list.
* \param element Pointer to the element to append. * \param element Pointer to the element to append.
*/ */
void PushBack(ObjectPointerType element); void PushBack(ObjectType* element);
/** /**
* Set the nth element of the list. * Set the nth element of the list.
* \param index The index where to put the element. * \param index The index where to put the element.
......
...@@ -80,7 +80,7 @@ namespace otb ...@@ -80,7 +80,7 @@ namespace otb
template <class TObject> template <class TObject>
void void
ObjectList<TObject> ObjectList<TObject>
::PushBack(ObjectPointerType element) ::PushBack(ObjectType* element)
{ {
m_InternalContainer.push_back(element); m_InternalContainer.push_back(element);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment