|
|
|||
File indexing completed on 2026-09-25 09:20:21
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 //! Auxiliary class to store a literal parameter in a file 0029 //! intermediate directory or in an UndefinedContent : a reference 0030 //! type Parameter detains an Integer which is used to address a 0031 //! record in the directory. 0032 //! FileParameter is intended to be stored in a ParamSet : hence 0033 //! memory management is performed by ParamSet, which calls Clear 0034 //! to work, while the Destructor (see Destroy) does nothing. 0035 //! Also a FileParameter can be read for consultation only, not to 0036 //! be read from a Structure to be included into another one. 0037 class Interface_FileParameter 0038 { 0039 public: 0040 DEFINE_STANDARD_ALLOC 0041 0042 Standard_EXPORT Interface_FileParameter(); 0043 0044 //! Fills fields (with Entity Number set to zero) 0045 Standard_EXPORT void Init(const TCollection_AsciiString& val, const Interface_ParamType typ); 0046 0047 //! Same as above, but builds the Value from a CString 0048 Standard_EXPORT void Init(const char* const val, const Interface_ParamType typ); 0049 0050 //! Same as above, but as a CString (for immediate exploitation) 0051 //! was C++ : return const 0052 Standard_EXPORT const char* CValue() const; 0053 0054 //! Returns the type of the parameter 0055 Standard_EXPORT Interface_ParamType ParamType() const; 0056 0057 //! Allows to set a reference to an Entity in a numbered list 0058 Standard_EXPORT void SetEntityNumber(const int num); 0059 0060 //! Returns value set by SetEntityNumber 0061 Standard_EXPORT int EntityNumber() const; 0062 0063 //! Clears stored data : frees memory taken for the String Value 0064 Standard_EXPORT void Clear(); 0065 0066 //! Destructor. Does nothing because Memory is managed by ParamSet 0067 Standard_EXPORT void Destroy(); 0068 0069 ~Interface_FileParameter() { Destroy(); } 0070 0071 private: 0072 Interface_ParamType thetype; 0073 Standard_PCharacter theval; 0074 int thenum; 0075 }; 0076 0077 #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 |
|