src/tools/unitTest/nMessageMock.h

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <sstream>
00003 #include <ostream>
00004 
00005 #ifndef N_MESSAGE_MOCK
00006 #define N_MESSAGE_MOCK
00007 
00008 class nMessageMock {
00009 protected:
00010     std::ostringstream out;
00011     std::istream in;
00012 
00013 public:
00014     nMessageMock();
00015     ~nMessageMock();
00016 
00017     void receive();
00018     void Write(unsigned short x);
00019     void Read(unsigned short &x);
00020 
00021     nMessageMock& operator<< (const float &x);
00022     nMessageMock& operator>> (float &x);
00023 
00024     nMessageMock& operator<< (const unsigned short &x);
00025     nMessageMock& operator>> (unsigned short &x);
00026 
00027     nMessageMock& operator<< (const int &x);
00028     nMessageMock& operator>> (int &x);
00029 };
00030 
00031 #endif

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