]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/include/file-storage.hh
release: 1.0.1
[lilypond.git] / lib / include / file-storage.hh
index 23da07e19f37d46038de8c81b53ff91f218f5080..4e6fca65ef22d3aa5178077401d1105c2764d079 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 
 #include "proto.hh"
 
+
 /**
   store a file in-memory.
  */
 class File_storage
 {
 public:
-    virtual char const* ch_C() const=0;
-    virtual int length_i() const=0;
-    virtual ~File_storage(){}
-};
-
-/**
-  Use mmap to "copy"  a file into memory
- */
-class Mapped_file_storage:public File_storage
-{
-public:
-    Mapped_file_storage(String);    
-protected:
-    virtual char const* ch_C() const;
-    virtual int length_i() const;
-    virtual ~Mapped_file_storage();
-private:
-    void open(String name);
-    void close();
-
-    void map();
-    void unmap();
-    int fildes_i_;
-    off_t size_off_;
-    caddr_t data_caddr_;
+  virtual char const* ch_C () const=0;
+  virtual int length_i () const=0;
+  virtual ~File_storage (){}
 };
 
-/**
-  read file char by char and copy into a malloc array.
- */
-class Simple_file_storage  : public File_storage
-{
-    char * data_p_;
-    int len_i_;
-protected:    
-    virtual char const*ch_C() const;
-    virtual int length_i() const;
-    virtual ~Simple_file_storage();
-public:
-    Simple_file_storage(String);
-};
 #endif // FILE_STORAGE_HH