version 2.93 ready to master
remove PIString << operators
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#ifndef PIIOSTREAM_H
|
||||
#define PIIOSTREAM_H
|
||||
|
||||
#include "piiodevice.h"
|
||||
#include "piiostring.h"
|
||||
#include "pitextstream.h"
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@ public:
|
||||
|
||||
//! \~english Contructs %PIIOBinaryStream for "device" device
|
||||
//! \~russian Создает %PIIOBinaryStream для устройства "device"
|
||||
PIIOBinaryStream(PIIODevice * device): dev(device) {}
|
||||
PIIOBinaryStream(PIIODevice * device = nullptr): dev(device) {}
|
||||
|
||||
//! \~english Assign "device" device
|
||||
//! \~russian Назначает устройство "device"
|
||||
void setDevice(PIIODevice * device) {dev = device;}
|
||||
|
||||
bool binaryStreamAppendImp(const void * d, size_t s) {
|
||||
@@ -68,7 +70,19 @@ public:
|
||||
|
||||
//! \~english Contructs %PIIOTextStream for "device" device
|
||||
//! \~russian Создает %PIIOTextStream для устройства "device"
|
||||
PIIOTextStream(PIIODevice * device): PITextStream<PIIOBinaryStream>(&bin_stream), bin_stream(device){}
|
||||
PIIOTextStream(PIIODevice * device): PITextStream<PIIOBinaryStream>(&bin_stream), bin_stream(device) {}
|
||||
|
||||
//! \~english Contructs %PIIOTextStream for "string" string
|
||||
//! \~russian Создает %PIIOTextStream для строки "string"
|
||||
PIIOTextStream(PIString * string): PITextStream<PIIOBinaryStream>(&bin_stream) {
|
||||
io_string = new PIIOString(string);
|
||||
bin_stream.setDevice(io_string);
|
||||
}
|
||||
|
||||
~PIIOTextStream() {
|
||||
if (io_string)
|
||||
delete io_string;
|
||||
}
|
||||
|
||||
void setDevice(PIIODevice * device) {
|
||||
bin_stream = PIIOBinaryStream(device);
|
||||
@@ -76,6 +90,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
PIIOString * io_string = nullptr;
|
||||
PIIOBinaryStream bin_stream;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user