File: RawFile.h

package info (click to toggle)
glbinding 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,848 kB
  • ctags: 30,258
  • sloc: cpp: 255,369; xml: 46,343; python: 7,876; sh: 599; makefile: 494
file content (32 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#pragma once

#include <cstdint>
#include <string>
#include <vector>
#include <map>

class RawFile
{
public:
    RawFile(const std::string & filePath);
    virtual ~RawFile();

    RawFile & operator=(const RawFile &) = delete;

    const char * data() const;
    size_t size() const;

    bool isValid() const;
    inline const std::string & filePath() const { return m_filePath;  }

protected:
    bool readFile();
    void readRawData(std::ifstream & ifs);

protected:
    const std::string m_filePath;
    std::vector<char> m_data;

    bool m_valid;
};