Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:20:31

0001 // Created on: 1992-04-07
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1992-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 _IGESData_UndefinedEntity_HeaderFile
0018 #define _IGESData_UndefinedEntity_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 #include <IGESData_DefType.hxx>
0026 #include <IGESData_DefList.hxx>
0027 class Interface_UndefinedContent;
0028 class IGESData_IGESReaderData;
0029 class IGESData_DirPart;
0030 class Interface_Check;
0031 class IGESData_ParamReader;
0032 class IGESData_IGESWriter;
0033 
0034 //! undefined (unknown or error) entity specific of IGES
0035 //! DirPart can be correct or not : if it is not, a flag indicates
0036 //! it, and each corrupted field has an associated error flag
0037 class IGESData_UndefinedEntity : public IGESData_IGESEntity
0038 {
0039 
0040 public:
0041   //! creates an unknown entity
0042   Standard_EXPORT IGESData_UndefinedEntity();
0043 
0044   //! Returns own data as an UndefinedContent
0045   Standard_EXPORT occ::handle<Interface_UndefinedContent> UndefinedContent() const;
0046 
0047   //! Returns own data as an UndefinedContent, in order to touch it
0048   Standard_EXPORT occ::handle<Interface_UndefinedContent> ChangeableContent();
0049 
0050   //! Redefines a completely new UndefinedContent
0051   //! Used by a Copy which begins by ShallowCopy, for instance
0052   Standard_EXPORT void SetNewContent(const occ::handle<Interface_UndefinedContent>& cont);
0053 
0054   //! says if DirPart is OK or not (if not, it is erroneous)
0055   //! Note that if it is not, Def* methods can return Error status
0056   Standard_EXPORT bool IsOKDirPart() const;
0057 
0058   //! returns Directory Error Status (used for Copy)
0059   Standard_EXPORT int DirStatus() const;
0060 
0061   //! Erases the Directory Error Status
0062   //! Warning : Be sure that data are consistent to call this method ...
0063   Standard_EXPORT void SetOKDirPart();
0064 
0065   //! returns Error status if necessary, else calls original method
0066   Standard_EXPORT IGESData_DefType DefLineFont() const override;
0067 
0068   //! returns Error status if necessary, else calls original method
0069   Standard_EXPORT IGESData_DefList DefLevel() const override;
0070 
0071   //! returns Error status if necessary, else calls original method
0072   Standard_EXPORT IGESData_DefList DefView() const override;
0073 
0074   //! returns Error status if necessary, else calls original method
0075   Standard_EXPORT IGESData_DefType DefColor() const override;
0076 
0077   //! returns Error status if necessary, else calls original method
0078   //! (that is, if SubScript field is not blank or positive integer)
0079   Standard_EXPORT bool HasSubScriptNumber() const override;
0080 
0081   //! Computes the Directory Error Status, to be called before
0082   //! standard ReadDir from IGESReaderTool
0083   //! Returns True if OK (hence, Directory can be loaded),
0084   //! Else returns False and the DirPart <DP> is modified
0085   //! (hence, Directory Error Status is non null; and standard Read
0086   //! will work with an acceptable DirectoryPart)
0087   Standard_EXPORT virtual bool ReadDir(const occ::handle<IGESData_IGESReaderData>& IR,
0088                                        IGESData_DirPart&                           DP,
0089                                        occ::handle<Interface_Check>&               ach);
0090 
0091   //! reads own parameters from file; PR gives access to them, IR
0092   //! detains parameter types and values
0093   //! Here, reads all parameters, integers are considered as entity
0094   //! reference unless they cannot be; no list interpretation
0095   //! No property or associativity list is managed
0096   Standard_EXPORT virtual void ReadOwnParams(const occ::handle<IGESData_IGESReaderData>& IR,
0097                                              IGESData_ParamReader&                       PR);
0098 
0099   //! writes parameters to IGESWriter, taken from UndefinedContent
0100   Standard_EXPORT virtual void WriteOwnParams(IGESData_IGESWriter& IW) const;
0101 
0102   DEFINE_STANDARD_RTTIEXT(IGESData_UndefinedEntity, IGESData_IGESEntity)
0103 
0104 private:
0105   int                                     thedstat;
0106   occ::handle<Interface_UndefinedContent> thecont;
0107 };
0108 
0109 #endif // _IGESData_UndefinedEntity_HeaderFile