00001 #include "OMKOutgoingSynchronisationMessage.h" 00002 00003 #include "OMKPackable.h" 00004 #include "OMKTracer.h" 00005 #include <typeinfo> 00006 00007 #ifdef _DEBUGPVMMESS 00008 #include <iostream> 00009 #endif 00010 00011 using namespace std ; 00012 using namespace OMK ; 00013 00014 OutgoingSynchronisationMessage::OutgoingSynchronisationMessage() 00015 { 00016 } 00017 00018 OutgoingSynchronisationMessage::~OutgoingSynchronisationMessage() 00019 { 00020 } 00021 00022 void OutgoingSynchronisationMessage::reinit() 00023 { 00024 // prepare the associated stream for new insertions 00025 //myos->rdbuf()->seekpos (ios::out, ostrstream::beg) ; 00026 _myos.seekp (ios::out, ostringstream::beg) ; 00027 } 00028 00029 ostringstream & OutgoingSynchronisationMessage::getOutputStream ( ) 00030 { 00031 _myos.seekp(0, ostringstream::beg); 00032 return _myos ; 00033 } 00034 00035 void OutgoingSynchronisationMessage::packOutputStream ( ) 00036 { 00037 #ifdef _DEBUGPVMMESS 00038 cerr<<"OutgoingSynchronisationMessage:"<<(void *)this<<":packOutputMessage () "<<endl; 00039 #endif 00040 00041 pack ( _myos.str() ) ; 00042 00043 _myos.seekp(0, ostringstream::beg) ; 00044 } 00045 00046 00047 void OutgoingSynchronisationMessage::pack(const Packable & val) 00048 { 00049 #ifdef _DEBUGPVMMESS 00050 cerr<<"OutgoingSynchronisationMessage:" 00051 <<this 00052 <<":pack(const Packable & (" 00053 <<typeid (val).name() 00054 <<") val)"; 00055 #endif 00056 00057 val.pack ( *this ) ; 00058 00059 #ifdef _DEBUGPVMMESS 00060 cerr<< "end"<<endl; 00061 #endif 00062 } 00063 00064 OutgoingSynchronisationMessage & OutgoingSynchronisationMessage::operator << (char * val) 00065 { 00066 pack ( val ) ; 00067 return *this ; 00068 }
Documentation generated on Mon Jun 9 11:45:57 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |