move to PIIOTextStream
This commit is contained in:
@@ -41,6 +41,8 @@ public:
|
||||
//! \~russian Создает %PIIOBinaryStream для устройства "device"
|
||||
PIIOBinaryStream(PIIODevice * device): dev(device) {}
|
||||
|
||||
void setDevice(PIIODevice * device) {dev = device;}
|
||||
|
||||
bool binaryStreamAppendImp(const void * d, size_t s) {
|
||||
if (!dev) return false;
|
||||
return dev->write(d, s);
|
||||
@@ -68,6 +70,11 @@ public:
|
||||
//! \~russian Создает %PIIOTextStream для устройства "device"
|
||||
PIIOTextStream(PIIODevice * device): PITextStream<PIIOBinaryStream>(&bin_stream), bin_stream(device){}
|
||||
|
||||
void setDevice(PIIODevice * device) {
|
||||
bin_stream = PIIOBinaryStream(device);
|
||||
setStream(&bin_stream);
|
||||
}
|
||||
|
||||
private:
|
||||
PIIOBinaryStream bin_stream;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user