1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeColor.h
5 // Author: Natalia ERMOLAEVA
7 #ifndef ModelAPI_AttributeColor_H_
8 #define ModelAPI_AttributeColor_H_
11 #include <ModelAPI_Attribute.h>
16 /**\class ModelAPI_AttributeColor
18 * \brief API for the attribute that contains color (int, int, int). The color is in the range [0, 255]
19 * There is an opportunity to fill the attribute by a random color
22 class ModelAPI_AttributeColor : public ModelAPI_Attribute
25 /// Defines the color value
26 /// \param theRed the red part of the color
27 /// \param theRed the green part of the color
28 /// \param theRed the blue part of the color
29 MODELAPI_EXPORT virtual void setValues(const int theRed,
31 const int theBlue) = 0;
33 /// Fills the attribute values by a random color
34 MODELAPI_EXPORT virtual void setValuesRandom() = 0;
36 /// Returns the color value
37 MODELAPI_EXPORT virtual void values(int& theRed, int& theGreen, int& theBlue) = 0;
39 /// Returns the type of this class of attributes
40 MODELAPI_EXPORT static std::string type()
45 /// Returns the type of this class of attributes, not static method
46 MODELAPI_EXPORT virtual std::string attributeType();
48 /// To virtually destroy the fields of successors
49 MODELAPI_EXPORT virtual ~ModelAPI_AttributeColor();
52 /// Objects are created for features automatically
53 MODELAPI_EXPORT ModelAPI_AttributeColor();
56 //! Pointer on double attribute
57 typedef std::shared_ptr<ModelAPI_AttributeColor> AttributeColorPtr;