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).
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 MODELAPI_EXPORT virtual void setValues(const int theRed,
28 const int theBlue) = 0;
30 /// Fills the attribute values by a random color
31 MODELAPI_EXPORT virtual void setValuesRandom() = 0;
33 /// Returns the color value
34 MODELAPI_EXPORT virtual void values(int& theRed, int& theGreen, int& theBlue) = 0;
36 /// Returns the type of this class of attributes
37 MODELAPI_EXPORT static std::string type()
42 /// Returns the type of this class of attributes, not static method
43 MODELAPI_EXPORT virtual std::string attributeType();
45 /// To virtually destroy the fields of successors
46 MODELAPI_EXPORT virtual ~ModelAPI_AttributeColor();
49 /// Objects are created for features automatically
50 MODELAPI_EXPORT ModelAPI_AttributeColor();
53 //! Pointer on double attribute
54 typedef std::shared_ptr<ModelAPI_AttributeColor> AttributeColorPtr;