123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #pragma once
- #include "ReferenceCounter.h"
- namespace Framework
- {
- class Text;
- class StreamReader
- {
- public:
-
-
-
-
- virtual void lese(char* bytes, int len) = 0;
-
-
- virtual Text* leseZeile() = 0;
-
-
- virtual bool istEnde() const = 0;
- };
- class Reader : public StreamReader
- {
- public:
-
-
-
-
- virtual void setLPosition(__int64 pos, bool ende) = 0;
-
-
-
- virtual __int64 getLPosition() const = 0;
-
- virtual __int64 getSize() const = 0;
- };
- class ByteArrayReader : public Reader,
- public ReferenceCounter
- {
- private:
- int length;
- const char* buffer;
- bool deleteBuffer;
- int position;
- public:
-
-
-
-
- DLLEXPORT ByteArrayReader(
- const char* buffer, int length, bool deleteBuffer);
- DLLEXPORT ~ByteArrayReader();
-
-
-
-
- DLLEXPORT void lese(char* bytes, int len) override;
-
-
- DLLEXPORT Text* leseZeile() override;
-
-
- DLLEXPORT bool istEnde() const override;
-
-
-
-
- DLLEXPORT void setLPosition(__int64 pos, bool ende) override;
-
-
-
- DLLEXPORT __int64 getLPosition() const override;
-
- DLLEXPORT __int64 getSize() const override;
- };
- }
|