Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:17:29

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( Arun MENON )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESBasic_Group_HeaderFile
0018 #define _IGESBasic_Group_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <IGESData_IGESEntity.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <Standard_Integer.hxx>
0026 class Standard_Transient;
0027 
0028 //! defines Group, Type <402> Form <1>
0029 //! in package IGESBasic
0030 //! The Group Associativity allows a collection of a set
0031 //! of entities to be maintained as a single, logical
0032 //! entity
0033 //!
0034 //! Group, OrderedGroup, GroupWithoutBackP, OrderedGroupWithoutBackP
0035 //! share the same definition (class Group), form number changes
0036 //!
0037 //! non Ordered, non WithoutBackP : form  1
0038 //! non Ordered,     WithoutBackP : form  7
0039 //! Ordered, non WithoutBackP : form 14
0040 //! Ordered,     WithoutBackP : form 15
0041 class IGESBasic_Group : public IGESData_IGESEntity
0042 {
0043 
0044 public:
0045   Standard_EXPORT IGESBasic_Group();
0046 
0047   //! Creates a Group with a predefined count of items
0048   //! (which all start as null)
0049   Standard_EXPORT IGESBasic_Group(const int nb);
0050 
0051   //! This method is used to set the fields of the class Group
0052   //! - allEntities : Used to store pointers to members of
0053   //! the Group.
0054   Standard_EXPORT void Init(
0055     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& allEntities);
0056 
0057   //! Sets a Group to be, or not to be Ordered (according mode)
0058   Standard_EXPORT void SetOrdered(const bool mode);
0059 
0060   //! Sets a Group to be, or not to be WithoutBackP
0061   Standard_EXPORT void SetWithoutBackP(const bool mode);
0062 
0063   //! Returns True if <me> is Ordered
0064   Standard_EXPORT bool IsOrdered() const;
0065 
0066   //! Returns True if <me> is WithoutBackP
0067   Standard_EXPORT bool IsWithoutBackP() const;
0068 
0069   //! Enforce a new value for the type and form
0070   Standard_EXPORT void SetUser(const int type, const int form);
0071 
0072   //! Changes the count of item
0073   //! If greater, new items are null
0074   //! If lower, old items are lost
0075   Standard_EXPORT void SetNb(const int nb);
0076 
0077   //! returns the number of IGESEntities in the Group
0078   Standard_EXPORT int NbEntities() const;
0079 
0080   //! returns the specific entity from the Group
0081   Standard_EXPORT occ::handle<IGESData_IGESEntity> Entity(const int Index) const;
0082 
0083   //! returns the specific entity from the Group
0084   Standard_EXPORT occ::handle<Standard_Transient> Value(const int Index) const;
0085 
0086   //! Sets a new value for item <Index>
0087   Standard_EXPORT void SetValue(const int Index, const occ::handle<IGESData_IGESEntity>& ent);
0088 
0089   DEFINE_STANDARD_RTTIEXT(IGESBasic_Group, IGESData_IGESEntity)
0090 
0091 private:
0092   occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>> theEntities;
0093 };
0094 
0095 #endif // _IGESBasic_Group_HeaderFile