1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_AttributeColor.h
5 // Author: Natalia ERMOLAEVA
7 #ifndef MODEL_ATTRIBUTECOLOR_H_
8 #define MODEL_ATTRIBUTECOLOR_H_
11 #include <ModelAPI_AttributeColor.h>
13 #include <TDF_Label.hxx>
14 #include <TDataStd_Integer.hxx>
18 /**\class Model_AttributeColor
20 * \brief Attribute that contains three integer values which define the color.
23 class Model_AttributeColor : public ModelAPI_AttributeColor
25 Handle_TDataStd_Integer myRed;
26 Handle_TDataStd_Integer myGreen;
27 Handle_TDataStd_Integer myBlue;
29 /// Defines the color value
30 /// \param theRed the red part of the color
31 /// \param theRed the green part of the color
32 /// \param theRed the blue part of the color
33 MODELAPI_EXPORT virtual void setValues(const int theRed,
37 /// Fills the attribute values by a random color
38 MODELAPI_EXPORT virtual void setValuesRandom();
40 /// Returns the color value
41 MODELAPI_EXPORT virtual void values(int& theRed, int& theGreen, int& theBlue);
44 /// Initializes attibutes
45 Model_AttributeColor(TDF_Label& theLabel);
47 friend class Model_Data;