Antenna House PDF Tool API (C++) 8.0
PtlParamStream.h
1
2// PtlParamInput.h
3// Copyright (C) 2013-2025 Antenna House,Inc.
4// All rights reserved.
6#ifndef PDFTK_PTLPARAMSTREAM_H_
7#define PDFTK_PTLPARAMSTREAM_H_
8
9#include "PtlParamString.h"
10
11namespace PdfTk {
12
18class PDFTK_API PtlParamStream
19{
20protected:
21 bool m_canRead;
22 bool m_canWrite;
23
24public:
28 PtlParamStream() {m_canRead = false; m_canWrite = false;}
29
33 virtual ~PtlParamStream() {}
34
35public:
40 bool canRead() const { return m_canRead; }
41
46 bool canWrite() const { return m_canWrite; }
47
53 virtual bool open() = 0;
54
59 virtual void close() {};
60
69 virtual int read(char* pBuf, int len) {return -1;}
70
78 virtual int write(char* pBuf, int len) {return -1;}
79
92 virtual long seekoff(long off, int way, int which) {return -1;}
93
97 virtual const PtlParamString& getPath() = 0;
98};
99
100} // namespace PdfTk
101
102#endif // PDFTK_PTLPARAM_INPUT_H_
bool canRead() const
入力ストリームの読み込み可能かを取得。
virtual ~PtlParamStream()
デストラクタ
virtual int write(char *pBuf, int len)
出力ストリームの書き込み。
virtual bool open()=0
ストリームをオープン。
virtual void close()
ストリームをクローズ。
virtual long seekoff(long off, int way, int which)
入力ストリーム内の移動。
bool canWrite() const
出力ストリームの書き込み可能かを取得。
virtual const PtlParamString & getPath()=0
パスの取得。
virtual int read(char *pBuf, int len)
入力ストリームの読み込み。
PtlParamStream()
コンストラクタ