TNB Library
TnbCacheReader.h
[詳解]
1#pragma once
13#include "TnbReader.h"
14#include "TnbQueue.h"
15
16
17
18//TNB Library
19namespace TNB
20{
21
22
23
34class CCacheReader : public IReader, CCopyImpposible
35{
36public:
37
38 CCacheReader(void) : m_pReader(NULL), m_minimum(100)
39 {
40 }
41
42 void SetEnvironmrent(IReport* pRep, size_t minimum = 100)
43 {
44 m_pReader = pRep;
45 m_minimum = minimum;
46 }
47
52 virtual LPCTSTR GetOpenName(void) const
53 {
54 return (m_pReader != NULL) ? m_pReport->GetOpenName() : _T("");
55 }
56
60 virtual void Close(void)
61 {
62 if ( m_pReader != NULL )
63 {
64 m_pReader->Close();
65 }
66 }
67
73 virtual bool CanRead(void) const
74 {
75 return (m_pReader != NULL) ? m_pReport->CanRead() : false;
76 }
77
83 virtual LONGLONG GetSize(void) const
84 {
85 return (m_pReader != NULL) ? m_pReport->GetSize() : 0;
86 }
87
96 virtual LONGLONG Seek(LONGLONG llOffset, ESeekMode eSeek = TOP) const
97 {
98 return (m_pReader != NULL) ? m_pReport->Seek(llOffset, eSeek) : -1;
99 }
100
108 virtual size_t Read(size_t size, LPVOID _P) const
109 {
110 return 0;
111 }
112
121 const IConstCollectionT<BYTE>& Peek(size_t size = 0, LONGLONG offset = 0) const
122 {
123 }
124
125
126
127
128
129private:
130 size_t m_minimum;
131 IReader* m_pReader;
132 LONGLONG m_pointer;
133 mutable CVectorT<BYTE> m_buffer;
134};
135
キュー型情報管理関係のヘッダ
ファイル関係のヘッダ
TNB Library
Definition: TnbDoxyTitle.txt:2
読み込みインターフェース
Definition: TnbReader.h:36
通信アクセスインターフェース
Definition: TnbReport.h:227