00001 #ifndef _STRING_LOG_READER_H
00002 #define _STRING_LOG_READER_H
00003
00004 #include "BinaryLogObject.h"
00005
00006 namespace StringLogReader_namespace {
00007
00008 class StringLogReader : public mace::BinaryLogObject, public mace::PrintPrintable {
00009 public:
00010 std::string text;
00011 static const std::string type;
00012
00013 StringLogReader(const std::string& str = "") : text(str){
00014 }
00015
00016 public:
00017 void serialize(std::string& __str) const {
00018 }
00019
00020 int deserialize(std::istream& is) throw(mace::SerializationException) {
00021 is.seekg(-4, std::ios::cur);
00022 mace::deserialize(is, &text);
00023 return text.size();
00024 }
00025
00026 void print(std::ostream& __out) const {
00027 __out << text;
00028 }
00029
00030 const std::string& getLogType() const {
00031 return type;
00032 }
00033
00034 const std::string& getLogDescription() const {
00035 static const std::string desc = "String";
00036 return desc;
00037 }
00038
00039 LogClass getLogClass() const {
00040 return STRING;
00041 }
00042 };
00043
00044 void init();
00045 }
00046
00047 #endif // _STRING_LOG_READER_H