0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
NamespaceListing.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.
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_NAMESPACELISTING_H
23 #define HYPERTABLE_NAMESPACELISTING_H
24 
25 #include <vector>
26 #include "Common/String.h"
27 
28 namespace Hypertable {
30  public:
31  std::string name;
32  std::string id;
34 
35  std::vector<NamespaceListing> sub_entries;
36  };
37 
39  bool operator()(const NamespaceListing &x, const NamespaceListing &y) const {
40  int cmp = x.name.compare(y.name);
41  if (cmp==0)
42  return (int)x.is_namespace < (int)y.is_namespace;
43  else if (cmp < 0)
44  return true;
45  else
46  return false;
47  }
48  };
49 
51  bool operator()(const NamespaceListing &x, const NamespaceListing &y) const {
52  int cmp = x.id.compare(y.id);
53  if (cmp==0)
54  return (int)x.is_namespace < (int)y.is_namespace;
55  else if (cmp < 0)
56  return true;
57  else
58  return false;
59  }
60  };
61 }
62 
63 #endif // HYPERTABLE_NAMESPACELISTING_H
std::vector< NamespaceListing > sub_entries
bool operator()(const NamespaceListing &x, const NamespaceListing &y) const
Hypertable definitions
A String class based on std::string.
bool operator()(const NamespaceListing &x, const NamespaceListing &y) const