![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Basic types, value containers and time utilities. More...
Files | |
| file | pibitarray.h |
| Packed bit array. | |
| file | pibytearray.h |
| Byte array. | |
| file | pidatetime.h |
| Time and date structs. | |
| file | piflags.h |
| General flags class. | |
| file | pinetworkaddress.h |
| Network address. | |
| file | pipropertystorage.h |
| Properties array. | |
| file | pisystemtime.h |
| System time structs and methods. | |
| file | pitime.h |
| System time, time and date. | |
| file | pitime_win.h |
| PITime conversions for Windows This file provides conversion functions between Windows time structures (FILETIME, SYSTEMTIME) and PIP time structures (PISystemTime, PIDateTime). | |
| file | pitypesmodule.h |
| Convenience includes for the Types module. | |
| file | pivaluetree.h |
| Attributed values tree. | |
| file | pivariant.h |
| Variant type. | |
| file | pivariantsimple.h |
| Simple variant type. | |
| file | pivarianttypes.h |
| Types for PIVariant. | |
Namespaces | |
| namespace | PIVariantTypes |
| Namespace contains several types for PIVariant. | |
Classes | |
| class | PIBitArray |
| The PIBitArray class provides a space-efficient array of bits. More... | |
| class | PIByteArray |
| The PIByteArray class provides an array of bytes with efficient memory management and various manipulation operations. More... | |
| class | PITime |
| Calendar time. More... | |
| class | PIDate |
| Calendar date. More... | |
| class | PIDateTime |
| Calendar date and time. More... | |
| class | PIFlags< Enum > |
| The PIFlags class is a template container for bit flags with various bitwise operations and comparison operators. More... | |
| class | PINetworkAddress |
| Network address, IP and port. More... | |
| class | PIPropertyStorage |
| This class provides key-value properties storage. More... | |
| class | PIPropertyStorage::Property |
| PIPropertyStorage element. More... | |
| class | PISystemTime |
| System time with nanosecond precision. More... | |
| class | PISystemTime::Frequency |
| Frequency type. More... | |
| class | PITimeMeasurer |
| Time measurements. More... | |
| class | PIValueTree |
| The PIValueTree class represents a tree structure of PIVariant values with attributes. More... | |
| class | PIVariant |
| Variant type. More... | |
| class | PIVariantSimple |
| Lightweight strongly-typed variant for a single value. More... | |
| struct | PIVariantTypes::Enumerator |
| Name-value pair. More... | |
| struct | PIVariantTypes::Enum |
| Collection of PIVariantTypes::Enumerator. More... | |
| struct | PIVariantTypes::File |
| File location description. More... | |
| struct | PIVariantTypes::Dir |
| Directory description. More... | |
| struct | PIVariantTypes::Color |
| 32-bits color. More... | |
| struct | PIVariantTypes::IODevice |
| Variant description used to create or configure PIIODevice. More... | |
Functions | |
| PIByteArray::PIByteArray () | |
| Constructs an empty byte array. | |
| PIByteArray::PIByteArray (const PIByteArray &o) | |
| Constructs copy of byte array "o". | |
| PIByteArray::PIByteArray (const PIDeque< uchar > &o) | |
| Constructs copy of byte array "o". | |
| PIByteArray::PIByteArray (PIByteArray &&o) | |
| Move constructor. | |
| PIByteArray::PIByteArray (const uint size) | |
| Constructs 0-filled byte array with size "size". | |
| PIByteArray::PIByteArray (const void *data, const uint size) | |
| Constructs byte array from data "data" and size "size". | |
| PIByteArray::PIByteArray (const uint size, uchar t) | |
| Constructs byte array with size "size" filled by "t". | |
| PIByteArray::PIByteArray (std::initializer_list< uchar > init_list) | |
| Constructs array from C++11 initializer list. More... | |
| void | PIByteArray::swap (PIByteArray &other) |
Swaps array v other with this array. More... | |
| PIDeque< uchar >::iterator | PIByteArray::begin () |
| Iterator to the first element. More... | |
| PIDeque< uchar >::iterator | PIByteArray::end () |
| Iterator to the element following the last element. More... | |
| PIDeque< uchar >::reverse_iterator | PIByteArray::rbegin () |
| Returns a reverse iterator to the first element of the reversed array. More... | |
| PIDeque< uchar >::reverse_iterator | PIByteArray::rend () |
| Returns a reverse iterator to the element. following the last element of the reversed array. More... | |
| size_t | PIByteArray::size () const |
| Number of elements in the container. More... | |
| ssize_t | PIByteArray::size_s () const |
| Number of elements in the container as signed value. More... | |
| size_t | PIByteArray::length () const |
| Same as size(). More... | |
| size_t | PIByteArray::capacity () const |
| Number of elements that the container has currently allocated space for. More... | |
| bool | PIByteArray::isEmpty () const |
| Checks if the container has no elements. More... | |
| bool | PIByteArray::isNotEmpty () const |
| Checks if the container has elements. More... | |
| bool | PIByteArray::any (std::function< bool(uchar e)> test) const |
Tests whether at least one element in the array passes the test implemented by the provided function test. More... | |
| bool | PIByteArray::every (std::function< bool(uchar e)> test) const |
Tests whether all elements in the array passes the test implemented by the provided function test. More... | |
| uchar & | PIByteArray::operator[] (size_t index) |
Full access to element by index. More... | |
| uchar | PIByteArray::at (size_t index) const |
Read only access to element by index. More... | |
| uchar & | PIByteArray::back () |
| Last element. More... | |
| uchar & | PIByteArray::front () |
| Last element. More... | |
| bool | PIByteArray::contains (uchar e, ssize_t start=0) const |
Tests if element e exists in the array. More... | |
| int | PIByteArray::entries (uchar e, ssize_t start=0) const |
Count elements equal e in the array. More... | |
| int | PIByteArray::entries (std::function< bool(uchar e)> test, ssize_t start=0) const |
Count elements in the array passes the test implemented by the provided function test. More... | |
| ssize_t | PIByteArray::indexOf (const uchar &e, ssize_t start=0) const |
Returns the first index at which a given element e can be found in the array, or -1 if it is not present. More... | |
| ssize_t | PIByteArray::indexWhere (std::function< bool(const uchar &e)> test, ssize_t start=0) const |
Returns the first index passes the test implemented by the provided function test, or -1 if it is not present. can be found in the array, or -1 if it is not present. More... | |
| ssize_t | PIByteArray::lastIndexOf (const uchar &e, ssize_t start=-1) const |
Returns the last index at which a given element e can be found in the array, or -1 if it is not present. More... | |
| ssize_t | PIByteArray::lastIndexWhere (std::function< bool(const uchar &e)> test, ssize_t start=-1) const |
Returns the last index passes the test implemented by the provided function test, or -1 if it is not present. More... | |
| uchar * | PIByteArray::data (size_t index=0) |
| Pointer to array. More... | |
| const uchar * | PIByteArray::data (size_t index=0) const |
| Read only pointer to array. More... | |
| PIByteArray & | PIByteArray::clear () |
| Clear array, remove all elements. More... | |
| PIByteArray & | PIByteArray::fill (uchar e=0) |
| Assigns element 'e' to all items in the array. More... | |
| PIByteArray & | PIByteArray::fill (std::function< uchar(size_t i)> f) |
| Assigns result of function 'f(size_t i)' to all items in the array. More... | |
| PIByteArray & | PIByteArray::assign (uchar e=0) |
| Same as fill(). More... | |
| PIByteArray & | PIByteArray::assign (size_t new_size, uchar e) |
First does resize(new_size) then fill(e). More... | |
| PIByteArray & | PIByteArray::resize (size_t new_size, uchar e=0) |
Sets size of the array, new elements are copied from e. More... | |
| PIByteArray & | PIByteArray::resize (size_t new_size, std::function< uchar(size_t i)> f) |
Sets size of the array, new elements created by function f(size_t i). More... | |
| PIByteArray | PIByteArray::resized (uint new_size) const |
| Return resized byte array. | |
| PIByteArray & | PIByteArray::reserve (size_t new_size) |
Attempts to allocate memory for at least new_size elements. More... | |
| PIByteArray & | PIByteArray::insert (size_t index, uchar e=0) |
Inserts value e at index position in the array. More... | |
| PIByteArray & | PIByteArray::insert (size_t index, const PIByteArray &v) |
Inserts array v at index position in the array. More... | |
| PIByteArray & | PIByteArray::insert (size_t index, std::initializer_list< uchar > init_list) |
Inserts the given elements at index position in the array. More... | |
| PIByteArray & | PIByteArray::remove (size_t index, size_t count=1) |
Removes count elements from the middle of the array, starting at index position. More... | |
| PIByteArray | PIByteArray::getRange (size_t index, size_t count) const |
| Return sub-array starts from "index" and has "count" or less bytes. | |
| PIByteArray | PIByteArray::takeRange (size_t index, size_t count) |
| Cut sub-array of this array. More... | |
| PIByteArray & | PIByteArray::reverse () |
| Reverses this array. More... | |
| PIByteArray | PIByteArray::reversed () const |
| Returns reversed array. More... | |
| PIByteArray & | PIByteArray::enlarge (ssize_t add_size, uchar e=0) |
Increases or decreases the size of the array by add_size elements. More... | |
| PIByteArray & | PIByteArray::removeOne (uchar e) |
Remove no more than one element equal e. More... | |
| PIByteArray & | PIByteArray::removeAll (uchar e) |
Remove all elements equal e. More... | |
| PIByteArray & | PIByteArray::removeWhere (std::function< bool(uchar e)> test) |
Remove all elements in the array passes the test implemented by the provided function test. More... | |
| PIByteArray & | PIByteArray::push_back (uchar e) |
Appends the given element e to the end of the array. More... | |
| PIByteArray & | PIByteArray::push_back (std::initializer_list< uchar > init_list) |
| Appends the given elements to the end of the array. More... | |
| PIByteArray & | PIByteArray::push_back (const PIByteArray &v) |
Appends the given array v to the end of the array. More... | |
| PIByteArray & | PIByteArray::push_back (const void *data_, int size_) |
| Add to the end data "data" with size "size". | |
| PIByteArray & | PIByteArray::push_front (uchar e) |
Appends the given element e to the begin of the array. More... | |
| PIByteArray & | PIByteArray::push_front (const PIByteArray &v) |
Appends the given array v to the begin of the array. More... | |
| PIByteArray & | PIByteArray::push_front (std::initializer_list< uchar > init_list) |
| Appends the given elements to the begin of the array. More... | |
| PIByteArray & | PIByteArray::prepend (uchar e) |
Appends the given element e to the begin of the array. More... | |
| PIByteArray & | PIByteArray::prepend (const PIByteArray &v) |
Appends the given array v to the begin of the array. More... | |
| PIByteArray & | PIByteArray::prepend (std::initializer_list< uchar > init_list) |
| Appends the given elements to the begin of the array. More... | |
| PIByteArray & | PIByteArray::pop_back () |
| Remove one element from the end of the array. More... | |
| PIByteArray & | PIByteArray::pop_front () |
| Remove one element from the begining of the array. More... | |
| uchar | PIByteArray::take_back () |
| Remove one element from the end of the array and return it. More... | |
| uchar | PIByteArray::take_front () |
| Remove one element from the begining of the array and return it. More... | |
| PIByteArray | PIByteArray::filter (std::function< bool(const uchar &e)> test) const |
Returns a new array with all elements that pass the test implemented by the provided function test. More... | |
| void | PIByteArray::forEach (std::function< void(const uchar &e)> f) const |
Execute function void f(const uchar & e) for every element in array. More... | |
| PIByteArray & | PIByteArray::forEach (std::function< void(uchar &e)> f) |
Execute function void f(uchar & e) for every element in array. More... | |
| template<typename ST > | |
| PIDeque< ST > | PIByteArray::map (std::function< ST(const uchar &e)> f) const |
Сreates a new array populated with the results of calling a provided function ST f(const uchar & e) on every element in the calling array. More... | |
| template<typename ST > | |
| ST | PIByteArray::reduce (std::function< ST(const uchar &e, const ST &acc)> f, const ST &initial=ST()) const |
Applies the function ST f(const uchar & e, const ST & acc) to each element of the array (from left to right), returns one value. More... | |
| PIByteArray & | PIByteArray::convertToBase64 () |
| Convert data to Base 64 and return this byte array. | |
| PIByteArray & | PIByteArray::convertFromBase64 () |
| Convert data from Base 64 and return this byte array. | |
| PIByteArray | PIByteArray::toBase64 () const |
| Return converted to Base 64 data. | |
| PIString | PIByteArray::toString (int base=16) const |
| Return string representation of data, each byte in "base" base, separated by spaces. | |
| PIString | PIByteArray::toHex () const |
| Returns a hex encoded copy of the byte array, without spaces. The hex encoding uses the numbers 0-9 and the letters a-f. | |
| PIByteArray & | PIByteArray::append (const void *data_, int size_) |
| Add to the end data "data" with size "size". | |
| PIByteArray & | PIByteArray::append (const PIByteArray &data_) |
| Add to the end byte array "data". | |
| PIByteArray & | PIByteArray::append (uchar t) |
| Add to the end "t". | |
| PIByteArray & | PIByteArray::append (std::initializer_list< uchar > init_list) |
| Appends the given elements to the end of the array. More... | |
| uchar | PIByteArray::checksumPlain8 (bool inverse=true) const |
| Returns 8-bit checksum. More... | |
| uint | PIByteArray::checksumPlain32 (bool inverse=true) const |
| Returns 32-bit checksum. More... | |
| uchar | PIByteArray::checksumCRC8 () const |
| Returns 8-bit checksum CRC-8. | |
| ushort | PIByteArray::checksumCRC16 () const |
| Returns 16-bit checksum CRC-16. | |
| uint | PIByteArray::checksumCRC32 () const |
| Returns 32-bit checksum CRC-32. | |
| uint | PIByteArray::hash () const |
| Returns hash of content. | |
| static PIByteArray | PIByteArray::fromBase64 (const PIByteArray &base64) |
| Return converted from Base 64 data. | |
| bool | operator< (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator> (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator== (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator!= (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| PIByteArray | operator& (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "and". If non-equal size, then returns empty PIByteArray. | |
| PIByteArray | operator| (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "or". If non-equal size, then returns empty PIByteArray. | |
| PIByteArray | operator^ (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "xor". If non-equal size, then returns empty PIByteArray. | |
| PICout | operator<< (PICout s, const PIByteArray &ba) |
| Output operator to PICout. | |
| s | binaryStreamAppend (v.data(), v.size()) |
| Store operator. | |
| s | binaryStreamTake (v.data(), v.size()) |
| Restore operator. | |
| template<> | |
| uint | piHash (const PIByteArray &ba) |
| Returns PIByteArray::hash() of "ba". | |
| template<> | |
| void | piSwap (PIByteArray &f, PIByteArray &s) |
| Swap contents betwee "f" and "s". | |
| template<typename T > | |
| PIByteArray | piSerialize (const T &value) |
| Store "value" to bytearray and returns it. | |
| template<typename T > | |
| T | piDeserialize (const PIByteArray &data) |
| Restore type "T" from bytearray "data" and returns it. | |
| PIFlags< Enum >::PIFlags () | |
| Constructor with flags = 0. | |
| PIFlags< Enum >::PIFlags (Enum e) | |
| Constructor with flags = Enum "e". | |
| PIFlags< Enum >::PIFlags (const int i) | |
| Constructor with flags = int "i". | |
| PIFlags & | PIFlags< Enum >::setFlag (const PIFlags &f, bool on=true) |
| Set flags on positions "f" to value "on". | |
| PIFlags & | PIFlags< Enum >::setFlag (const Enum &e, bool on=true) |
| Set flag "e" to value "on". | |
| PIFlags & | PIFlags< Enum >::setFlag (const int &i, bool on=true) |
| Set flag "i" to value "on". | |
| void | PIFlags< Enum >::operator= (const Enum &e) |
| Assign operator. | |
| void | PIFlags< Enum >::operator= (const int &i) |
| Assign operator. | |
| bool | PIFlags< Enum >::operator== (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator== (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator== (const int i) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator!= (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator!= (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator!= (const int i) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator> (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator> (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator> (const int i) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator< (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator< (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator< (const int i) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator>= (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator>= (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator>= (const int i) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator<= (const PIFlags &f) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator<= (const Enum &e) |
| Compare operator. | |
| bool | PIFlags< Enum >::operator<= (const int i) |
| Compare operator. | |
| void | PIFlags< Enum >::operator&= (const PIFlags &f) |
| Bit-wise AND operator. | |
| void | PIFlags< Enum >::operator&= (const Enum &e) |
| Bit-wise AND operator. | |
| void | PIFlags< Enum >::operator&= (const int i) |
| Bit-wise AND operator. | |
| void | PIFlags< Enum >::operator|= (const PIFlags &f) |
| Bit-wise OR operator. | |
| void | PIFlags< Enum >::operator|= (const Enum &e) |
| Bit-wise OR operator. | |
| void | PIFlags< Enum >::operator|= (const int i) |
| Bit-wise OR operator. | |
| void | PIFlags< Enum >::operator^= (const PIFlags &f) |
| Bit-wise XOR operator. | |
| void | PIFlags< Enum >::operator^= (const Enum &e) |
| Bit-wise XOR operator. | |
| void | PIFlags< Enum >::operator^= (const int i) |
| Bit-wise XOR operator. | |
| PIFlags | PIFlags< Enum >::operator& (PIFlags f) const |
| Bit-wise AND operator. | |
| PIFlags | PIFlags< Enum >::operator& (Enum e) const |
| Bit-wise AND operator. | |
| PIFlags | PIFlags< Enum >::operator& (int i) const |
| Bit-wise AND operator. | |
| PIFlags | PIFlags< Enum >::operator| (PIFlags f) const |
| Bit-wise OR operator. | |
| PIFlags | PIFlags< Enum >::operator| (Enum e) const |
| Bit-wise OR operator. | |
| PIFlags | PIFlags< Enum >::operator| (int i) const |
| Bit-wise OR operator. | |
| PIFlags | PIFlags< Enum >::operator^ (PIFlags f) const |
| Bit-wise XOR operator. | |
| PIFlags | PIFlags< Enum >::operator^ (Enum e) const |
| Bit-wise XOR operator. | |
| PIFlags | PIFlags< Enum >::operator^ (int i) const |
| Bit-wise XOR operator. | |
| bool | PIFlags< Enum >::operator[] (Enum e) const |
| Test flag operator. | |
| PIFlags< Enum >::operator int () const | |
Implicity conversion to int. | |
| void | piUSleep (int usecs) |
| Precise sleep for "usecs" microseconds. More... | |
| void | piMSleep (double msecs) |
| Precise sleep for "msecs" milliseconds. More... | |
| void | piSleep (double secs) |
| Precise sleep for "secs" seconds. More... | |
| void | piSleep (PISystemTime t) |
| Precise sleep for "t" time. | |
| void | piMinSleep () |
| Shortest available on current system sleep. | |
| PISystemTime | FILETIME2PISystemTime (const FILETIME &t) |
| Converts FILETIME to PISystemTime. Converts Windows FILETIME structure to PISystemTime. FILETIME is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC). | |
| PIDateTime | SYSTEMTIME2PIDateTime (const SYSTEMTIME &t) |
| Converts SYSTEMTIME to PIDateTime. Converts Windows SYSTEMTIME structure to PIDateTime. SYSTEMTIME represents a date and time using individual members for month, day, year, etc. | |
| PIDateTime | FILETIME2PIDateTime (const FILETIME &t) |
| Converts FILETIME to PIDateTime. Converts Windows FILETIME to PIDateTime. The FILETIME is first converted to local time, then to SYSTEMTIME, and finally to PIDateTime. | |
| SYSTEMTIME | PIDateTime2SYSTEMTIME (const PIDateTime &dt) |
| Converts PIDateTime to SYSTEMTIME. Converts PIDateTime to Windows SYSTEMTIME structure. | |
| FILETIME | PIDateTime2FILETIME (const PIDateTime &dt) |
| Converts PIDateTime to FILETIME. Converts PIDateTime to Windows FILETIME. The PIDateTime is first converted to SYSTEMTIME, then to local FILETIME, and finally to UTC FILETIME. | |
| bool | operator< (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator> (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator== (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| bool | operator!= (const PIByteArray &v0, const PIByteArray &v1) |
| Byte arrays compare operator. | |
| PIByteArray | operator& (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "and". If non-equal size, then returns empty PIByteArray. | |
| PIByteArray | operator| (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "or". If non-equal size, then returns empty PIByteArray. | |
| PIByteArray | operator^ (const PIByteArray &v0, const PIByteArray &v1) |
| Returns bit-wise "xor". If non-equal size, then returns empty PIByteArray. | |
| PICout | operator<< (PICout s, const PIByteArray &ba) |
| Output operator to PICout. | |
| template<> | |
| uint | piHash (const PIByteArray &ba) |
| Returns PIByteArray::hash() of "ba". | |
| template<> | |
| void | piSwap (PIByteArray &f, PIByteArray &s) |
| Swap contents betwee "f" and "s". | |
| template<typename T > | |
| PIByteArray | piSerialize (const T &value) |
| Store "value" to bytearray and returns it. | |
| template<typename T > | |
| T | piDeserialize (const PIByteArray &data) |
| Restore type "T" from bytearray "data" and returns it. | |
Variables | |
| return | s |
| Store operator. More... | |
Basic types, value containers and time utilities.
This module collects public headers for commonly used value types, variant containers, property helpers, network-address types and time/date utilities.
|
inline |
#include <pibytearray.h>
Constructs array from C++11 initializer list.
|
inline |
#include <pibytearray.h>
Swaps array v other with this array.
This operation is very fast and never fails.
|
inline |
#include <pibytearray.h>
Iterator to the first element.
If the array is empty, the returned iterator is equal to end().
|
inline |
#include <pibytearray.h>
Iterator to the element following the last element.
This element acts as a placeholder; attempting to access it results in undefined behavior.
|
inline |
#include <pibytearray.h>
Returns a reverse iterator to the first element of the reversed array.
It corresponds to the last element of the non-reversed array. If the array is empty, the returned iterator is equal to rend().
|
inline |
#include <pibytearray.h>
Returns a reverse iterator to the element. following the last element of the reversed array.
It corresponds to the element preceding the first element of the non-reversed array. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inline |
#include <pibytearray.h>
Number of elements in the container.
|
inline |
#include <pibytearray.h>
Number of elements in the container as signed value.
|
inline |
#include <pibytearray.h>
Same as size().
|
inline |
#include <pibytearray.h>
Number of elements that the container has currently allocated space for.
To find out the actual number of items, use the function size().
|
inline |
#include <pibytearray.h>
Checks if the container has no elements.
|
inline |
#include <pibytearray.h>
Checks if the container has elements.
|
inline |
#include <pibytearray.h>
Tests whether at least one element in the array passes the test implemented by the provided function test.
|
inline |
#include <pibytearray.h>
Tests whether all elements in the array passes the test implemented by the provided function test.
|
inline |
#include <pibytearray.h>
Full access to element by index.
Element index starts from 0. Element index must be in range from 0 to size()-1. Otherwise will be undefined behavior.
|
inline |
#include <pibytearray.h>
Read only access to element by index.
Element index starts from 0. Element index must be in range from 0 to size()-1. Otherwise will be undefined behavior.
|
inline |
#include <pibytearray.h>
Last element.
Returns a reference to the last item in the array. This function assumes that the array isn't empty. Otherwise will be undefined behavior.
|
inline |
#include <pibytearray.h>
Last element.
Returns a reference to the last item in the array. This function assumes that the array isn't empty. Otherwise will be undefined behavior.
|
inline |
#include <pibytearray.h>
Tests if element e exists in the array.
Optional argument start - the position in this array at which to begin searching. If the index is greater than or equal to the array's size, false is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. Default: 0 (entire array is searched).
e, otherwise it returns false.
|
inline |
#include <pibytearray.h>
Count elements equal e in the array.
Optional argument start - the position in this array at which to begin searching. If the index is greater than or equal to the array's size, 0 is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. Default: 0 (entire array is searched).
|
inline |
#include <pibytearray.h>
Count elements in the array passes the test implemented by the provided function test.
Overloaded function. Optional argument start - the position in this array at which to begin searching. If the index is greater than or equal to the array's size, 0 is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. Default: 0 (entire array is searched).
|
inline |
#include <pibytearray.h>
Returns the first index at which a given element e can be found in the array, or -1 if it is not present.
Optional argument start - the position in this array at which to begin searching. If the index is greater than or equal to the array's size, -1 is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. Default: 0 (entire array is searched).
|
inline |
#include <pibytearray.h>
Returns the first index passes the test implemented by the provided function test, or -1 if it is not present. can be found in the array, or -1 if it is not present.
Optional argument start - the position in this array at which to begin searching. If the index is greater than or equal to the array's size, -1 is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. Default: 0 (entire array is searched).
|
inline |
#include <pibytearray.h>
Returns the last index at which a given element e can be found in the array, or -1 if it is not present.
Optional argument start - the position in this array at which to start searching backwards. If the index is greater than or equal to the array's size, causes the whole array to be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Therefore, if calculated index less than 0, the array is not searched, and the method returns -1. Note: if the provided index is negative, the array is still searched from back to front. Default: -1 (entire array is searched).
|
inline |
#include <pibytearray.h>
Returns the last index passes the test implemented by the provided function test, or -1 if it is not present.
Optional argument start - the position in this array at which to start searching backwards. If the index is greater than or equal to the array's size, causes the whole array to be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Therefore, if calculated index less than 0, the array is not searched, and the method returns -1. Note: if the provided index is negative, the array is still searched from back to front. Default: -1 (entire array is searched).
|
inline |
#include <pibytearray.h>
Pointer to array.
Optional argument index the position in this array, where is pointer. Default: start of array.
|
inline |
#include <pibytearray.h>
Read only pointer to array.
The pointer can be used to access and modify the items in the array. The pointer remains valid as long as the array isn't reallocated. Optional argument index the position in this array, where is pointer. Default: start of array.
|
inline |
#include <pibytearray.h>
Clear array, remove all elements.
|
inline |
|
inline |
#include <pibytearray.h>
Assigns result of function 'f(size_t i)' to all items in the array.
|
inline |
|
inline |
|
inline |
#include <pibytearray.h>
Sets size of the array, new elements are copied from e.
If new_size is greater than the current size(), elements are added to the end; the new elements are initialized from e. If new_size is less than the current size(), elements are removed from the end.
|
inline |
#include <pibytearray.h>
Sets size of the array, new elements created by function f(size_t i).
If new_size is greater than the current size(), elements are added to the end; the new elements created by function f(size_t i). If new_size is less than the current size(), elements are removed from the end.
|
inline |
#include <pibytearray.h>
Attempts to allocate memory for at least new_size elements.
If you know in advance how large the array will be, you should call this function to prevent reallocations and memory fragmentation. If new_size is greater than the current capacity(), new storage is allocated, otherwise the function does nothing. This function does not change the size() of the array.
|
inline |
#include <pibytearray.h>
Inserts value e at index position in the array.
The index must be greater than 0 and less than or equal to size().
|
inline |
#include <pibytearray.h>
Inserts array v at index position in the array.
The index must be greater than or equal to 0 and less than or equal to size().
|
inline |
#include <pibytearray.h>
Inserts the given elements at index position in the array.
The index must be greater than or equal to 0 and less than or equal to size(). Inserts the given elements from C++11 initializer list.
|
inline |
#include <pibytearray.h>
Removes count elements from the middle of the array, starting at index position.
|
inline |
#include <pibytearray.h>
Cut sub-array of this array.
| index | - index of this array where sub-array starts |
| count | - sub-array size |
Index must be in range from 0 to size()-1. If sub-array size more than this array size, than ends early.
|
inline |
#include <pibytearray.h>
Reverses this array.
This method reverses an array in place. The first array element becomes the last, and the last array element becomes the first. The reverse method transposes the elements of the calling array object in place, mutating the array, and returning a reference to the array.
|
inline |
#include <pibytearray.h>
Returns reversed array.
Returns a copy of the array with elements in reverse order. The first array element becomes the last, and the last array element becomes the first.
|
inline |
#include <pibytearray.h>
Increases or decreases the size of the array by add_size elements.
If add_size > 0 then elements are added to the end of the array. If add_size < 0 then elements are removed from the end of the array. If add_size < 0 and there are fewer elements in the array than specified, then the array becomes empty.
|
inline |
#include <pibytearray.h>
Remove no more than one element equal e.
|
inline |
|
inline |
#include <pibytearray.h>
Remove all elements in the array passes the test implemented by the provided function test.
|
inline |
#include <pibytearray.h>
Appends the given element e to the end of the array.
If size() is less than capacity(), which is most often then the addition will be very fast. In any case, the addition is fast and does not depend on the size of the array. If the new size() is greater than capacity() then all iterators and references (including the past-the-end iterator) are invalidated. Otherwise only the past-the-end iterator is invalidated.
|
inline |
#include <pibytearray.h>
Appends the given elements to the end of the array.
Overloaded function. Appends the given elements from C++11 initializer list.
|
inline |
#include <pibytearray.h>
Appends the given array v to the end of the array.
Overloaded function.
|
inline |
#include <pibytearray.h>
Appends the given element e to the begin of the array.
If there is free space at the beginning of the array, which is most often, then the addition will be very fast. In any case, the addition is fast and does not depend on the size of the array. If there is no free space at the beginning of the array then all iterators and references (including the past-the-begin iterator) are invalidated. Otherwise only the past-the-begin iterator is invalidated.
|
inline |
#include <pibytearray.h>
Appends the given array v to the begin of the array.
Overloaded function.
|
inline |
#include <pibytearray.h>
Appends the given elements to the begin of the array.
Overloaded function. Appends the given elements from C++11 initializer list.
|
inline |
#include <pibytearray.h>
Appends the given element e to the begin of the array.
If there is free space at the beginning of the array, which is most often, then the addition will be very fast. In any case, the addition is fast and does not depend on the size of the array. If there is no free space at the beginning of the array then all iterators and references (including the past-the-begin iterator) are invalidated. Otherwise only the past-the-begin iterator is invalidated.
|
inline |
#include <pibytearray.h>
Appends the given array v to the begin of the array.
Overloaded function.
|
inline |
#include <pibytearray.h>
Appends the given elements to the begin of the array.
Overloaded function. Appends the given elements from C++11 initializer list.
|
inline |
#include <pibytearray.h>
Remove one element from the end of the array.
Deleting an element from the end is very fast and does not depend on the size of the array.
|
inline |
#include <pibytearray.h>
Remove one element from the begining of the array.
Removing an element from the beginning takes longer than from the end. This time is directly proportional to the size of the array. All iterators and references are invalidated.
|
inline |
#include <pibytearray.h>
Remove one element from the end of the array and return it.
|
inline |
#include <pibytearray.h>
Remove one element from the begining of the array and return it.
|
inline |
#include <pibytearray.h>
Returns a new array with all elements that pass the test implemented by the provided function test.
|
inline |
#include <pibytearray.h>
Execute function void f(const uchar & e) for every element in array.
Does not allow changing array elements. To edit elements, use the function like void f(T & e)
|
inline |
#include <pibytearray.h>
Execute function void f(uchar & e) for every element in array.
Overloaded function. Allows you to change the elements of the array.
|
inline |
#include <pibytearray.h>
Сreates a new array populated with the results of calling a provided function ST f(const uchar & e) on every element in the calling array.
Calls a provided functionST f(const uchar & e) once for each element in an array, in order, and constructs a new array from the results.
|
inline |
#include <pibytearray.h>
Applies the function ST f(const uchar & e, const ST & acc) to each element of the array (from left to right), returns one value.
The reduce() method performs the f function once for each element in the array. If the initial argument is passed when calling reduce(), then when the function f is called for the first time, the value of acc will be assigned to initial. If the array is empty, the value initial will be returned.
| f | is a function like ST f(const uchar & e, const ST & acc), executed for each element of the array. It takes two arguments:
|
| initial | optional Object used as the second argument when the f function is first called. PIByteArray v{1, 2, 3, 4, 5};
PIString s = v.reduce<PIString>([](const uchar & e, const PIString & acc){return acc + PIString::fromNumber(e);});
|
|
inline |
#include <pibytearray.h>
Appends the given elements to the end of the array.
Overloaded function. Appends the given elements from C++11 initializer list.
| uchar PIByteArray::checksumPlain8 | ( | bool | inverse = true | ) | const |
#include <pibytearray.h>
Returns 8-bit checksum.
This is simple sum of all bytes, if "inverse" then add 1 and inverse. Pseudocode:
| uint PIByteArray::checksumPlain32 | ( | bool | inverse = true | ) | const |
#include <pibytearray.h>
Returns 32-bit checksum.
This is sum of all bytes multiplied by index+1, if inverse then add 1 and inverse. Pseudocode:
| void piUSleep | ( | int | usecs | ) |
#include <pitime.h>
Precise sleep for "usecs" microseconds.
This function consider "usleep" offset on QNX/Linux/Mac, which is calculated with pip_sys_test program. If this is correct offset value in system config, this function wait exactly "usecs" microseconds.
|
inline |
#include <pitime.h>
Precise sleep for "msecs" milliseconds.
This function exec piUSleep (msecs * 1000)
|
inline |
| return s |
#include <pisystemmonitor.h>
Store operator.
Binary stream read operator for PFTFileInfo.
Binary stream write operator for PFTFileInfo.
Binary stream read operator for PFTHeader.
Binary stream read operator for StartRequest.
Binary stream write operator for StartRequest.
Binary stream read operator for Part.
Binary stream write operator for Part.
Binary stream read operator for PacketHeader.
Restore operator for WheelEvent.
Store operator for WheelEvent.
Restore operator for MouseEvent.
Restore operator.