Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-10 08:29:53

0001 // Created on: 1993-07-19
0002 // Created by: Remi LEQUETTE
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 _GeomTools_SurfaceSet_HeaderFile
0018 #define _GeomTools_SurfaceSet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColStd_IndexedMapOfTransient.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_OStream.hxx>
0027 #include <Standard_IStream.hxx>
0028 #include <Message_ProgressRange.hxx>
0029 
0030 class Geom_Surface;
0031 
0032 //! Stores a set of Surfaces from Geom.
0033 class GeomTools_SurfaceSet
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Returns an empty set of Surfaces.
0039   Standard_EXPORT GeomTools_SurfaceSet();
0040 
0041   //! Clears the content of the set.
0042   Standard_EXPORT void Clear();
0043 
0044   //! Incorporate a new Surface in the  set and returns
0045   //! its index.
0046   Standard_EXPORT Standard_Integer Add(const Handle(Geom_Surface)& S);
0047 
0048   //! Returns the Surface of index <I>.
0049   Standard_EXPORT Handle(Geom_Surface) Surface(const Standard_Integer I) const;
0050 
0051   //! Returns the index of <L>.
0052   Standard_EXPORT Standard_Integer Index(const Handle(Geom_Surface)& S) const;
0053 
0054   //! Dumps the content of me on the stream <OS>.
0055   Standard_EXPORT void Dump(Standard_OStream& OS) const;
0056 
0057   //! Writes the content of  me  on the stream <OS> in a
0058   //! format that can be read back by Read.
0059   Standard_EXPORT void Write(
0060     Standard_OStream&            OS,
0061     const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0062 
0063   //! Reads the content of me from the  stream  <IS>. me
0064   //! is first cleared.
0065   Standard_EXPORT void Read(Standard_IStream&            IS,
0066                             const Message_ProgressRange& theProgress = Message_ProgressRange());
0067 
0068   //! Dumps the surface on the stream,  if compact is True
0069   //! use the compact format that can be read back.
0070   Standard_EXPORT static void PrintSurface(const Handle(Geom_Surface)& S,
0071                                            Standard_OStream&           OS,
0072                                            const Standard_Boolean      compact = Standard_False);
0073 
0074   //! Reads the surface  from  the stream.  The  surface  is
0075   //! assumed   to have  been  written  with  the Print
0076   //! method (compact = True).
0077   Standard_EXPORT static Handle(Geom_Surface) ReadSurface(Standard_IStream& IS);
0078 
0079 private:
0080   TColStd_IndexedMapOfTransient myMap;
0081 };
0082 
0083 #endif // _GeomTools_SurfaceSet_HeaderFile