version 4.2.0

move toStdFunction() to pibase.h
refactor PIParseHelper, now it much more abstract and useful
fix PIIODevice::createFromFullPath() when whitespaces at start or end are presence
PIStreamPacker add events for start and end packet receive
PIClientServer::ClientBase add virtual methods for start and end packet receive. also one can enable diagnostics with enableDiagnostics() method
PICout now call flush() on each end of output
add PIString::entries(const PIString & str)
This commit is contained in:
2024-10-15 12:02:18 +03:00
parent 9eecbbab6e
commit cd7e053fc5
15 changed files with 174 additions and 119 deletions

View File

@@ -529,6 +529,7 @@ void PIIODevice::configureFromVariant(const PIVariantTypes::IODevice & d) {
void PIIODevice::splitFullPath(PIString fpwm, PIString * full_path, DeviceMode * mode, DeviceOptions * opts) {
fpwm.trim();
int dm = 0;
DeviceOptions op = 0;
if (fpwm.find('(') > 0 && fpwm.find(')') > 0) {
@@ -617,11 +618,12 @@ PIString PIIODevice::fullPathOptions() const {
//! В метод \a configureFromFullPath() "full_path" передается без \a fullPathPrefix() и "://".
//! См. \ref PIIODevice_sec7
PIIODevice * PIIODevice::createFromFullPath(const PIString & full_path) {
PIString prefix = full_path.left(full_path.find(":"));
PIString fp = full_path.trimmed();
PIString prefix = fp.left(fp.find(":"));
PIIODevice * nd = newDeviceByPrefix(prefix.dataAscii());
if (!nd) return nullptr;
nd->configureFromFullPath(full_path.mid(prefix.length() + 3));
cacheFullPath(full_path, nd);
nd->configureFromFullPath(fp.mid(prefix.length() + 3));
cacheFullPath(fp, nd);
return nd;
}