refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic

All feature flags now use positive naming (enabled by default):
- PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET
- PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL

Preprocessor guards inverted:
- #ifndef PIP_NO_X → #ifdef PIP_HAS_X
- #ifdef PIP_NO_X → #ifndef PIP_HAS_X

CMake options default ON instead of OFF.
Platform blocks set flags OFF to disable features.

85 files transformed via Python script + 2 manual fixes.
This commit is contained in:
2026-08-11 19:51:42 +03:00
parent 1db0dfea43
commit 077ac9887b
85 changed files with 344 additions and 342 deletions
+10 -10
View File
@@ -379,7 +379,7 @@ public:
bool isEmpty() const { return device_modes.isEmpty(); }
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
//! \~english Returns diagnostics object for device or filter "full_path_name".
//! \~russian Возвращает объект диагностики для устройства или фильтра "full_path_name".
PIDiagnostics * diagnostic(const PIString & full_path_name) const;
@@ -417,7 +417,7 @@ public:
//! \~russian Возвращает, работает ли общий пул устройств в режиме имитации.
static bool isFakeMode();
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
class PIP_EXPORT DevicePool: public PIThread {
PIOBJECT_SUBCLASS(DevicePool, PIThread);
friend void __DevicePool_threadReadDP(void * ddp);
@@ -459,7 +459,7 @@ public:
PIMap<PIString, DeviceData *> devices;
bool fake;
};
#endif // PIP_NO_THREADS
#endif // PIP_HAS_THREADS
//! \events
@@ -475,7 +475,7 @@ public:
//! \~russian Генерируется, когда фильтр "from" выдает пакет.
EVENT2(packetReceivedEvent, const PIString &, from, const PIByteArray &, data);
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
//! \fn void qualityChanged(const PIIODevice * device, PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality)
//! \~english Emitted when diagnostics quality of "device" changes.
//! \~russian Генерируется при изменении качества диагностики устройства "device".
@@ -502,7 +502,7 @@ private:
void rawReceived(PIIODevice * dev, const PIString & from, const PIByteArray & data);
void unboundExtractor(PIPacketExtractor * pe);
EVENT_HANDLER2(void, packetExtractorReceived, const uchar *, data, int, size);
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
EVENT_HANDLER2(void, diagQualityChanged, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality);
#endif
@@ -517,7 +517,7 @@ private:
PIVector<PIIODevice *> devices;
};
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
class PIP_EXPORT Sender: public PITimer {
PIOBJECT_SUBCLASS(Sender, PIObject);
@@ -533,21 +533,21 @@ private:
#endif
PIMap<PIString, Extractor *> extractors;
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
PIMap<PIString, Sender *> senders;
#endif
PIMap<PIString, PIIODevice *> device_names;
PIMap<PIIODevice *, PIIODevice::DeviceMode> device_modes;
PIMap<PIIODevice *, PIVector<PIPacketExtractor *>> bounded_extractors;
PIMap<PIIODevice *, PIVector<PIIODevice *>> channels_;
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
PIMap<PIIODevice *, PIDiagnostics *> diags_;
#endif
static PIVector<PIConnection *> _connections;
};
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
void __DevicePool_threadReadDP(void * ddp);
extern PIP_EXPORT PIConnection::DevicePool * __device_pool__;
@@ -559,7 +559,7 @@ public:
};
static __DevicePoolContainer__ __device_pool_container__;
#endif // PIP_NO_THREADS
#endif // PIP_HAS_THREADS
#endif // PICONNECTION_H