0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CellStoreTrailer.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef HYPERTABLE_CELLSTORETRAILER_H
23 #define HYPERTABLE_CELLSTORETRAILER_H
24 
25 #include <iostream>
26 #include <boost/any.hpp>
27 #include "Common/String.h"
28 
29 namespace Hypertable {
30 
35  public:
36 
37  virtual ~CellStoreTrailer() { return; }
38 
42  virtual void clear() = 0;
43 
49  virtual size_t size() = 0;
50 
56  virtual void serialize(uint8_t *buf) = 0;
57 
63  virtual void deserialize(const uint8_t *buf) = 0;
64 
70  virtual void display(std::ostream &os) = 0;
71 
77  virtual void display_multiline(std::ostream &os) = 0;
78 
79  virtual boost::any get(const String& prop) = 0;
80  };
81 
85  inline std::ostream &
86  operator <<(std::ostream &os, CellStoreTrailer &trailer) {
87  trailer.display(os);
88  return os;
89  }
90 
91 
92 }
93 
94 #endif // HYPERTABLE_CELLSTORETRAILER_H
Abstract base class for cell store trailer.
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
virtual void deserialize(const uint8_t *buf)=0
Deserializes the trailer from the given buffer.
virtual size_t size()=0
Returns the serialized size of the trailer.
virtual void clear()=0
Clears the contents of this trailer;.
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
Definition: Crontab.cc:301
Hypertable definitions
virtual void display(std::ostream &os)=0
Prints the trailer to the given ostream.
virtual void serialize(uint8_t *buf)=0
Serializes this trailer to the given buffer;.
A String class based on std::string.
virtual void display_multiline(std::ostream &os)=0
Prints the trailer, one member per line, to the given ostream.