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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESBasic_Group_HeaderFile
18 #define _IGESBasic_Group_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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;
32 class IGESBasic_Group;
33 DEFINE_STANDARD_HANDLE(IGESBasic_Group, IGESData_IGESEntity)
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
41 //! Group, OrderedGroup, GroupWithoutBackP, OrderedGroupWithoutBackP
42 //! share the same definition (class Group), form number changes
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
54 Standard_EXPORT IGESBasic_Group();
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);
60 //! This method is used to set the fields of the class Group
61 //! - allEntities : Used to store pointers to members of
63 Standard_EXPORT void Init (const Handle(IGESData_HArray1OfIGESEntity)& allEntities);
65 //! Sets a Group to be, or not to be Ordered (according mode)
66 Standard_EXPORT void SetOrdered (const Standard_Boolean mode);
68 //! Sets a Group to be, or not to be WithoutBackP
69 Standard_EXPORT void SetWithoutBackP (const Standard_Boolean mode);
71 //! Returns True if <me> is Ordered
72 Standard_EXPORT Standard_Boolean IsOrdered() const;
74 //! Returns True if <me> is WithoutBackP
75 Standard_EXPORT Standard_Boolean IsWithoutBackP() const;
77 //! Enforce a new value for the type and form
78 Standard_EXPORT void SetUser (const Standard_Integer type, const Standard_Integer form);
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);
85 //! returns the number of IGESEntities in the Group
86 Standard_EXPORT Standard_Integer NbEntities() const;
88 //! returns the specific entity from the Group
89 Standard_EXPORT Handle(IGESData_IGESEntity) Entity (const Standard_Integer Index) const;
91 //! returns the specific entity from the Group
92 Standard_EXPORT Handle(Standard_Transient) Value (const Standard_Integer Index) const;
94 //! Sets a new value for item <Index>
95 Standard_EXPORT void SetValue (const Standard_Integer Index, const Handle(IGESData_IGESEntity)& ent);
100 DEFINE_STANDARD_RTTIEXT(IGESBasic_Group,IGESData_IGESEntity)
110 Handle(IGESData_HArray1OfIGESEntity) theEntities;
121 #endif // _IGESBasic_Group_HeaderFile