~ubuntu-branches/ubuntu/vivid/btanks/vivid

« back to all changes in this revision

Viewing changes to .pc/ftbfs-gcc-4.7.diff/mrt/base_file.h

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs, Ansgar Burchardt, Vincent Legout
  • Date: 2012-05-31 02:47:36 UTC
  • mfrom: (4.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120531024736-7glpvivk7wifchao
Tags: 0.9.8083-4
* Team upload.

[ Ansgar Burchardt ]
* Use XZ compression for binary packages.

[ Vincent Legout ]
* Build-Depends on zlib1g-dev, fix FTBFS (Closes: #669518)
* Fix Vcs-Browser field
* debian/patches/remove_default_optimizations.patch: Add DEP-3 header

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __MRT_BASEFILE__
2
 
#define __MRT_BASEFILE__
3
 
 
4
 
/* M-runtime for c++
5
 
 * Copyright (C) 2005-2008 Vladimir Menshakov
6
 
 *
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Lesser General Public
9
 
 * License as published by the Free Software Foundation; either
10
 
 * version 2.1 of the License, or (at your option) any later version.
11
 
 
12
 
 * This library is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * Lesser General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU Lesser General Public
18
 
 * License along with this library; if not, write to the Free Software
19
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
 
*/
21
 
 
22
 
#include <string>
23
 
#include "export_mrt.h"
24
 
 
25
 
namespace mrt {
26
 
 
27
 
class Chunk;
28
 
 
29
 
class MRTAPI BaseFile {
30
 
public: 
31
 
        virtual ~BaseFile();
32
 
 
33
 
        void read_all(std::string &str) const;
34
 
        void read_all(Chunk &ch) const;
35
 
        void write_all(const Chunk &ch) const;
36
 
        void write_all(const std::string &str) const;
37
 
 
38
 
        virtual void open(const std::string &fname, const std::string &mode) = 0;
39
 
        virtual bool opened() const = 0;
40
 
        
41
 
        virtual void seek(long offset, int whence) const = 0;
42
 
        virtual long tell() const = 0;
43
 
        virtual void write(const Chunk &ch) const = 0;
44
 
 
45
 
        virtual const off_t get_size() const = 0;
46
 
        virtual const size_t read(void *buf, const size_t size) const = 0;
47
 
        virtual void close();
48
 
        
49
 
        virtual bool eof() const = 0;
50
 
 
51
 
        virtual bool readline(std::string &str, const size_t bufsize = 1024) const; //default 1-byte read implementation
52
 
 
53
 
        void readLE16(int &x) const;
54
 
        void readLE32(int &x) const;
55
 
        void readLE16(unsigned int &x) const;
56
 
        void readLE32(unsigned int &x) const;
57
 
 
58
 
};
59
 
 
60
 
}
61
 
#endif