Siena Fast Forwarding Documentation (v. 2.0.1)
tags.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // This file is part of Siena, a wide-area event notification system.
4 // See http://www.inf.usi.ch/carzaniga/siena/
5 //
6 // Authors: Antonio Carzaniga
7 // See the file AUTHORS for full details.
8 //
9 // Copyright (C) 2013 University of Colorado
10 //
11 // Siena is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // Siena is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with Siena. If not, see <http://www.gnu.org/licenses/>.
23 //
24 #ifndef SIENA_TAGS_H_INCLUDED
25 #define SIENA_TAGS_H_INCLUDED
26 
27 #include <string>
28 
39 namespace siena {
40 
47 class Tag {
48 public:
50  virtual ~Tag() {};
51 
56  virtual std::string to_string() const = 0;
57 
63  virtual std::string & to_string(std::string &) const = 0;
64 };
65 
76 class TagSet {
77 public:
78  virtual ~TagSet() {};
79 
106  class Iterator : public Tag {
107  public:
120  virtual bool next() = 0;
121 
123  virtual ~Iterator() {};
124  };
125 
135  virtual Iterator * first() const = 0;
136 };
137 
185 class TagSetList {
186 public:
188  virtual ~TagSetList() {};
189 
196  class Iterator : public TagSet {
197  public:
210  virtual bool next() = 0;
212  virtual ~Iterator() {};
213  };
214 
220  virtual Iterator * first() const = 0;
221 };
222 
223 } // end namespace siena
224 
225 #endif