|
||||
File indexing completed on 2025-01-18 10:04:08
0001 // Created on: 1992-10-29 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 _Interface_ParamSet_HeaderFile 0018 #define _Interface_ParamSet_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_PCharacter.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <Standard_Transient.hxx> 0026 #include <Interface_ParamType.hxx> 0027 class Interface_ParamList; 0028 class Interface_FileParameter; 0029 0030 0031 class Interface_ParamSet; 0032 DEFINE_STANDARD_HANDLE(Interface_ParamSet, Standard_Transient) 0033 0034 //! Defines an ordered set of FileParameters, in a way to be 0035 //! efficient as in memory requirement or in speed 0036 class Interface_ParamSet : public Standard_Transient 0037 { 0038 0039 public: 0040 0041 0042 //! Creates an empty ParamSet, beginning at number "nst" and of 0043 //! initial reservation "nres" : the "nres" first parameters 0044 //! which follow "ndeb" (included) will be put in an Array 0045 //! (a ParamList). The remainders are set in Next(s) ParamSet(s) 0046 Standard_EXPORT Interface_ParamSet(const Standard_Integer nres, const Standard_Integer nst = 1); 0047 0048 //! Adds a parameter defined as its Value (CString and length) and 0049 //! Type. Optional EntityNumber (for FileReaderData) can be given 0050 //! Allows a better memory management than Appending a 0051 //! complete FileParameter 0052 //! If <lnval> < 0, <val> is assumed to be managed elsewhere : its 0053 //! address is stored as such. Else, <val> is copied in a locally 0054 //! (quickly) managed Page of Characters 0055 //! Returns new count of recorded Parameters 0056 Standard_EXPORT Standard_Integer Append (const Standard_CString val, const Standard_Integer lnval, const Interface_ParamType typ, const Standard_Integer nument); 0057 0058 //! Adds a parameter at the end of the ParamSet (transparent 0059 //! about reservation and "Next") 0060 //! Returns new count of recorded Parameters 0061 Standard_EXPORT Standard_Integer Append (const Interface_FileParameter& FP); 0062 0063 //! Returns the total count of parameters (including nexts) 0064 Standard_EXPORT Standard_Integer NbParams() const; 0065 0066 //! Returns a parameter identified by its number 0067 Standard_EXPORT const Interface_FileParameter& Param (const Standard_Integer num) const; 0068 0069 //! Same as above, but in order to be modified on place 0070 Standard_EXPORT Interface_FileParameter& ChangeParam (const Standard_Integer num); 0071 0072 //! Changes a parameter identified by its number 0073 Standard_EXPORT void SetParam (const Standard_Integer num, const Interface_FileParameter& FP); 0074 0075 //! Builds and returns the sub-list corresponding to parameters, 0076 //! from "num" included, with count "nb" 0077 //! If <num> and <nb> are zero, returns the whole list 0078 Standard_EXPORT Handle(Interface_ParamList) Params (const Standard_Integer num, const Standard_Integer nb) const; 0079 0080 //! Destructor (waiting for transparent memory management) 0081 Standard_EXPORT void Destroy(); 0082 ~Interface_ParamSet() 0083 { 0084 Destroy(); 0085 } 0086 0087 0088 0089 DEFINE_STANDARD_RTTIEXT(Interface_ParamSet,Standard_Transient) 0090 0091 protected: 0092 0093 0094 0095 0096 private: 0097 0098 0099 Standard_PCharacter theval; 0100 Standard_Integer thelnval; 0101 Standard_Integer thelnres; 0102 Standard_Integer thenbpar; 0103 Standard_Integer themxpar; 0104 Handle(Interface_ParamList) thelist; 0105 Handle(Interface_ParamSet) thenext; 0106 0107 0108 }; 0109 0110 0111 0112 0113 0114 0115 0116 #endif // _Interface_ParamSet_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |