26 #ifndef TAGLIB_BYTEVECTOR_H 27 #define TAGLIB_BYTEVECTOR_H 48 #ifndef DO_NOT_DOCUMENT 84 ByteVector(
const char *data,
unsigned int length);
103 ByteVector &setData(
const char *data,
unsigned int length);
123 const char *data()
const;
130 ByteVector mid(
unsigned int index,
unsigned int length = 0xffffffff)
const;
136 char at(
unsigned int index)
const;
144 int find(
const ByteVector &pattern,
unsigned int offset = 0,
int byteAlign = 1)
const;
152 int find(
char c,
unsigned int offset = 0,
int byteAlign = 1)
const;
160 int rfind(
const ByteVector &pattern,
unsigned int offset = 0,
int byteAlign = 1)
const;
169 bool containsAt(
const ByteVector &pattern,
unsigned int offset,
170 unsigned int patternOffset = 0,
unsigned int patternLength = 0xffffffff)
const;
175 bool startsWith(
const ByteVector &pattern)
const;
180 bool endsWith(
const ByteVector &pattern)
const;
186 ByteVector &replace(
char oldByte,
char newByte);
204 int endsWithPartialMatch(
const ByteVector &pattern)
const;
224 unsigned int size()
const;
241 ConstIterator begin()
const;
251 ConstIterator end()
const;
256 ReverseIterator rbegin();
261 ConstReverseIterator rbegin()
const;
266 ReverseIterator rend();
271 ConstReverseIterator rend()
const;
292 bool isEmpty()
const;
300 unsigned int checksum()
const;
312 unsigned int toUInt(
bool mostSignificantByteFirst =
true)
const;
324 unsigned int toUInt(
unsigned int offset,
bool mostSignificantByteFirst =
true)
const;
337 unsigned int toUInt(
unsigned int offset,
unsigned int length,
338 bool mostSignificantByteFirst =
true)
const;
349 short toShort(
bool mostSignificantByteFirst =
true)
const;
360 short toShort(
unsigned int offset,
bool mostSignificantByteFirst =
true)
const;
371 unsigned short toUShort(
bool mostSignificantByteFirst =
true)
const;
382 unsigned short toUShort(
unsigned int offset,
bool mostSignificantByteFirst =
true)
const;
394 long long toLongLong(
bool mostSignificantByteFirst =
true)
const;
406 long long toLongLong(
unsigned int offset,
bool mostSignificantByteFirst =
true)
const;
412 float toFloat32LE(
size_t offset)
const;
418 float toFloat32BE(
size_t offset)
const;
424 double toFloat64LE(
size_t offset)
const;
430 double toFloat64BE(
size_t offset)
const;
438 long double toFloat80LE(
size_t offset)
const;
446 long double toFloat80BE(
size_t offset)
const;
467 static ByteVector fromShort(
short value,
bool mostSignificantByteFirst =
true);
478 static ByteVector fromLongLong(
long long value,
bool mostSignificantByteFirst =
true);
502 static ByteVector fromFloat64LE(
double value);
510 static ByteVector fromFloat64BE(
double value);
515 static ByteVector fromCString(
const char *s,
unsigned int length = 0xffffffff);
520 const char &operator[](
int index)
const;
525 char &operator[](
int index);
547 bool operator!=(
const char *s)
const;
624 class ByteVectorPrivate;
625 ByteVectorPrivate *d;
size_t size
Definition: mem.h:207
TAGLIB_EXPORT ByteVector fromUInt(unsigned int value)
Returns a 4 byte (32 bit) synchsafe integer based on value.
std::vector< char >::reverse_iterator ReverseIterator
Definition: tbytevector.h:51
std::vector< char >::iterator Iterator
Definition: tbytevector.h:49
A byte vector.
Definition: tbytevector.h:45
static ByteVector null
A static, empty ByteVector which is convenient and fast (since returning an empty or "null" value doe...
Definition: tbytevector.h:598
Q_AV_EXPORT QDebug operator<<(QDebug debug, const AudioFormat &fmt)
TAGLIB_EXPORT unsigned int toUInt(const ByteVector &data)
This returns the unsigned integer value of data where data is a ByteVector that contains a synchsafe ...
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A namespace for all TagLib related classes and functions.
Definition: aifffile.h:33
std::vector< char >::const_iterator ConstIterator
Definition: tbytevector.h:50
std::vector< char >::const_reverse_iterator ConstReverseIterator
Definition: tbytevector.h:52