Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:59:19

0001 // Copyright (c) 2015 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _StdLPersistent_HString_HeaderFile
0015 #define _StdLPersistent_HString_HeaderFile
0016 
0017 #include <StdObjMgt_Persistent.hxx>
0018 
0019 #include <Standard_TypeDef.hxx>
0020 #include <TCollection_HAsciiString.hxx>
0021 #include <TCollection_HExtendedString.hxx>
0022 
0023 class StdLPersistent_HString
0024 {
0025   template <class StringClass, typename CharType>
0026   class instance : public StdObjMgt_Persistent
0027   {
0028   public:
0029     //! Read persistent data from a file.
0030     Standard_EXPORT void Read(StdObjMgt_ReadData& theReadData) override;
0031     //! Write persistent data to a file.
0032     Standard_EXPORT void Write(StdObjMgt_WriteData& theWriteData) const override;
0033 
0034     void PChildren(StdObjMgt_Persistent::SequenceOfPersistent&) const override {}
0035 
0036     //! Get/create a label defined by referenced string.
0037     Standard_EXPORT TDF_Label Label(const occ::handle<TDF_Data>& theDF) const override;
0038 
0039     //! Get the value.
0040     const occ::handle<StringClass>& Value() const { return myValue; }
0041 
0042   protected:
0043     occ::handle<StringClass> myValue;
0044   };
0045 
0046 public:
0047   class Ascii : public instance<TCollection_HAsciiString, char>
0048   {
0049   public:
0050     //! Get referenced ASCII string.
0051     Standard_EXPORT occ::handle<TCollection_HAsciiString> AsciiString() const override;
0052 
0053     inline const char* PName() const override { return "PCollection_HAsciiString"; }
0054   };
0055 
0056   class Extended : public instance<TCollection_HExtendedString, char16_t>
0057   {
0058   public:
0059     //! Get referenced extended string.
0060     Standard_EXPORT occ::handle<TCollection_HExtendedString> ExtString() const override;
0061 
0062     inline const char* PName() const override { return "PCollection_HExtendedString"; }
0063   };
0064 };
0065 
0066 #endif