]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_ComponentValue.h
Salome HOME
Issue #1865 : initial implementation of fields results and high level API
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_ComponentValue.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : ModelHighAPI_ComponentValue.h
3 // Purpose:
4 //
5 // History:
6 // 16/11/16 - Mikhail Ponikarov - Creation of the file
7
8 #ifndef SRC_MODELHIGHAPI_ModelHighAPI_ComponentValue_H_
9 #define SRC_MODELHIGHAPI_ModelHighAPI_ComponentValue_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "ModelHighAPI.h"
13
14 #include <ModelAPI_AttributeTables.h>
15
16 //--------------------------------------------------------------------------------------
17 /**\class ModelHighAPI_ComponentValue
18  * \ingroup CPPHighAPI
19  * \brief Class for filling ModelAPI_AttributeTable elements
20  */
21 class ModelHighAPI_ComponentValue
22 {
23 public:
24   /// Constructor for Boolean
25   MODELHIGHAPI_EXPORT ModelHighAPI_ComponentValue(const bool theValue = false);
26   /// Constructor for int
27   MODELHIGHAPI_EXPORT ModelHighAPI_ComponentValue(const int theValue);
28   /// Constructor for double
29   MODELHIGHAPI_EXPORT ModelHighAPI_ComponentValue(const double theValue);
30   /// Constructor for std::string
31   MODELHIGHAPI_EXPORT ModelHighAPI_ComponentValue(const std::string & theValue);
32   /// Destructor
33   MODELHIGHAPI_EXPORT virtual ~ModelHighAPI_ComponentValue();
34
35   /// Sets value to the table
36   MODELHIGHAPI_EXPORT virtual void fill(const std::shared_ptr<ModelAPI_AttributeTables>& theAttr,
37     const int theTable, const int theColumn, const int theRow) const;
38
39 private:
40   ModelAPI_AttributeTables::ValueType myType; ///< type of the value set
41   ModelAPI_AttributeTables::Value myValue; ///< value itself
42 };
43
44 //--------------------------------------------------------------------------------------
45 //--------------------------------------------------------------------------------------
46 #endif /* SRC_MODELHIGHAPI_ModelHighAPI_ComponentValue_H_ */