|
||||
File indexing completed on 2025-01-18 10:03:54
0001 // Created on: 1993-11-04 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1993-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 _IFSelect_SessionDumper_HeaderFile 0018 #define _IFSelect_SessionDumper_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 class IFSelect_SessionFile; 0025 class TCollection_AsciiString; 0026 0027 0028 class IFSelect_SessionDumper; 0029 DEFINE_STANDARD_HANDLE(IFSelect_SessionDumper, Standard_Transient) 0030 0031 //! A SessionDumper is called by SessionFile. It takes into 0032 //! account a set of classes (such as Selections, Dispatches ...). 0033 //! SessionFile writes the Type (as defined by cdl) of each Item 0034 //! and its general Parameters. It manages the names of the Items. 0035 //! 0036 //! A SessionDumper must be able to Write the Parameters which are 0037 //! own of each Item it takes into account, given its Class, then 0038 //! to Recognize the Type and Read its Own Parameters to create 0039 //! an Item of this Type with these own Parameters. 0040 //! 0041 //! Then, there must be defined one sub-type of SessionDumper per 0042 //! consistent set of classes (e.g. a package). 0043 //! 0044 //! By Own Parameters, understand Parameters given at Creation Time 0045 //! if there are, or specific of a given class, apart from those 0046 //! defined at superclass levels (e.g. Final Selection for a 0047 //! Dispatch, Input Selection for a SelectExtract or SelectDeduct, 0048 //! Direct Status for a SelectExtract, etc...). 0049 //! 0050 //! The Parameters are those stored in a WorkSession, they can be 0051 //! of Types : IntParam, HAsciiString (for TextParam), Selection, 0052 //! Dispatch. 0053 //! 0054 //! SessionDumpers are organized in a Library which is used by 0055 //! SessionFile. They are put at Creation Time in this Library. 0056 class IFSelect_SessionDumper : public Standard_Transient 0057 { 0058 0059 public: 0060 0061 0062 //! Returns the First item of the Library of Dumper. The Next ones 0063 //! are then obtained by Next on the returned items 0064 Standard_EXPORT static Handle(IFSelect_SessionDumper) First(); 0065 0066 //! Returns the Next SesionDumper in the Library. Returns a Null 0067 //! Handle at the End. 0068 Standard_EXPORT Handle(IFSelect_SessionDumper) Next() const; 0069 0070 //! Writes the Own Parameters of a given Item, if it forecast to 0071 //! manage its Type. 0072 //! Returns True if it has recognized the Type of the Item (in 0073 //! this case, it is assumed to have written the Own Parameters if 0074 //! there are some), False else : in that case, SessionFile will 0075 //! try another SessionDumper in the Library. 0076 //! WriteOwn can use these methods from SessionFile : SendVoid, 0077 //! SendItem, SendText, and if necessary, WorkSession. 0078 Standard_EXPORT virtual Standard_Boolean WriteOwn (IFSelect_SessionFile& file, const Handle(Standard_Transient)& item) const = 0; 0079 0080 //! Recognizes a Type (given as <type>) then Creates an Item of 0081 //! this Type with the Own Parameter, as required. 0082 //! Returns True if it has recognized the Type (in this case, it 0083 //! is assumed to have created the Item, returned as <item>), 0084 //! False else : in that case, SessionFile will try another 0085 //! SessionDumper in the Library. 0086 //! ReadOwn can use these methods from SessionFile to access Own 0087 //! Parameters : NbOwnParams, IsVoid, IsText, TextValue, ItemValue 0088 Standard_EXPORT virtual Standard_Boolean ReadOwn (IFSelect_SessionFile& file, const TCollection_AsciiString& type, Handle(Standard_Transient)& item) const = 0; 0089 0090 0091 0092 0093 DEFINE_STANDARD_RTTIEXT(IFSelect_SessionDumper,Standard_Transient) 0094 0095 protected: 0096 0097 0098 //! The Initialization puts a just created SessionDumper in the 0099 //! Library of SessionDumper. Then, it suffices to create once 0100 //! a SessionDumper to fill the Library with it 0101 Standard_EXPORT IFSelect_SessionDumper(); 0102 0103 0104 0105 private: 0106 0107 0108 Handle(IFSelect_SessionDumper) thenext; 0109 0110 0111 }; 0112 0113 0114 0115 0116 0117 0118 0119 #endif // _IFSelect_SessionDumper_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |