libebml_ng
io_noseek.h
Go to the documentation of this file.
1 #ifndef EBML_NG_PARSEFILE_NOSEEK_H
2 #define EBML_NG_PARSEFILE_NOSEEK_H
3 
4 #include "libebml_ng/ebmlID_t.h"
5 #include "libebml_ng/io.h"
6 // #include "libebml_ng/parsing/string.h"
7 #include <memory>
8 
9 // TODO: Implement parsing from NON-seekable streams and files.
10 
11 namespace ebml {
12 // class parseFile;
13 //
14 // typedef std::shared_ptr<parseFile> parseFile_sp;
15 //
16 // class parseFile {
17 // public:
18 // class iterator;
19 // ebmlID_t ebmlID;
20 // unsigned char ebmlIDWidth;
21 // size_t dataSize;
22 // unsigned char sizeWidth;
23 // off_t offset;
24 // parseFile_sp parent;
25 // off_t dataOffset() const;
26 // off_t endOffset() const;
27 // size_t read(char*);
28 // size_t read(char*, size_t);
29 // std::shared_ptr<parseFile::iterator> begin();
30 // size_t outerSize() const;
31 // bool seekable() const;
32 // parseFile(ioBase_sp&);
33 // parseFile(ioBase_sp&, char*);
34 // parseFile(ioBase_sp&, parseFile_sp&);
35 // parseFile(ioBase_sp&, char*, parseFile_sp&);
36 // parseFile(ioBase_sp&, off_t);
37 // parseFile(ioBase_sp&, off_t, char*);
38 // parseFile(ioBase_sp&, off_t, parseFile_sp&); // Why?
39 // parseFile(ioBase_sp&, off_t, char*, parseFile_sp&); // Why?
40 // // parseFile(const parseFile&);
41 // // parseFile& operator=(const parseFile&);
42 // // virtual ~parseFile();
43 // protected:
44 // void _update_bytes_read(size_t);
45 // void _consume_remaining();
46 // private:
47 // // void _init(ioBase_sp&, off_t, char*);
48 // void _init(ioBase_sp&);
49 // void _init(ioBase_sp&, off_t);
50 // ioBase_sp _file;
51 // bool _seekable;
52 // size_t bytes_read;
53 // size_t _read_seekable(char*, size_t);
54 // size_t _read_unseekable(char*, size_t);
55 // void _cleanup();
56 // unsigned long _itercount;
57 // };
58 //
59 // typedef std::shared_ptr<parseFile::iterator> iterParseFile_sp;
60 // // std::unique_ptr<parseFileBase> parseFile(ioBase_sp&);
61 //
62 // // struct iterParseFileState;
63 //
64 // class parseFile::iterator {
65 // public:
66 // iterator(ioBase_sp& file);
67 // iterator(ioBase_sp& file, off_t end);
68 // iterator(ioBase_sp& file, off_t start, off_t end);
69 // iterator(ioBase_sp& file, off_t end, parseFile_sp&);
70 // iterator(ioBase_sp& file, off_t start, off_t end, parseFile_sp&);
71 // parseFile_sp& operator*();
72 // parseFile::iterator& operator++();
73 // // parseFile::iterator operator++(int); Postincrement not supported
74 // bool atEnd() const;
75 // bool seekable() const;
76 // private:
77 // off_t _startoffset;
78 // // off_t _offset;
79 // // off_t _nextoffset;
80 // off_t _endoffset;
81 // ioBase_sp _file;
82 // parseFile_sp _parent;
83 // parseFile_sp _next;
84 // bool _seekable;
85 // };
86 //
87 // // class iterParseFile {
88 // // FILE* _file;
89 // // unsigned long long _startoffset;
90 // // unsigned long long _offset;
91 // // unsigned long long _endoffset;
92 // // parseFileData _next;
93 // // char buffer[16];
94 // // public:
95 // // iterParseFile(void);
96 // // iterParseFile(FILE*);
97 // // iterParseFile(FILE*, unsigned long long);
98 // // // iterParseFile(FILE*, unsigned long long, unsigned long long);
99 // // iterParseFile(
100 // // FILE*, unsigned long long, unsigned long long,
101 // // unsigned long long);
102 // // parseFileData operator*(void);
103 // // iterParseFile& operator++(void);
104 // // iterParseFile operator++(int);
105 // // bool operator==(const iterParseFile&) const;
106 // // bool operator!=(const iterParseFile&) const;
107 // // };
108 }
109 #endif
Definition: basictypes.h:40