src/tools/unitTest/nMessageMock.cpp

Go to the documentation of this file.
00001 #include "nMessageMock.h"
00002 
00003 nMessageMock::nMessageMock():out(),in(out.rdbuf()) {}
00004 nMessageMock::~nMessageMock() {}
00005 
00006 void nMessageMock::receive()
00007 {
00008     //  out(in.rdbuf());
00009 
00010     std::cerr << ">>" << out.str() << "<<" << std::endl;
00011 }
00012 
00013 void nMessageMock::Write(unsigned short x) { out << x; }
00014 void nMessageMock::Read(unsigned short &x) { in >> x; }
00015 
00016 nMessageMock& nMessageMock::operator<< (const float &x) { out << x; return *this; }
00017 nMessageMock& nMessageMock::operator<< (const int &x) { out << x; return *this; }
00018 nMessageMock& nMessageMock::operator<< (const unsigned short &x) { out << x; return *this; }
00019 
00020 nMessageMock& nMessageMock::operator>> (float &x) { in >> x; return *this; }
00021 nMessageMock& nMessageMock::operator>> (int &x) { in >> x; return *this; }
00022 nMessageMock& nMessageMock::operator>> (unsigned short &x) { in >> x; return *this; }
00023 
00024 
00025 

Generated on Sat Mar 15 22:56:02 2008 for Armagetron Advanced by  doxygen 1.5.4