mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 14:46:55 +02:00
Working on specialized delta streaming.
This commit is contained in:
parent
8515e9e04b
commit
20e9572f60
1 changed files with 13 additions and 0 deletions
|
@ -271,6 +271,9 @@ public:
|
|||
template<class T> void writeDelta(const T& value, const T& reference);
|
||||
template<class T> void readDelta(T& value, const T& reference);
|
||||
|
||||
template<class T> void writeDelta(const QSet<T>& value, const QSet<T>& reference);
|
||||
template<class T> void readDelta(QSet<T>& value, const QSet<T>& reference);
|
||||
|
||||
Bitstream& operator<<(bool value);
|
||||
Bitstream& operator>>(bool& value);
|
||||
|
||||
|
@ -395,9 +398,19 @@ template<class T> inline void Bitstream::readDelta(T& value, const T& reference)
|
|||
*this >> changed;
|
||||
if (changed) {
|
||||
*this >> value;
|
||||
} else {
|
||||
value = reference;
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> inline void Bitstream::writeDelta(const QSet<T>& value, const QSet<T>& reference) {
|
||||
|
||||
}
|
||||
|
||||
template<class T> inline void Bitstream::readDelta(QSet<T>& value, const QSet<T>& reference) {
|
||||
|
||||
}
|
||||
|
||||
template<class T> inline Bitstream& Bitstream::operator<<(const QList<T>& list) {
|
||||
*this << list.size();
|
||||
foreach (const T& entry, list) {
|
||||
|
|
Loading…
Reference in a new issue