1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeStringArray.h
4 // Created: 14 Nov 2016
5 // Author: Mikhail Ponikarov
7 #ifndef ModelAPI_AttributeStringArray_H_
8 #define ModelAPI_AttributeStringArray_H_
11 #include <ModelAPI_Attribute.h>
15 /// \class ModelAPI_AttributeStringArray
16 /// \ingroup DataModel
17 /// \brief API for the attribute that contains several strings in the array inside.
18 class ModelAPI_AttributeStringArray: public ModelAPI_Attribute
21 /// Returns the size of the array (zero means that it is empty)
22 MODELAPI_EXPORT virtual int size() = 0;
24 /// Sets the new size of the array. The previous data is erased.
25 MODELAPI_EXPORT virtual void setSize(const int theSize) = 0;
27 /// Defines the value of the array by index [0; size-1]
28 MODELAPI_EXPORT virtual void setValue(const int theIndex,
29 const std::string theValue) = 0;
31 /// Returns the value by the index
32 MODELAPI_EXPORT virtual std::string value(const int theIndex) = 0;
34 /// Returns the type of this class of attributes
35 MODELAPI_EXPORT static std::string typeId()
40 /// Returns the type of this class of attributes, not static method
41 MODELAPI_EXPORT virtual std::string attributeType();
43 /// To virtually destroy the fields of successors
44 MODELAPI_EXPORT virtual ~ModelAPI_AttributeStringArray();
47 /// Objects are created for features automatically
48 MODELAPI_EXPORT ModelAPI_AttributeStringArray();
51 /// Pointer on string attribute
52 typedef std::shared_ptr<ModelAPI_AttributeStringArray> AttributeStringArrayPtr;