PIP 5.6.1
Platform-Independent Primitives
Files | Classes | Macros | Functions | Variables
Core

Basic functionality. More...

Files

file  pibase.h
 Base types and functionsThis file implements first layer above the system and declares some basic useful functions.
 
file  pibase_macros.h
 Base macrosThis file declares basic useful macros for the PIP library including platform detection, compiler-specific configurations, and utility macros for private data handling.
 
file  picollection.h
 Unique classes collection Helper module to collect and retrieve classes into groups using macros for automatic registration.
 
file  picoremodule.h
 Umbrella header for the Core module.
 
file  picout.h
 Universal output to console class.
 
file  piincludes.h
 Core includes and low-level helper functions.
 
file  piinit.h
 Library initialization This file provides initialization and build information for the PIP library.
 
file  pimemoryblock.h
 Memory block helper struct for data storage and binary stream operations The PIMemoryBlock struct provides a lightweight wrapper to store and restore custom blocks of data to/from PIBinaryStream. It holds a pointer to data and its size in bytes.
 
file  piobject.h
 Base object class providing event -> handler mechanism.
 
file  piobject_macros.h
 PIObject macros for event system and object introspection.
 
file  piliterals.h
 C++11 user-defined literals C++11 user-defined literals for PIP library typesIncludes all literals_*.h files providing user-defined literals (UDL) for:
 
file  piliterals_bytearray.h
 PIByteArray literal operators.
 
file  piliterals_bytes.h
 Byte-size literal operators.
 
file  piliterals_regularexpression.h
 PIRegularExpression literal operators.
 
file  piliterals_string.h
 PIString literal operators.
 
file  piliterals_time.h
 PISystemTime and frequency literal operators.
 
file  pip.h
 Umbrella include for the public PIP API.
 
file  piplatform.h
 Public platform and compiler detection macros.
 

Classes

class  PICollection
 Global collection of PIObject-based instances grouped by name. More...
 
class  PICollection::CollectionAdder
 Helper that registers object in collection during static initialization. More...
 
class  PICout
 Universal output to console class. This class provides a universal output interface with support for various data types, formatting options, and multiple output devices (console, buffer). More...
 
class  PICout::Notifier
 Class for emit notifications of PICout. More...
 
class  PIObject
 Base class for objects that declare events, event handlers and registered methods. More...
 
class  PIObject::Connection
 Handle of one connection between a source object and a destination object or functor. More...
 

Macros

#define WINDOWS
 Defined for Windows targets.
 
#define LINUX
 Defined for Linux targets.
 
#define MAC_OS
 Defined for macOS targets.
 
#define ANDROID
 Defined for Android targets.
 
#define QNX
 Defined for QNX targets.
 
#define FREE_BSD
 Defined for FreeBSD targets.
 
#define MICRO_PIP
 Defined for reduced embedded PIP builds.
 
#define ARCH_BITS_32
 Defined when the target architecture is 32-bit.
 
#define ARCH_BITS_64
 Defined when the target architecture is 64-bit.
 
#define CC_GCC
 Defined for GCC-compatible compilers.
 
#define CC_GCC_VERSION
 Encoded GCC major and minor version for CC_GCC builds.
 
#define CC_VC
 Defined for Microsoft Visual C++.
 
#define CC_OTHER
 Defined when no dedicated compiler macro above matched.
 
#define CC_OTHER
 Defined when no dedicated compiler macro above matched.
 
#define POSIX_SIGNALS
 Defined when POSIX signal APIs are expected to be available.
 
#define POSIX_SIGNALS
 Defined when POSIX signal APIs are expected to be available.
 

Functions

PIString errorString ()
 Returns readable description of the last system error in format "code <number> - <description>".
 
void errorClear ()
 Clears the last system error.
 
void randomize ()
 Seeds the global pseudo-random generator.
 
int randomi ()
 Returns next value from the global pseudo-random generator.
 
PIString PIPVersion ()
 Returns readable PIP version string.
 
template<typename T >
PIMemoryBlock createMemoryBlock (const T *ptr)
 Creates PIMemoryBlock for object pointed by "ptr".
 
PIByteArray operator""_hex (const char *v, size_t sz)
 Creates PIByteArray from hex string literal (for example "1a2e3f").
 
PIByteArray operator""_base64 (const char *v, size_t sz)
 Creates PIByteArray from Base64 string literal (for example "aGVsbG8=").
 
constexpr unsigned long long operator""_KB (long double v)
 Kilobytes, x1000.
 
constexpr unsigned long long operator""_KB (unsigned long long v)
 Kilobytes, x1000.
 
constexpr unsigned long long operator""_KiB (long double v)
 Kibibytes, x1024 (2^10)
 
constexpr unsigned long long operator""_KiB (unsigned long long v)
 Kibibytes, x1024 (2^10)
 
constexpr unsigned long long operator""_MB (long double v)
 Megabytes, x1000.000.
 
