42cf5bc1 |
1 | // Created on: 1992-09-23 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1992-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 _Interface_GraphContent_HeaderFile |
18 | #define _Interface_GraphContent_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Interface_EntityIterator.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | class Interface_Graph; |
27 | class Standard_Transient; |
28 | class Interface_EntityIterator; |
29 | |
30 | |
31 | //! Defines general form for classes of graph algorithms on |
32 | //! Interfaces, this form is that of EntityIterator |
33 | //! Each sub-class fills it according to its own algorithm |
34 | //! This also allows to combine any graph result to others, |
35 | //! all being given under one unique form |
36 | class Interface_GraphContent : public Interface_EntityIterator |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | //! Creates an empty GraphContent, ready to be filled |
44 | Standard_EXPORT Interface_GraphContent(); |
45 | |
46 | //! Creates with all entities designated by a Graph |
47 | Standard_EXPORT Interface_GraphContent(const Interface_Graph& agraph); |
48 | |
49 | //! Creates with entities having specific Status value in a Graph |
50 | Standard_EXPORT Interface_GraphContent(const Interface_Graph& agraph, const Standard_Integer stat); |
51 | |
52 | //! Creates an Iterator with Shared entities of an entity |
53 | //! (equivalente to EntityIterator but with a Graph) |
54 | Standard_EXPORT Interface_GraphContent(const Interface_Graph& agraph, const Handle(Standard_Transient)& ent); |
55 | |
56 | //! Gets all Entities designated by a Graph (once created), adds |
57 | //! them to those already recorded |
58 | Standard_EXPORT void GetFromGraph (const Interface_Graph& agraph); |
59 | |
60 | //! Gets entities from a graph which have a specific Status value |
61 | //! (one created), adds them to those already recorded |
62 | Standard_EXPORT void GetFromGraph (const Interface_Graph& agraph, const Standard_Integer stat); |
63 | |
64 | //! Returns Result under the exact form of an EntityIterator : |
65 | //! Can be used when EntityIterator itself is required (as a |
66 | //! returned value for instance), whitout way for a sub-class |
67 | Standard_EXPORT Interface_EntityIterator Result(); |
68 | |
69 | //! Does the Evaluation before starting the iteration itself |
70 | //! (in out) |
71 | Standard_EXPORT void Begin(); |
72 | |
73 | //! Evaluates list of Entities to be iterated. Called by Start |
74 | //! Default is set to doing nothing : intended to be redefined |
75 | //! by each sub-class |
76 | Standard_EXPORT virtual void Evaluate(); |
77 | |
78 | |
79 | |
80 | |
81 | protected: |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | private: |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | }; |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | #endif // _Interface_GraphContent_HeaderFile |