Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-03-14
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1994-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_StepDumper_HeaderFile
0018 #define _StepData_StepDumper_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Interface_GeneralLib.hxx>
0025 #include <StepData_WriterLib.hxx>
0026 #include <StepData_StepWriter.hxx>
0027 #include <Standard_Integer.hxx>
0028 class StepData_StepModel;
0029 class StepData_Protocol;
0030 
0031 //! Provides a way to dump entities processed through STEP, with
0032 //! these features :
0033 //! - same form as for writing a STEP File (because it is clear
0034 //! and compact enough, even if the names of the fields do not
0035 //! appear) : thus, no additional resource is required
0036 //! - possibility to look for an entity itself (only its Type or
0037 //! with its content), an entity and it shared items (one level)
0038 //! or all the entities its refers to, directly or recursively.
0039 class StepData_StepDumper 
0040 {
0041 public:
0042 
0043   DEFINE_STANDARD_ALLOC
0044 
0045   
0046   //! Creates a StepDumper, able to work on a given StepModel
0047   //! (which defines the total scope for dumping entities) and
0048   //! a given Protocol from Step (which defines the authorized
0049   //! types to be dumped)
0050   //! <mode> commands what is to be displayed (number or label)
0051   //! 0 for number (and corresponding labels  are displayed apart)
0052   //! 1 for label  (and corresponding numbers are displayed apart)
0053   //! 2 for label without anymore
0054   Standard_EXPORT StepData_StepDumper(const Handle(StepData_StepModel)& amodel, const Handle(StepData_Protocol)& protocol, const Standard_Integer mode = 0);
0055   
0056   //! Gives an access to the tool which is used to work : this allow
0057   //! to acts on some parameters : Floating Format, Scopes ...
0058   Standard_EXPORT StepData_StepWriter& StepWriter();
0059   
0060   //! Dumps a Entity on an Messenger. Returns True if
0061   //! success, False, if the entity to dump has not been recognized
0062   //! by the Protocol. <level> can have one of these values :
0063   //! - 0 : prints the TYPE only, as known in STEP Files (StepType)
0064   //! If <ent> has not been regognized by the Protocol, or if its
0065   //! type is Complex, the StepType is replaced by the display of
0066   //! the cdl type. Complex Type are well processed by level 1.
0067   //! - 1 : dumps the entity, completely (whatever it has simple or
0068   //! complex type) but alone.
0069   //! - 2 : dumps the entity completely, plus the item its refers to
0070   //! at first level (a header message designates the starting
0071   //! entity of the dump) <Lists Shared and Implied>
0072   //! - 3 : dumps the entity and its referred items at any levels
0073   //!
0074   //! For levels 1,2,3, the numbers displayed (form #nnn) are the
0075   //! numbers of the corresponding entities in the Model
0076   Standard_EXPORT Standard_Boolean Dump (Standard_OStream& S, const Handle(Standard_Transient)& ent, const Standard_Integer level);
0077   
0078   //! Works as Dump with a Transient, but directly takes the
0079   //! entity designated by its number in the Model
0080   //! Returns False, also if <num> is out of range
0081   Standard_EXPORT Standard_Boolean Dump (Standard_OStream& S, const Standard_Integer num, const Standard_Integer level);
0082 
0083 
0084 
0085 
0086 protected:
0087 
0088 
0089 
0090 
0091 
0092 private:
0093 
0094 
0095 
0096   Handle(StepData_StepModel) themodel;
0097   Interface_GeneralLib theslib;
0098   StepData_WriterLib thewlib;
0099   StepData_StepWriter thewriter;
0100 
0101 
0102 };
0103 
0104 
0105 
0106 
0107 
0108 
0109 
0110 #endif // _StepData_StepDumper_HeaderFile