refactoring

git-svn-id: svn://elaine/murooma/trunk@328 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-12-29 12:34:33 +00:00
parent 611b2a6c9f
commit c40bfda64c
35 changed files with 192 additions and 178 deletions

44
message/time.h Normal file
View file

@ -0,0 +1,44 @@
#ifndef TIME_MSG_H
#define TIME_MSG_H
#include "message.h"
namespace msg
{
class Time : public BaseMessage
{
public:
Time() : BaseMessage(message_type::kTime)
{
}
virtual ~Time()
{
}
virtual void read(std::istream& stream)
{
stream.read(reinterpret_cast<char *>(&latency), sizeof(double));
}
virtual uint32_t getSize()
{
return sizeof(double);
}
double latency;
protected:
virtual void doserialize(std::ostream& stream)
{
stream.write(reinterpret_cast<char *>(&latency), sizeof(double));
}
};
}
#endif