git-svn-id: svn://db.shs.com.ru/pip@674 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-12-18 20:14:34 +00:00
parent 8d37dc453e
commit 37b97ed4aa
2 changed files with 13 additions and 0 deletions

View File

@@ -379,6 +379,16 @@ void PIIODevice::splitFullPath(PIString fpwm, PIString * full_path, DeviceMode *
}
PIStringList PIIODevice::availablePrefixes() {
PIStringList ret;
PIVector<const PIObject * > rd(PICollection::groupElements("__PIIODevices__"));
piForeachC (PIObject * d, rd) {
ret << ((const PIIODevice * )d)->fullPathPrefix();
}
return ret;
}
PIString PIIODevice::fullPathOptions() const {
if (mode_ == ReadWrite && options_ == 0) return PIString();
PIString ret(" (");

View File

@@ -256,6 +256,9 @@ public:
static void splitFullPath(PIString fpwm, PIString * full_path, DeviceMode * mode = 0, DeviceOptions * opts = 0);
//! Returns fullPath prefixes of all registered devices
static PIStringList availablePrefixes();
EVENT_HANDLER(bool, open) {if (!init_) init(); opened_ = openDevice(); if (opened_) opened(); return opened_;}
EVENT_HANDLER1(bool, open, const PIString &, _path) {setPath(_path); if (!init_) init(); opened_ = openDevice(); if (opened_) opened(); return opened_;}