add virtual getSize method
[ecparse.git] / CollectionReader.h
1 /**
2  * © 2008 by David Roden <droden@gmail.com>
3  */
4
5 #pragma once
6
7 #include "ReaderInput.h"
8 #include "ED2KLink.h"
9 #include "GrowingBuffer.h"
10
11 class CollectionReader {
12
13 public:
14         CollectionReader(ReaderInput* readerInput);
15         ~CollectionReader();
16
17         ED2KLink* getNextLink();
18
19 private:
20         void identifyCollectionType();
21         bool isLineBreakPresent();
22         bool ensureBufferCapacity(size_t byteCount);
23         void readMoreBytes();
24
25 private:
26         ReaderInput* readerInput;
27         GrowingBuffer growingBuffer;
28         int version;
29         bool firstLink;
30         bool isTextCollection;
31
32 };
33