Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:19:03

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_Simple_HeaderFile
0018 #define _StepData_Simple_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <StepData_FieldListN.hxx>
0024 #include <StepData_Described.hxx>
0025 #include <Standard_CString.hxx>
0026 #include <Standard_Integer.hxx>
0027 class StepData_ESDescr;
0028 class StepData_Field;
0029 class Interface_Check;
0030 class Interface_EntityIterator;
0031 
0032 //! A Simple Entity is defined by a type (which can heve super
0033 //! types) and a list of parameters
0034 class StepData_Simple : public StepData_Described
0035 {
0036 
0037 public:
0038   //! Creates a Simple Entity
0039   Standard_EXPORT StepData_Simple(const occ::handle<StepData_ESDescr>& descr);
0040 
0041   //! Returns description, as for simple
0042   Standard_EXPORT occ::handle<StepData_ESDescr> ESDescr() const;
0043 
0044   //! Returns the recorded StepType (TypeName of its ESDescr)
0045   Standard_EXPORT const char* StepType() const;
0046 
0047   //! Returns False
0048   Standard_EXPORT bool IsComplex() const override;
0049 
0050   //! Tells if a step type is matched by <me>
0051   //! For a Simple Entity : own type or super type
0052   //! For a Complex Entity : one of the members
0053   Standard_EXPORT bool Matches(const char* const steptype) const override;
0054 
0055   //! Returns a Simple Entity which matches with a Type in <me> :
0056   //! For a Simple Entity : me if it matches, else a null handle
0057   //! For a Complex Entity : the member which matches, else null
0058   Standard_EXPORT occ::handle<StepData_Simple> As(const char* const steptype) const override;
0059 
0060   //! Tells if a Field brings a given name
0061   Standard_EXPORT bool HasField(const char* const name) const override;
0062 
0063   //! Returns a Field from its name; read-only
0064   Standard_EXPORT const StepData_Field& Field(const char* const name) const override;
0065 
0066   //! Returns a Field from its name; read or write
0067   Standard_EXPORT StepData_Field& CField(const char* const name) override;
0068 
0069   //! Returns the count of fields
0070   Standard_EXPORT int NbFields() const;
0071 
0072   //! Returns a field from its rank, for read-only use
0073   Standard_EXPORT const StepData_Field& FieldNum(const int num) const;
0074 
0075   //! Returns a field from its rank, in order to modify it
0076   Standard_EXPORT StepData_Field& CFieldNum(const int num);
0077 
0078   //! Returns the entire field list, read-only
0079   Standard_EXPORT const StepData_FieldListN& Fields() const;
0080 
0081   //! Returns the entire field list, read or write
0082   Standard_EXPORT StepData_FieldListN& CFields();
0083 
0084   //! Fills a Check by using its Description
0085   Standard_EXPORT void Check(occ::handle<Interface_Check>& ach) const override;
0086 
0087   //! Fills an EntityIterator with entities shared by <me>
0088   Standard_EXPORT void Shared(Interface_EntityIterator& list) const override;
0089 
0090   DEFINE_STANDARD_RTTIEXT(StepData_Simple, StepData_Described)
0091 
0092 private:
0093   StepData_FieldListN thefields;
0094 };
0095 
0096 #endif // _StepData_Simple_HeaderFile