0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / TDataStd / TDataStd_Relation.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-12-10
2// Created by: Denis PASCAL
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TDataStd_Relation_HeaderFile
18#define _TDataStd_Relation_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <TCollection_ExtendedString.hxx>
24#include <TDF_AttributeList.hxx>
25#include <TDF_Attribute.hxx>
26#include <Standard_OStream.hxx>
27class Standard_GUID;
28class TDF_Label;
29class TCollection_ExtendedString;
30class TDF_Attribute;
31class TDF_RelocationTable;
32
33
34class TDataStd_Relation;
35DEFINE_STANDARD_HANDLE(TDataStd_Relation, TDF_Attribute)
36
37//! Relation attribute.
38//! ==================
39//!
40//! * Data Structure of the Expression is stored in a
41//! string and references to variables used by the string
42//!
43//! Warning: To be consistent, each Variable referenced by the
44//! relation must have its equivalent in the string
45class TDataStd_Relation : public TDF_Attribute
46{
47
48public:
49
50
51 //! class methods
52 //! =============
53 Standard_EXPORT static const Standard_GUID& GetID();
54
55 //! Find, or create, an Relation attribute.
56 //! Real methods
57 //! ============
58 Standard_EXPORT static Handle(TDataStd_Relation) Set (const TDF_Label& label);
59
60 Standard_EXPORT TDataStd_Relation();
61
62 //! build and return the relation name
63 Standard_EXPORT TCollection_ExtendedString Name() const;
64
65 Standard_EXPORT void SetRelation (const TCollection_ExtendedString& E);
66
67 Standard_EXPORT const TCollection_ExtendedString& GetRelation() const;
68
69 Standard_EXPORT TDF_AttributeList& GetVariables();
70
71 Standard_EXPORT const Standard_GUID& ID() const;
72
73 Standard_EXPORT void Restore (const Handle(TDF_Attribute)& With);
74
75 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
76
77 Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const;
78
79 Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
80
81
82
83
84 DEFINE_STANDARD_RTTI(TDataStd_Relation,TDF_Attribute)
85
86protected:
87
88
89
90
91private:
92
93
94 TCollection_ExtendedString myRelation;
95 TDF_AttributeList myVariables;
96
97
98};
99
100
101
102
103
104
105
106#endif // _TDataStd_Relation_HeaderFile