git-svn-id: svn://db.shs.com.ru/pip@674 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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(" (");
|
||||
|
||||
@@ -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_;}
|
||||
|
||||
Reference in New Issue
Block a user