1 // Created on: 1992-04-07
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESData_UndefinedEntity_HeaderFile
18 #define _IGESData_UndefinedEntity_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <IGESData_IGESEntity.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <IGESData_DefType.hxx>
27 #include <IGESData_DefList.hxx>
28 class Interface_UndefinedContent;
29 class IGESData_IGESReaderData;
30 class IGESData_DirPart;
31 class Interface_Check;
32 class IGESData_ParamReader;
33 class IGESData_IGESWriter;
36 class IGESData_UndefinedEntity;
37 DEFINE_STANDARD_HANDLE(IGESData_UndefinedEntity, IGESData_IGESEntity)
39 //! undefined (unknown or error) entity specific of IGES
40 //! DirPart can be correct or not : if it is not, a flag indicates
41 //! it, and each corrupted field has an associated error flag
42 class IGESData_UndefinedEntity : public IGESData_IGESEntity
48 //! creates an unknown entity
49 Standard_EXPORT IGESData_UndefinedEntity();
51 //! Returns own data as an UndefinedContent
52 Standard_EXPORT Handle(Interface_UndefinedContent) UndefinedContent() const;
54 //! Returns own data as an UndefinedContent, in order to touch it
55 Standard_EXPORT Handle(Interface_UndefinedContent) ChangeableContent();
57 //! Redefines a completely new UndefinedContent
58 //! Used by a Copy which begins by ShallowCopy, for instance
59 Standard_EXPORT void SetNewContent (const Handle(Interface_UndefinedContent)& cont);
61 //! says if DirPart is OK or not (if not, it is erroneous)
62 //! Note that if it is not, Def* methods can return Error status
63 Standard_EXPORT Standard_Boolean IsOKDirPart() const;
65 //! returns Directory Error Status (used for Copy)
66 Standard_EXPORT Standard_Integer DirStatus() const;
68 //! Erases the Directory Error Status
69 //! Warning : Be sure that data are consistent to call this method ...
70 Standard_EXPORT void SetOKDirPart();
72 //! returns Error status if necessary, else calls original method
73 Standard_EXPORT virtual IGESData_DefType DefLineFont() const Standard_OVERRIDE;
75 //! returns Error status if necessary, else calls original method
76 Standard_EXPORT virtual IGESData_DefList DefLevel() const Standard_OVERRIDE;
78 //! returns Error status if necessary, else calls original method
79 Standard_EXPORT virtual IGESData_DefList DefView() const Standard_OVERRIDE;
81 //! returns Error status if necessary, else calls original method
82 Standard_EXPORT virtual IGESData_DefType DefColor() const Standard_OVERRIDE;
84 //! returns Error status if necessary, else calls original method
85 //! (that is, if SubScript field is not blank or positive integer)
86 Standard_EXPORT virtual Standard_Boolean HasSubScriptNumber() const Standard_OVERRIDE;
88 //! Computes the Directory Error Status, to be called before
89 //! standard ReadDir from IGESReaderTool
90 //! Returns True if OK (hence, Directory can be loaded),
91 //! Else returns False and the DirPart <DP> is modified
92 //! (hence, Directory Error Status is non null; and standard Read
93 //! will work with an acceptable DirectoryPart)
94 Standard_EXPORT virtual Standard_Boolean ReadDir (const Handle(IGESData_IGESReaderData)& IR, IGESData_DirPart& DP, Handle(Interface_Check)& ach);
96 //! reads own parameters from file; PR gives access to them, IR
97 //! detains parameter types and values
98 //! Here, reads all parameters, integers are considered as entity
99 //! reference unless they cannot be; no list interpretation
100 //! No property or associativity list is managed
101 Standard_EXPORT virtual void ReadOwnParams (const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR);
103 //! writes parameters to IGESWriter, taken from UndefinedContent
104 Standard_EXPORT virtual void WriteOwnParams (IGESData_IGESWriter& IW) const;
109 DEFINE_STANDARD_RTTIEXT(IGESData_UndefinedEntity,IGESData_IGESEntity)
119 Standard_Integer thedstat;
120 Handle(Interface_UndefinedContent) thecont;
131 #endif // _IGESData_UndefinedEntity_HeaderFile