PIP 6.1.0
Platform-Independent Primitives
Loading...
Searching...
No Matches
pibytearray.h File Reference

Byte array. More...

#include "pibinarystream.h"
#include "pichar.h"
#include <stdio.h>

Classes

class  PIByteArray
 The PIByteArray class provides an array of bytes with efficient memory management and various manipulation operations. More...

Functions

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.

Detailed Description

Byte array.