PIByteArray works on binary stream
This commit is contained in:
@@ -258,8 +258,10 @@ typedef PIMathVectorT<4u, double> PIMathVectorT4d;
|
||||
template<typename Type>
|
||||
class PIP_EXPORT PIMathVector {
|
||||
typedef PIMathVector<Type> _CVector;
|
||||
template<typename TypeOp> friend PIByteArray & operator <<(PIByteArray & s, const PIMathVector<TypeOp> & v);
|
||||
template<typename TypeOp> friend PIByteArray & operator >>(PIByteArray & s, PIMathVector<TypeOp> & v);
|
||||
template <typename P, typename Type1>
|
||||
friend PIBinaryStream<P> & operator <<(PIBinaryStream<P> & s, const PIMathVector<Type1> & v);
|
||||
template <typename P, typename Type1>
|
||||
friend PIBinaryStream<P> & operator >>(PIBinaryStream<P> & s, PIMathVector<Type1> & v);
|
||||
public:
|
||||
PIMathVector(const uint size = 0, const Type & new_value = Type()) {c.resize(size, new_value);}
|
||||
PIMathVector(const PIVector<Type> & val) {c = val;}
|
||||
@@ -510,10 +512,10 @@ inline std::ostream & operator <<(std::ostream & s, const PIMathVector<Type> & v
|
||||
template<typename Type>
|
||||
inline PICout operator <<(PICout s, const PIMathVector<Type> & v) {s << "Vector{"; for (uint i = 0; i < v.size(); ++i) {s << v[i]; if (i < v.size() - 1) s << ", ";} s << "}"; return s;}
|
||||
|
||||
template<typename Type>
|
||||
inline PIByteArray & operator <<(PIByteArray & s, const PIMathVector<Type> & v) {s << v.c; return s;}
|
||||
template<typename Type>
|
||||
inline PIByteArray & operator >>(PIByteArray & s, PIMathVector<Type> & v) {s >> v.c; return s;}
|
||||
template <typename P, typename T>
|
||||
inline PIBinaryStream<P> & operator <<(PIBinaryStream<P> & s, const PIMathVector<T> & v) {s << v.c; return s;}
|
||||
template <typename P, typename T>
|
||||
inline PIBinaryStream<P> & operator >>(PIBinaryStream<P> & s, PIMathVector<T> & v) {s >> v.c; return s;}
|
||||
|
||||
|
||||
typedef PIMathVector<int> PIMathVectori;
|
||||
|
||||
Reference in New Issue
Block a user