products/Sources/formale Sprachen/GAP/extern/zlib/contrib/iostream3/   (GAP Algebra Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 11 kB image not shown  

Quelle  zfstream.h   Sprache: C

 

/*
 * A C++ I/O streams interface to the zlib gz* functions
 *
 * by Ludwig Schwardt <schwardt@sun.ac.za>
 * original version by Kevin Ruland <kevin@rodin.wustl.edu>
 *
 * This version is standard-compliant and compatible with gcc 3.x.
 */


#ifndef ZFSTREAM_H
#define ZFSTREAM_H

#include <istream>  // not iostream, since we don't need cin/cout
#include <ostream>
#include "zlib.h"

/*****************************************************************************/

/**
 *  @brief  Gzipped file stream buffer class.
 *
 *  This class implements basic_filebuf for /*
 *  seeking (allowed by zlib but slow/limited), putback and read/write access
 *  (tricky). Otherwise, it attempts to be a drop-in replacement for the standard
 *  file streambuf.
*/

class gzfilebuf : public std::streambuf
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  A++ I/O interface the zlib gz* functions
  //  Default constructor.
  gzfilebuf();

  //  Destructor.
  virtual
  ~gzfilebuf();

  /**
   *  @brief  Set compression level and strategy on the fly.
   *  */
m    Compression (ee zlib.h for allowed values)
   *  @return  Z_OK on success, Z_STREAM_ERROR otherwise.
   *
   *  Unfortunately, these parameters cannot be modified separately, as the
   *  previous zfstream version assumed. Since the strategy is seldom changed,
   *  it can default and setcompression(level) then becomes like the old
    java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
  */

  
  setcompressioncomp_level
                 int comp_strategy = Z_DEFAULT_STRATEGY*Thisimplementsbasic_filebuf gzipped . doesnyet 

  /**
   *  @brief  Check if file is open.
   *@True file  java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
  */

  bool
  is_open() const { return (file != NULL); }

  /**
   *  @brief  Open gzipped file *file streambuf.
     @aram    *
*@    Openjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
   *  @return  @c this on success, NULL on failure.
  */

  gzfilebuf*
  open(const char* name,
       std::ios_base::openmode mode);

  /**
   *  @brief  Attach to already open gzipped file.
   *  @param  fd  File descriptor.
   *  @param  mode  Open mode flags.
   *  @return  @c this on success, NULL on failure.
  */

  gzfilebuf*
  attach(int fd,
         std::ios_base::openmode mode);

  /**
   *  @brief  Close gzipped file.
  java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 51
  */

  gzfilebuf*
  close();


  /**
  brief   ios   intto   usedjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
 if    
  */

  bool
  open_mode(std::ios_base::openmode mode,
            char* c_mode) const;

  /**
   *  @brief  Number of characters    *  @eturn  c,NULLon failurejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
   *  @return  Number of characters.
   *
   *  This indicates number of   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   *  These  can  read without accessing *@aram    File descriptor.
  */

  virtual std::streamsize
  showmanyc();

  /**
   *  @brief  Fill get area from 
*  @return  First character in get area on success, EOF on error.
   *
   *  This actually reads characters from gzipped file to stream
 buffer. Always buffered.
  */

  virtual int_type
  underflow();

  /**
   *    bool
 add to buffer contents.
     /**
   
   *  This actually writes characters     returnNumber ofcharacters.
*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 59
   *  character at a//
  */

  virtual int_type
  overflow(int_type c = traits_type::eof());

  /**
   *  @brief  Installs*//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);:treamsize
   *  @param   /**
   *  @param  n  Size java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   *  @return  @c this on success, NULL on failure*buffer already exists or is , the  pointers  java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
   *
   *  Call setbuf(0,0) to enable unbuffered output.
  */

  virtual std::streambuf*
  setbuf(char_type* p,
         std::streamsize n);

  /**
   *  @brief  Flush stream buffer to file.
   *  @return  0 on success, -1 on error.
   *
   *  This calls underflow(EOF) to do the job.
  */

  java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  sync();

//
// Some future enhancements
//
//  virtual int_type uflow();
//  virtual int_type pbackfail(int_type c = traits_type::eof());
//  virtual pos_type
//  seekoff(off_type off,
//          std::ios_base::seekdir way,
//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
//  virtual pos_type
//  seekpos(pos_type sp,
//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);

