|
||||
File indexing completed on 2025-01-18 10:04:07
0001 // Created on: 1992-02-03 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_FileParameter_HeaderFile 0018 #define _Interface_FileParameter_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Interface_ParamType.hxx> 0025 #include <Standard_PCharacter.hxx> 0026 class TCollection_AsciiString; 0027 0028 0029 //! Auxiliary class to store a literal parameter in a file 0030 //! intermediate directory or in an UndefinedContent : a reference 0031 //! type Parameter detains an Integer which is used to address a 0032 //! record in the directory. 0033 //! FileParameter is intended to be stored in a ParamSet : hence 0034 //! memory management is performed by ParamSet, which calls Clear 0035 //! to work, while the Destructor (see Destroy) does nothing. 0036 //! Also a FileParameter can be read for consultation only, not to 0037 //! be read from a Structure to be included into another one. 0038 class Interface_FileParameter 0039 { 0040 public: 0041 0042 DEFINE_STANDARD_ALLOC 0043 0044 0045 Standard_EXPORT Interface_FileParameter(); 0046 0047 //! Fills fields (with Entity Number set to zero) 0048 Standard_EXPORT void Init (const TCollection_AsciiString& val, const Interface_ParamType typ); 0049 0050 //! Same as above, but builds the Value from a CString 0051 Standard_EXPORT void Init (const Standard_CString val, const Interface_ParamType typ); 0052 0053 //! Same as above, but as a CString (for immediate exploitation) 0054 //! was C++ : return const 0055 Standard_EXPORT Standard_CString CValue() const; 0056 0057 //! Returns the type of the parameter 0058 Standard_EXPORT Interface_ParamType ParamType() const; 0059 0060 //! Allows to set a reference to an Entity in a numbered list 0061 Standard_EXPORT void SetEntityNumber (const Standard_Integer num); 0062 0063 //! Returns value set by SetEntityNumber 0064 Standard_EXPORT Standard_Integer EntityNumber() const; 0065 0066 //! Clears stored data : frees memory taken for the String Value 0067 Standard_EXPORT void Clear(); 0068 0069 //! Destructor. Does nothing because Memory is managed by ParamSet 0070 Standard_EXPORT void Destroy(); 0071 ~Interface_FileParameter() 0072 { 0073 Destroy(); 0074 } 0075 0076 0077 0078 0079 protected: 0080 0081 0082 0083 0084 0085 private: 0086 0087 0088 0089 Interface_ParamType thetype; 0090 Standard_PCharacter theval; 0091 Standard_Integer thenum; 0092 0093 0094 }; 0095 0096 0097 0098 0099 0100 0101 0102 #endif // _Interface_FileParameter_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |