libdballe  5.18
rawmsg.h
Go to the documentation of this file.
00001 /*
00002  * dballe/rawmsg - annotated raw buffer
00003  *
00004  * Copyright (C) 2005--2010  ARPA-SIM <urpsim@smr.arpa.emr.it>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00018  *
00019  * Author: Enrico Zini <enrico@enricozini.com>
00020  */
00021 
00022 #ifndef WREPORT_RAWMSG_H
00023 #define WREPORT_RAWMSG_H
00024 
00025 #include <dballe/core/defs.h>
00026 #include <string>
00027 
00028 namespace dballe {
00029 
00038 struct Rawmsg : public std::string
00039 {
00045     std::string file;
00047     long offset;
00049     int index;
00051     Encoding encoding;
00052 
00053     Rawmsg() : offset(0), index(0) {}
00054 
00055     // Clear all the contents of this dballe::Rawmsg
00056     void clear() throw ()
00057     {
00058         std::string::clear();
00059         file.clear();
00060         offset = 0;
00061         index = 0;
00062     }
00063 };
00064 
00065 }
00066 
00067 /* vim:set ts=4 sw=4: */
00068 #endif