Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/StepData_Plex.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 <Standard_Transient.hxx>
0024 #include <NCollection_Sequence.hxx>
0025 #include <StepData_Described.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TCollection_AsciiString.hxx>
0028 #include <NCollection_HSequence.hxx>
0029 class StepData_ECDescr;
0030 class StepData_Simple;
0031 class StepData_Field;
0032 class Interface_Check;
0033 class Interface_EntityIterator;
0034 
0035 //! A Plex (for Complex) Entity is defined as a list of Simple
0036 //! Members ("external mapping")
0037 //! The types of these members must be in alphabetic order
0038 class StepData_Plex : public StepData_Described
0039 {
0040 
0041 public:
0042   //! Creates a Plex (empty). The complete creation is made by the
0043   //! ECDescr itself, by calling Add
0044   Standard_EXPORT StepData_Plex(const occ::handle<StepData_ECDescr>& descr);
0045 
0046   //! Adds a member to <me>
0047   Standard_EXPORT void Add(const occ::handle<StepData_Simple>& member);
0048 
0049   //! Returns the Description as for a Plex
0050   Standard_EXPORT occ::handle<StepData_ECDescr> ECDescr() const;
0051 
0052   //! Returns False
0053   Standard_EXPORT bool IsComplex() const override;
0054 
0055   //! Tells if a step type is matched by <me>
0056   //! For a Simple Entity : own type or super type
0057   //! For a Complex Entity : one of the members
0058   Standard_EXPORT bool Matches(const char* const steptype) const override;
0059 
0060   //! Returns a Simple Entity which matches with a Type in <me> :
0061   //! For a Simple Entity : me if it matches, else a null handle
0062   //! For a Complex Entity : the member which matches, else null
0063   Standard_EXPORT occ::handle<StepData_Simple> As(const char* const steptype) const override;
0064 
0065   //! Tells if a Field brings a given name
0066   Standard_EXPORT bool HasField(const char* const name) const override;
0067 
0068   //! Returns a Field from its name; read-only
0069   Standard_EXPORT const StepData_Field& Field(const char* const name) const override;
0070 
0071   //! Returns a Field from its name; read or write
0072   Standard_EXPORT StepData_Field& CField(const char* const name) override;
0073 
0074   //! Returns the count of simple members
0075   Standard_EXPORT int NbMembers() const;
0076 
0077   //! Returns a simple member from its rank
0078   Standard_EXPORT occ::handle<StepData_Simple> Member(const int num) const;
0079 
0080   //! Returns the actual list of members types
0081   Standard_EXPORT occ::handle<NCollection_HSequence<TCollection_AsciiString>> TypeList() const;
0082 
0083   //! Fills a Check by using its Description
0084   Standard_EXPORT void Check(occ::handle<Interface_Check>& ach) const override;
0085 
0086   //! Fills an EntityIterator with entities shared by <me>
0087   Standard_EXPORT void Shared(Interface_EntityIterator& list) const override;
0088 
0089   DEFINE_STANDARD_RTTIEXT(StepData_Plex, StepData_Described)
0090 
0091 private:
0092   NCollection_Sequence<occ::handle<Standard_Transient>> themembers;
0093 };
0094 
0095 #endif // _StepData_Plex_HeaderFile