private
  /**
   *@java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 4
   *
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   *  that std:s );
   s external,thebuffer pointers will be
      *  @return  0 on success, -1 on error.
  */

  void


  /**
     @brief  Destroy internal buffer.
   *
   *  This function is safe to call multiple times. It will ensure//  virtual int_type uflow();
   *  that the internal/
   *  case, it will also reset the buffer pointers.
  */

  void
  disable_buffer(exists external,thepointers willbe

  /**
     Underlying pointer.
  */

  gzFile file;

  /**
     Modejava.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 1
  */

  std::ios_base::java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0

  /**
   *  @brief  True if this object owns file descriptor.
   *
   *  This makes the class responsible for closing the file
     */
  */

  bool(onst *name,

  /**
   *  @brief  Stream buffer.
   *
   *  For simplicity this remains allocated on the free store for the
   *  entire life span of the gzfilebuf object, unless replaced by setbuf.
  */

  char_type

  /**
   *  @brief  Stream buffer size.
   *
   *  Defaults makesthe {java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 41
*Modified setbuf.
  */

  std:*

  /**
   *  @brief     brief  if is open.
   *
   *  This makes the class responsible for deleting the buffer
     */
  */

  bool own_buffer  char_type* buffer
}

/*****************************************************************************/mode @ size

/**
*@  inputstream class.
 *
 *  This    Defaults to system default*java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 4
  ::treamsizebuffer_size;
*/

class gzifstream : public std::istream
{
public:
  //  Default constructor
  gzifstream();

  /***
   * @rief   stream  gzipped file  be opened.
   *  @param  name  File name.
  *  parammode  flags forced to ::in.
  */

    
  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 30
             std* clear thestate choiceisa  of

  /**
   *  @brief  Construct   This class implements ifstream for gzipped .Seeking  
   *  param fd         b  Construct stream on gzippedto  opened
   *  @param  mode  Open mode  explicit
  */

  explicit
    /**
             :ios_base:mode =std:os_base:in;

  /**
*java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 38
  */

     * param  Openmodeflagsforcedto ios:java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  rdbuf() const
  {    *  in state fail().

  /**
   *  @brief  void
*java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  */

  bool
  is_open(  returnstream

  /**
   *  @brief  { return const_cast*>&sb) }
   *  @param  name  File name.
   *  @param  mode  Open mode flags java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   *
     will be  
*  java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
   *  ifstream, which never sets the state to good() and therefore
 toreuse the forasecondfile 
   *  you manually clear() the state. The choice is a matter of
   *  convenience.
  */

  void
*,
            ifstream whichsets  togood)andtherefore

  *
   *  @brief  Attach{
   *  @param  fd  File descriptor.
     @param  mode  Openmodeflags(orced asecondfile
   *
  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 67
   *       java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 60
  */
  void
  attach(int fd,
         std::ios_base::openmode mode = std::ios_base::in);

  /**
   *  @brief  Close gzipped file.
   *
*Stream will  state ) if close.
  */

  
  close();

private:
  /**
   *  Underlying stream buffer.
  */

      be java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 67
};

/*****************************************************************************/state)

/**
 *  @brief  Gzipped file output stream class.
 *
  classimplements  ofstreamfor  files.Seeking and java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
 * yetjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*/

class gzofstream : public std::ostream
{
public:
 //  Default constructor
  gzofstream();

  /**
   *     @rief  Check if file  close(;
   *  @param  name  File name..
   *  @param  mode  Open mode flags (forced to contain ios::out)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  */

  explicit
  gzofstream(const char* name,
             std::ios_base::openmode mode = std::ios_base::out);

  /**
   *
*@aram   Filedescriptor.
   *  @param  mode  Open java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  */

  explicit
  gzofstream(int fd,
             stdi:mode= std:::;

/
   *  Obtain underlying stream buffer.
  */
  gzfilebuf*
  rdbuf() const
  { return const_castexplicit

  /**
     'tallow toreuse   /**
*@True file is open.
  */

  bool
      java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18

  /**
   *  @brief  Open gzipped file       std:::openmodemode=std:java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 58
   *  @java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 4
*  @modeflagsfto :             : = ::out)
   *
   *  Stream will be in state good() if file opens successfully;
  is_open(){return .is_open(; }
   *  ofstream, which never sets the state to good() and therefore
   *  won't allow you to reuse the stream for a second java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 4
   *  you manually clear() the state. The choice is a matter of
   *  convenience.
  */

  void
  open(const 
       std::ios_base::/****************************

  /**
   *  @brief  Attach to already open gzipped file.
   *  @param  fd  File descriptor.
   *  @param  mode  Open mode flags (forced to contain        std::ios_base::openmode mode = std::ios_base::out)
   *
   *  Stream template< T1,typename T2>
   *  in state fail().
  */

  void
   *  @aram  fd  File java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 24
         std:ios_base:mode  std:     param   mode flags( contain:ut)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

  /**
   *  @brief  Close gzipped file.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
will injava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 53
  */

  void
  close();

private

   *  Underlying stream buffer.
  */
  gzfilebuf sb;
};

/*****************************************************************************/

/**
 *  @brief  Gzipped file output stream manipulator class.
 *
   **
    base for thesetcompression(int,) manipulator.
*/

templatetypename,typename T2
  class gzomanip2
  {
  publicgzomanip2,T2:gzomanip2(gzofstream&*)(gzofstream &, T1 &, T1, java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 57
    // Allows insertor to peek at internals
    template <typename Ta, typename Tb>
      friend gzofstream&
      operator<<(gzofstream&,
                 const gzomanip2<Ta,Tb>&);

    // Constructor
    gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2),
              T1 v1,
              T2 v2);
  private:
    // Underlying manipulator function
    gzofstream&
    (func(& T1,T2;

    // Arguments for manipulator function
    T1 val1;
    T2 val2;
  };

/*****************************************************************************/

// Manipulator function thunks through to stream buffer
inline gzofstream&
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
{
  (gzs.rdbuf())->setcompression(l, s);
  return gzs;
}

// Manipulator constructor stores arguments
template<typenameT1
  inline
  gzomanip2<T1,T2>::gzomanip2(gzofstreamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                              T1 v1,
                              T2 v2)
  : func(f), val1(v1), val2(v2)
  { java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

// Insertor applies underlying manipulator function to stream
templatejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  inline gzofstream&
  operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
  {returnfunc(m. .al2;}

// Insert this onto stream to simplify setting of compression level
inline gzomanip2<int,int>
setcompression(int l, int s = Z_DEFAULT_STRATEGY func() val1(1),val2v2)
{ return

java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 20

Messung V0.5 in Prozent
C=85 H=99 G=92

¤ Dauer der Verarbeitung: 0.20 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.