constexpr unsigned long long operator""_MB (unsigned long long v)
 Megabytes, x1000.000.
 
constexpr unsigned long long operator""_MiB (long double v)
 Mebibytes, x1.048.576 (2^20)
 
constexpr unsigned long long operator""_MiB (unsigned long long v)
 Mebibytes, x1.048.576 (2^20)
 
constexpr unsigned long long operator""_GB (long double v)
 Gigabytes, x1000.000.000.
 
constexpr unsigned long long operator""_GB (unsigned long long v)
 Gigabytes, x1000.000.000.
 
constexpr unsigned long long operator""_GiB (long double v)
 Gibibytes, x1.073.741.824 (2^30)
 
constexpr unsigned long long operator""_GiB (unsigned long long v)
 Gibibytes, x1.073.741.824 (2^30)
 
constexpr unsigned long long operator""_TB (long double v)
 Terabytes, x1000.000.000.000.
 
constexpr unsigned long long operator""_TB (unsigned long long v)
 Terabytes, x1000.000.000.000.
 
constexpr unsigned long long operator""_TiB (long double v)
 Tebibytes, x1.099.511.627.776 (2^40)
 
constexpr unsigned long long operator""_TiB (unsigned long long v)
 Tebibytes, x1.099.511.627.776 (2^40)
 
constexpr unsigned long long operator""_PB (long double v)
 Petabytes, x1000.000.000.000.000.
 
constexpr unsigned long long operator""_PB (unsigned long long v)
 Petabytes, x1000.000.000.000.000.
 
constexpr unsigned long long operator""_PiB (long double v)
 Pebibytes, x1.125.899.906.842.624 (2^50)
 
constexpr unsigned long long operator""_PiB (unsigned long long v)
 Pebibytes, x1.125.899.906.842.624 (2^50)
 
PIRegularExpression operator""_regex (const char *v, size_t sz)
 Creates PIRegularExpression from string literal in PCRE2 format.
 
PIRegularExpression operator""_glob (const char *v, size_t sz)
 Creates PIRegularExpression from string literal in glob format.
 
PIString operator""_a (const char *v, size_t sz)
 Creates PIString from ASCII string literal.
 
PIString operator""_u8 (const char *v, size_t sz)
 Creates PIString from UTF-8 string literal.
 
PISystemTime operator""_d (long double v)
 PISystemTime from days.
 
PISystemTime operator""_d (unsigned long long v)
 PISystemTime from days.
 
PISystemTime operator""_h (long double v)
 PISystemTime from hours.
 
PISystemTime operator""_h (unsigned long long v)
 PISystemTime from hours.
 
PISystemTime operator""_m (long double v)
 PISystemTime from minutes.
 
PISystemTime operator""_m (unsigned long long v)
 PISystemTime from minutes.
 
PISystemTime operator""_s (long double v)
 PISystemTime from seconds.
 
PISystemTime operator""_s (unsigned long long v)
 PISystemTime from seconds.
 
PISystemTime operator""_ms (long double v)
 PISystemTime from milliseconds.
 
PISystemTime operator""_ms (unsigned long long v)
 PISystemTime from milliseconds.
 
PISystemTime operator""_us (long double v)
 PISystemTime from microseconds.
 
PISystemTime operator""_us (unsigned long long v)
 PISystemTime from microseconds.
 
PISystemTime operator""_ns (unsigned long long v)
 PISystemTime from nanoseconds.
 
PISystemTime::Frequency operator""_Hz (long double v)
 PISystemTime::Frequency from hertz.
 
PISystemTime::Frequency operator""_Hz (unsigned long long v)
 PISystemTime::Frequency from hertz.
 
PISystemTime::Frequency operator""_KHz (long double v)
 PISystemTime::Frequency from kilohertz.
 
PISystemTime::Frequency operator""_KHz (unsigned long long v)
 PISystemTime::Frequency from kilohertz.
 
PISystemTime::Frequency operator""_MHz (long double v)
 PISystemTime::Frequency from megahertz.
 
PISystemTime::Frequency operator""_MHz (unsigned long long v)
 PISystemTime::Frequency from megahertz.
 
PISystemTime::Frequency operator""_GHz (long double v)
 PISystemTime::Frequency from gigahertz.
 
PISystemTime::Frequency operator""_GHz (unsigned long long v)
 PISystemTime::Frequency from gigahertz.
 

Variables

lconv * currentLocale
 Pointer to current C locale numeric settings.
 

Detailed Description

Basic functionality.

Building with CMake

find_package(PIP REQUIRED)
target_link_libraries([target] PIP)
Common

These headers provide platform abstraction, common macros, utility functions and base classes.

Authors

Ivan Pelipenko peri4.nosp@m.ko@y.nosp@m.andex.nosp@m..ru; Andrey Bychkov work..nosp@m.a.b@.nosp@m.yande.nosp@m.x.ru;