0026411: Necessary to improve XCAF to store and querying GD&T data.
[occt.git] / src / XCAFDimTolObjects / XCAFDimTolObjects_DatumObject.hxx
1 // Created on: 2015-08-06
2 // Created by: Ilya Novikov
3 // Copyright (c) 2004-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16
17 #ifndef _XCAFDimTolObjects_DatumObject_HeaderFile
18 #define _XCAFDimTolObjects_DatumObject_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <XCAFDimTolObjects_DatumObjectSequence.hxx>
24 #include <TCollection_HAsciiString.hxx>
25 #include <XCAFDimTolObjects_DatumModifiersSequence.hxx>
26 #include <XCAFDimTolObjects_DatumModifWithValue.hxx>
27 #include <Standard_Real.hxx>
28 #include <TopoDS_Shape.hxx>
29 #include <Standard_Transient.hxx>
30 #include <XCAFDimTolObjects_DatumSingleModif.hxx>
31 #include <Standard_Boolean.hxx>
32
33 class XCAFDimTolObjects_DatumObject;
34 DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_DatumObject, Standard_Transient)
35
36 //! object to store datum
37 class XCAFDimTolObjects_DatumObject : public Standard_Transient
38 {
39
40 public:
41
42   Standard_EXPORT XCAFDimTolObjects_DatumObject();
43   
44   Standard_EXPORT XCAFDimTolObjects_DatumObject(const Handle(XCAFDimTolObjects_DatumObject)& theObj);
45   
46   Standard_EXPORT Handle(TCollection_HAsciiString) GetName() const;
47   
48   Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& theTag);
49   
50   Standard_EXPORT XCAFDimTolObjects_DatumModifiersSequence GetModifiers() const;
51   
52   Standard_EXPORT void SetModifiers (const XCAFDimTolObjects_DatumModifiersSequence& theModifiers);
53   
54   Standard_EXPORT void GetModifierWithValue (XCAFDimTolObjects_DatumModifWithValue& theModifier, Standard_Real& theValue) const;
55   
56   Standard_EXPORT void SetModifierWithValue (const XCAFDimTolObjects_DatumModifWithValue theModifier, const Standard_Real theValue);
57   
58   Standard_EXPORT void AddModifier (const XCAFDimTolObjects_DatumSingleModif theModifier);
59   
60   Standard_EXPORT TopoDS_Shape GetDatumTarget() const;
61   
62   Standard_EXPORT void SetDatumTarget (const TopoDS_Shape& theShape);
63   
64   Standard_EXPORT Standard_Boolean IsDatumTarget() const;
65
66
67   DEFINE_STANDARD_RTTI(XCAFDimTolObjects_DatumObject,Standard_Transient)
68
69 private: 
70
71   Handle(TCollection_HAsciiString) myName;
72   XCAFDimTolObjects_DatumModifiersSequence myModifiers;
73   XCAFDimTolObjects_DatumModifWithValue myModifierWithValue;
74   Standard_Real myValueOfModifier;
75   TopoDS_Shape myDatumTarget;
76
77 };
78
79 #endif // _XCAFDimTolObjects_DatumObject_HeaderFile