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

# Representations/Cognition/LandmarkState.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file LandmarkState.cpp
    00003 *
    00004 * Implementation of class LandmarkState.
    00005 *
    00006 * @author <A href=mailto:marc.dassler@web.de>Marc Dassler</A>
    00007 */
    00008
    00009
    00010
    00011 #include "LandmarkState.h"
    00012
    00013
    00014 LandmarkState::LandmarkState(Vector3<double> pposition,int bbeaconColor,double wweight)
    00015 {
    00016   position = pposition;
    00017   typeWeight = wweight;
    00018   beaconColor = bbeaconColor;
    00019 }
    00020
    00021 /**
    00022  * Streaming operator that reads a LandmarkState from a stream.
    00023  * @param stream The stream from which is read.
    00024  * @param landmarkState The LandmarkState object.
    00025  * @return The stream.
    00026  */
    00027
    00028 In& operator>>(In& stream,LandmarkState& landmarkState)
    00029 {
    00030   stream.read(&landmarkState,sizeof(LandmarkState));
    00031   return stream;
    00032 }
    00033
    00034 /**
    00035  * Streaming operator that writes a LandmarkState to a stream.
    00036  * @param stream The stream to write on.
    00037  * @param landmarkState The LandmarkState object.
    00038  * @return The stream.
    00039  */
    00040 Out& operator<<(Out& stream, const LandmarkState& landmarkState)
    00041 {
    00042   stream.write(&landmarkState,sizeof(LandmarkState));
    00043   return stream;
    00044 }