From 89702662657667460d0e5914794366d190f11534 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 11 Jul 2012 01:44:02 -0500 Subject: Fix commanalyzer functionality --- lib/libtqtrla/src/tqtrla.cpp | 21 +++++++++++++++++++++ lib/libtqtrla/src/tqtrla.h | 9 +++++++++ 2 files changed, 30 insertions(+) (limited to 'lib') diff --git a/lib/libtqtrla/src/tqtrla.cpp b/lib/libtqtrla/src/tqtrla.cpp index 96c2274..bda048d 100644 --- a/lib/libtqtrla/src/tqtrla.cpp +++ b/lib/libtqtrla/src/tqtrla.cpp @@ -295,6 +295,27 @@ TQDataStream &operator>>( TQDataStream &s, TQFloatArray &data ) { return s; } +TQDataStream &operator<<( TQDataStream &s, const TQDoubleArray &data ) { + TQ_UINT32 i; + TQ_UINT32 count = data.count(); + s << count; + for (i=0; i>( TQDataStream &s, TQDoubleArray &data ) { + TQ_UINT32 i; + TQ_UINT32 count; + s >> count; + data.resize(count); + for (i=0; i> data[i]; + } + return s; +} + bool operator==( const ServiceType &s1, const ServiceType &s2 ) { bool identical = true; diff --git a/lib/libtqtrla/src/tqtrla.h b/lib/libtqtrla/src/tqtrla.h index a982946..faca985 100644 --- a/lib/libtqtrla/src/tqtrla.h +++ b/lib/libtqtrla/src/tqtrla.h @@ -102,6 +102,15 @@ Q_EXPORT TQDataStream &operator>>(TQDataStream &, TQFloatArray &); // ============================================================================= +typedef TQMemArray TQDoubleArray; + +#ifndef QT_NO_DATASTREAM +Q_EXPORT TQDataStream &operator<<(TQDataStream &, const TQDoubleArray &); +Q_EXPORT TQDataStream &operator>>(TQDataStream &, TQDoubleArray &); +#endif + +// ============================================================================= + class ServiceType { public: -- cgit v1.2.1