PIIODevice::bytesAvailible()
fix pistringlist pibinarystream write pibinarystream::binaryStreamSize() PIByteArray pibinarystream read with more size fix pistring pibinarystream read optimization fix bug in PIIOBinaryStream read and write if failed workaround in PIIOString::readDevice PISPI readDevice bug Fixed
This commit is contained in:
@@ -88,11 +88,16 @@ public:
|
||||
//! \~russian Вставляет строку "string" в содержимое буфера в текущую позицию
|
||||
int writeString(const PIString & string);
|
||||
|
||||
ssize_t bytesAvailible() const override {
|
||||
if (str) return str->size() - pos;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool openDevice() override;
|
||||
virtual int readDevice(void * read_to, int max_size) override;
|
||||
virtual int writeDevice(const void * data, int max_size) override;
|
||||
virtual DeviceInfoFlags deviceInfoFlags() const override {return PIIODevice::Sequential | PIIODevice::Reliable;}
|
||||
bool openDevice() override;
|
||||
int readDevice(void * read_to, int max_size) override;
|
||||
int writeDevice(const void * data, int max_size) override;
|
||||
DeviceInfoFlags deviceInfoFlags() const override {return PIIODevice::Sequential | PIIODevice::Reliable;}
|
||||
|
||||
ssize_t pos;
|
||||
PIString * str;
|
||||
|
||||
Reference in New Issue
Block a user