PIByteArray works on binary stream

This commit is contained in:
2022-05-10 15:23:18 +03:00
parent 0f9e592273
commit b2bc385397
58 changed files with 254 additions and 923 deletions

View File

@@ -1172,9 +1172,9 @@ inline PICout operator<<(PICout s, const PIMathMatrix<Type> &m) {
* @param v PIMathMatrix type
* @return PIBiteArray serialized PIMathMatrix
*/
template<typename Type>
inline PIByteArray &operator<<(PIByteArray &s, const PIMathMatrix<Type> &v) {
s << (const PIVector2D<Type> &) v;
template <typename P, typename T>
inline PIBinaryStream<P> & operator <<(PIBinaryStream<P> & s, const PIMathMatrix<T> & v) {
s << (const PIVector2D<T> &) v;
return s;
}
@@ -1185,9 +1185,9 @@ inline PIByteArray &operator<<(PIByteArray &s, const PIMathMatrix<Type> &v) {
* @param v PIMathMatrix type
* @return PIMathMatrix deserialized from PIByteArray
*/
template<typename Type>
inline PIByteArray &operator>>(PIByteArray &s, PIMathMatrix<Type> &v) {
s >> (PIVector2D<Type> &) v;
template <typename P, typename T>
inline PIBinaryStream<P> & operator >>(PIBinaryStream<P> & s, PIMathMatrix<T> & v) {
s >> (PIVector2D<T> &) v;
return s;
}