0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / IGESBasic / IGESBasic_Group.hxx
1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Arun MENON )
3 // Copyright (c) 1993-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 _IGESBasic_Group_HeaderFile
18 #define _IGESBasic_Group_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <IGESData_HArray1OfIGESEntity.hxx>
24 #include <IGESData_IGESEntity.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Boolean.hxx>
27 class Standard_OutOfRange;
28 class IGESData_IGESEntity;
29 class Standard_Transient;
30
31
32 class IGESBasic_Group;
33 DEFINE_STANDARD_HANDLE(IGESBasic_Group, IGESData_IGESEntity)
34
35 //! defines Group, Type <402> Form <1>
36 //! in package IGESBasic
37 //! The Group Associativity allows a collection of a set
38 //! of entities to be maintained as a single, logical
39 //! entity
40 //!
41 //! Group, OrderedGroup, GroupWithoutBackP, OrderedGroupWithoutBackP
42 //! share the same definition (class Group), form number changes
43 //!
44 //! non Ordered, non WithoutBackP : form  1
45 //! non Ordered,     WithoutBackP : form  7
46 //! Ordered, non WithoutBackP : form 14
47 //! Ordered,     WithoutBackP : form 15
48 class IGESBasic_Group : public IGESData_IGESEntity
49 {
50
51 public:
52
53   
54   Standard_EXPORT IGESBasic_Group();
55   
56   //! Creates a Group with a predefined count of items
57   //! (which all start as null)
58   Standard_EXPORT IGESBasic_Group(const Standard_Integer nb);
59   
60   //! This method is used to set the fields of the class Group
61   //! - allEntities : Used to store pointers to members of
62   //! the Group.
63   Standard_EXPORT void Init (const Handle(IGESData_HArray1OfIGESEntity)& allEntities);
64   
65   //! Sets a Group to be, or not to be  Ordered (according mode)
66   Standard_EXPORT void SetOrdered (const Standard_Boolean mode);
67   
68   //! Sets a Group to be, or not to be  WithoutBackP
69   Standard_EXPORT void SetWithoutBackP (const Standard_Boolean mode);
70   
71   //! Returns True if <me> is Ordered
72   Standard_EXPORT Standard_Boolean IsOrdered() const;
73   
74   //! Returns True if <me> is WithoutBackP
75   Standard_EXPORT Standard_Boolean IsWithoutBackP() const;
76   
77   //! Enforce a new value for the type and form
78   Standard_EXPORT void SetUser (const Standard_Integer type, const Standard_Integer form);
79   
80   //! Changes the count of item
81   //! If greater, new items are null
82   //! If lower, old items are lost
83   Standard_EXPORT void SetNb (const Standard_Integer nb);
84   
85   //! returns the number of IGESEntities in the Group
86   Standard_EXPORT Standard_Integer NbEntities() const;
87   
88   //! returns the specific entity from the Group
89   Standard_EXPORT Handle(IGESData_IGESEntity) Entity (const Standard_Integer Index) const;
90   
91   //! returns the specific entity from the Group
92   Standard_EXPORT Handle(Standard_Transient) Value (const Standard_Integer Index) const;
93   
94   //! Sets a new value for item <Index>
95   Standard_EXPORT void SetValue (const Standard_Integer Index, const Handle(IGESData_IGESEntity)& ent);
96
97
98
99
100   DEFINE_STANDARD_RTTIEXT(IGESBasic_Group,IGESData_IGESEntity)
101
102 protected:
103
104
105
106
107 private:
108
109
110   Handle(IGESData_HArray1OfIGESEntity) theEntities;
111
112
113 };
114
115
116
117
118
119
120
121 #endif // _IGESBasic_Group_HeaderFile