Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Representations/Perception/SensorDataBuffer.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file SensorDataBuffer.cpp
    00003 *
    00004 * Implementation of class SensorDataBuffer
    00005 *
    00006 * @author Max Risler
    00007 */
    00008
    00009 #include "SensorDataBuffer.h"
    00010
    00011 SensorDataBuffer::SensorDataBuffer() :
    00012   numOfFrames(0)
    00013 {
    00014 }
    00015
    00016 /*
    00017 In& operator>>(In& stream,SensorDataBuffer& sensorDataBuffer)
    00018 {
    00019   stream >> sensorDataBuffer.numOfFrames;
    00020   for (int i=0;i<sensorDataBuffer.numOfFrames;i++)
    00021   {
    00022     stream >> sensorDataBuffer.frame[i];
    00023   }
    00024   return stream;
    00025 }
    00026 */
    00027
    00028 /**
    00029  * Streaming operator that writes a SensorDataBuffer to a stream.
    00030  * @param stream The stream to write on.
    00031  * @param sensorDataBuffer The SensorDataBuffer object.
    00032  * @return The stream.
    00033  */
    00034 Out& operator<<(Out& stream, const SensorDataBuffer& sensorDataBuffer)
    00035 {
    00036   STREAM_REGISTER_BEGIN_EXT( sensorDataBuffer);
    00037   // STREAM_EXT( stream, sensorDataBuffer.numOfFrames;);
    00038   STREAM_DYN_ARRAY_EXT( stream, sensorDataBuffer.frame, sensorDataBuffer.numOfFrames);
    00039   STREAM_REGISTER_FINISH();
    00040   // stream << sensorDataBuffer.numOfFrames;
    00041   /*
    00042   for (int i=0;i<sensorDataBuffer.numOfFrames;i++)
    00043   {
    00044     stream << sensorDataBuffer.frame[i];
    00045   }
    00046   */
    00047   return stream;
    00048 }