git-svn-id: svn://db.shs.com.ru/pip@678 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -313,6 +313,20 @@ void PIFile::configureFromFullPathDevice(const PIString & full_path) {
|
||||
}
|
||||
|
||||
|
||||
PIPropertyStorage PIFile::constructVariantDevice() const {
|
||||
PIPropertyStorage ret;
|
||||
PIVariantTypes::File f;
|
||||
f.file = path();
|
||||
ret.addProperty("path", f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void PIFile::configureFromVariantDevice(const PIPropertyStorage & d) {
|
||||
setPath(d.propertyValueByName("path").toString());
|
||||
}
|
||||
|
||||
|
||||
PIString PIFile::strType(const PIIODevice::DeviceMode type) {
|
||||
switch (type) {
|
||||
case PIIODevice::ReadOnly: return "rb";
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define PIFILE_H
|
||||
|
||||
#include "piiodevice.h"
|
||||
#include "pipropertystorage.h"
|
||||
|
||||
|
||||
class PIP_EXPORT PIFile: public PIIODevice
|
||||
@@ -289,6 +290,8 @@ protected:
|
||||
PIString fullPathPrefix() const {return PIStringAscii("file");}
|
||||
PIString constructFullPathDevice() const;
|
||||
void configureFromFullPathDevice(const PIString & full_path);
|
||||
PIPropertyStorage constructVariantDevice() const;
|
||||
void configureFromVariantDevice(const PIPropertyStorage & d);
|
||||
int readDevice(void * read_to, int max_size);
|
||||
int writeDevice(const void * data, int max_size);
|
||||
bool openDevice();
|
||||
|
||||
@@ -459,3 +459,4 @@ PIPropertyStorage PIIODevice::constructVariantDevice() const {
|
||||
void PIIODevice::configureFromVariantDevice(const PIPropertyStorage & d) {
|
||||
setPath(d.propertyValueByName("path").toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -418,5 +418,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // PIIODEVICE_H
|
||||
|
||||
Reference in New Issue
Block a user