0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / TFunction / TFunction_GraphNode.hxx
CommitLineData
42cf5bc1 1// Created on: 2008-06-21
2// Created by: Vladislav ROMASHKO
3// Copyright (c) 2008-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#ifndef _TFunction_GraphNode_HeaderFile
17#define _TFunction_GraphNode_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <TColStd_MapOfInteger.hxx>
23#include <TFunction_ExecutionStatus.hxx>
24#include <TDF_Attribute.hxx>
25#include <Standard_Boolean.hxx>
26#include <Standard_Integer.hxx>
27#include <Standard_OStream.hxx>
28class TDF_Label;
29class Standard_GUID;
30class TDF_Attribute;
31class TDF_RelocationTable;
32class TDF_DataSet;
33
34
35class TFunction_GraphNode;
36DEFINE_STANDARD_HANDLE(TFunction_GraphNode, TDF_Attribute)
37
38//! Provides links between functions.
39class TFunction_GraphNode : public TDF_Attribute
40{
41
42public:
43
44
45 //! Static methods
46 //! ==============
47 //! Finds or Creates a graph node attribute at the label <L>.
48 //! Returns the attribute.
49 Standard_EXPORT static Handle(TFunction_GraphNode) Set (const TDF_Label& L);
50
51 //! Returns the GUID for GraphNode attribute.
52 //! Instant methods
53 //! ===============
54 //! Constructor (empty).
55 Standard_EXPORT static const Standard_GUID& GetID();
56
57 Standard_EXPORT TFunction_GraphNode();
58
59 //! Defines a reference to the function as a previous one.
60 Standard_EXPORT Standard_Boolean AddPrevious (const Standard_Integer funcID);
61
62 //! Defines a reference to the function as a previous one.
63 Standard_EXPORT Standard_Boolean AddPrevious (const TDF_Label& func);
64
65 //! Removes a reference to the function as a previous one.
66 Standard_EXPORT Standard_Boolean RemovePrevious (const Standard_Integer funcID);
67
68 //! Removes a reference to the function as a previous one.
69 Standard_EXPORT Standard_Boolean RemovePrevious (const TDF_Label& func);
70
71 //! Returns a map of previous functions.
72 Standard_EXPORT const TColStd_MapOfInteger& GetPrevious() const;
73
74 //! Clears a map of previous functions.
75 Standard_EXPORT void RemoveAllPrevious();
76
77 //! Defines a reference to the function as a next one.
78 Standard_EXPORT Standard_Boolean AddNext (const Standard_Integer funcID);
79
80 //! Defines a reference to the function as a next one.
81 Standard_EXPORT Standard_Boolean AddNext (const TDF_Label& func);
82
83 //! Removes a reference to the function as a next one.
84 Standard_EXPORT Standard_Boolean RemoveNext (const Standard_Integer funcID);
85
86 //! Removes a reference to the function as a next one.
87 Standard_EXPORT Standard_Boolean RemoveNext (const TDF_Label& func);
88
89 //! Returns a map of next functions.
90 Standard_EXPORT const TColStd_MapOfInteger& GetNext() const;
91
92 //! Clears a map of next functions.
93 Standard_EXPORT void RemoveAllNext();
94
95 //! Returns the execution status of the function.
96 Standard_EXPORT TFunction_ExecutionStatus GetStatus() const;
97
98 //! Defines an execution status for a function.
99 //! Implementation of Attribute methods
100 //! ===================================
101 Standard_EXPORT void SetStatus (const TFunction_ExecutionStatus status);
102
79104795 103 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
42cf5bc1 104
79104795 105 Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
42cf5bc1 106
79104795 107 Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
42cf5bc1 108
109 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
110
111 Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& aDataSet) const Standard_OVERRIDE;
112
113 Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
114
115
116
117
92efcf78 118 DEFINE_STANDARD_RTTIEXT(TFunction_GraphNode,TDF_Attribute)
42cf5bc1 119
120protected:
121
122
123
124
125private:
126
127
128 TColStd_MapOfInteger myPrevious;
129 TColStd_MapOfInteger myNext;
130 TFunction_ExecutionStatus myStatus;
131
132
133};
134
135
136
137
138
139
140
141#endif // _TFunction_GraphNode_HeaderFile