20 #ifndef GeomDataAPI_Point2DArray_H_
21 #define GeomDataAPI_Point2DArray_H_
23 #include <GeomDataAPI.h>
24 #include <ModelAPI_Attribute.h>
38 GEOMDATAAPI_EXPORT
virtual bool assign(std::shared_ptr<GeomDataAPI_Point2DArray> theOther) = 0;
41 GEOMDATAAPI_EXPORT
virtual int size() = 0;
44 GEOMDATAAPI_EXPORT
virtual void setSize(
const int theSize) = 0;
47 GEOMDATAAPI_EXPORT
virtual void setPnt(
const int theIndex,
48 const double theX,
const double theY) = 0;
51 GEOMDATAAPI_EXPORT
virtual void setPnt(
const int theIndex,
52 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
55 GEOMDATAAPI_EXPORT
virtual std::shared_ptr<GeomAPI_Pnt2d>
pnt(
const int theIndex) = 0;
60 return std::string(
"Point2DArray");
72 typedef std::shared_ptr<GeomDataAPI_Point2DArray> AttributePoint2DArrayPtr;
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Attribute that contains array of 2D point coordinates.
Definition: GeomDataAPI_Point2DArray.h:34
virtual GEOMDATAAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > pnt(const int theIndex)=0
Returns the value by the index.
virtual GEOMDATAAPI_EXPORT int size()=0
Returns the size of the array (zero means that it is empty)
virtual GEOMDATAAPI_EXPORT void setSize(const int theSize)=0
Sets the new size of the array. The previous data is erased.
virtual GEOMDATAAPI_EXPORT std::string attributeType()
Returns the type of this class of attributes, not static method.
Definition: GeomDataAPI_Point2DArray.cpp:22
static std::string typeId()
Returns the type of this class of attributes.
Definition: GeomDataAPI_Point2DArray.h:58
virtual GEOMDATAAPI_EXPORT bool assign(std::shared_ptr< GeomDataAPI_Point2DArray > theOther)=0
Copy values from another array.
virtual GEOMDATAAPI_EXPORT void setPnt(const int theIndex, const std::shared_ptr< GeomAPI_Pnt2d > &thePoint)=0
Defines the value of the array by index [0; size-1].
virtual GEOMDATAAPI_EXPORT void setPnt(const int theIndex, const double theX, const double theY)=0
Defines the value of the array by index [0; size-1].
GEOMDATAAPI_EXPORT GeomDataAPI_Point2DArray()
Objects are created for features automatically.
Definition: GeomDataAPI_Point2DArray.cpp:27
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34