Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:06

0001 // Created on: 1997-05-09
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1997-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 _StepData_Plex_HeaderFile
0018 #define _StepData_Plex_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TColStd_SequenceOfTransient.hxx>
0024 #include <StepData_Described.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColStd_HSequenceOfAsciiString.hxx>
0027 class StepData_ECDescr;
0028 class StepData_Simple;
0029 class StepData_Field;
0030 class Interface_Check;
0031 class Interface_EntityIterator;
0032 
0033 
0034 class StepData_Plex;
0035 DEFINE_STANDARD_HANDLE(StepData_Plex, StepData_Described)
0036 
0037 //! A Plex (for Complex) Entity is defined as a list of Simple
0038 //! Members ("external mapping")
0039 //! The types of these members must be in alphabetic order
0040 class StepData_Plex : public StepData_Described
0041 {
0042 
0043 public:
0044 
0045   
0046   //! Creates a Plex (empty). The complete creation is made by the
0047   //! ECDescr itself, by calling Add
0048   Standard_EXPORT StepData_Plex(const Handle(StepData_ECDescr)& descr);
0049   
0050   //! Adds a member to <me>
0051   Standard_EXPORT void Add (const Handle(StepData_Simple)& member);
0052   
0053   //! Returns the Description as for a Plex
0054   Standard_EXPORT Handle(StepData_ECDescr) ECDescr() const;
0055   
0056   //! Returns False
0057   Standard_EXPORT Standard_Boolean IsComplex() const Standard_OVERRIDE;
0058   
0059   //! Tells if a step type is matched by <me>
0060   //! For a Simple Entity : own type or super type
0061   //! For a Complex Entity : one of the members
0062   Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const Standard_OVERRIDE;
0063   
0064   //! Returns a Simple Entity which matches with a Type in <me> :
0065   //! For a Simple Entity : me if it matches, else a null handle
0066   //! For a Complex Entity : the member which matches, else null
0067   Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const Standard_OVERRIDE;
0068   
0069   //! Tells if a Field brings a given name
0070   Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const Standard_OVERRIDE;
0071   
0072   //! Returns a Field from its name; read-only
0073   Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const Standard_OVERRIDE;
0074   
0075   //! Returns a Field from its name; read or write
0076   Standard_EXPORT StepData_Field& CField (const Standard_CString name) Standard_OVERRIDE;
0077   
0078   //! Returns the count of simple members
0079   Standard_EXPORT Standard_Integer NbMembers() const;
0080   
0081   //! Returns a simple member from its rank
0082   Standard_EXPORT Handle(StepData_Simple) Member (const Standard_Integer num) const;
0083   
0084   //! Returns the actual list of members types
0085   Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const;
0086   
0087   //! Fills a Check by using its Description
0088   Standard_EXPORT void Check (Handle(Interface_Check)& ach) const Standard_OVERRIDE;
0089   
0090   //! Fills an EntityIterator with entities shared by <me>
0091   Standard_EXPORT void Shared (Interface_EntityIterator& list) const Standard_OVERRIDE;
0092 
0093 
0094 
0095 
0096   DEFINE_STANDARD_RTTIEXT(StepData_Plex,StepData_Described)
0097 
0098 protected:
0099 
0100 
0101 
0102 
0103 private:
0104 
0105 
0106   TColStd_SequenceOfTransient themembers;
0107 
0108 
0109 };
0110 
0111 
0112 
0113 
0114 
0115 
0116 
0117 #endif // _StepData_Plex_HeaderFile