Claw
1.7.3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ordered_set.hpp
Go to the documentation of this file.
1
/*
2
CLAW - a C++ Library Absolutely Wonderful
3
4
CLAW is a free library without any particular aim but being useful to
5
anyone.
6
7
Copyright (C) 2005-2011 Julien Jorge
8
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Lesser General Public
11
License as published by the Free Software Foundation; either
12
version 2.1 of the License, or (at your option) any later version.
13
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Lesser General Public License for more details.
18
19
You should have received a copy of the GNU Lesser General Public
20
License along with this library; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
23
contact: julien.jorge@gamned.org
24
*/
30
#ifndef __CLAW_ORDERED_SET_HPP__
31
#define __CLAW_ORDERED_SET_HPP__
32
33
#include <
claw/avl.hpp
>
34
35
namespace
claw
36
{
37
namespace
math
38
{
43
template
<
class
K,
class
Comp = std::less<K> >
44
class
ordered_set
:
45
public
avl
<K, Comp>
46
{
47
private
:
49
typedef
avl<K, Comp>
super
;
50
51
public
:
54
typedef
typename
super::const_iterator
const_iterator
;
55
57
typedef
typename
super::value_type
value_type
;
58
60
typedef
typename
super::referent_type
referent_type
;
61
63
typedef
typename
super::const_reference
const_reference
;
64
65
public
:
66
ordered_set
&
operator*=
(
const
ordered_set
& that );
67
ordered_set
&
operator+=
(
const
ordered_set
& that );
68
ordered_set
&
operator-=
(
const
ordered_set
& that );
69
ordered_set
&
operator/=
(
const
ordered_set
& that );
70
71
bool
operator>
(
const
ordered_set
& that )
const
;
72
bool
operator>=
(
const
ordered_set
& that )
const
;
73
bool
operator<
(
const
ordered_set
& that )
const
;
74
bool
operator<=
(
const
ordered_set
& that )
const
;
75
76
ordered_set
&
intersection
(
const
ordered_set
& that );
77
ordered_set
&
join
(
const
ordered_set
& that );
78
ordered_set
&
difference
(
const
ordered_set
& that );
79
ordered_set
&
symetric_difference
(
const
ordered_set
& that );
80
81
bool
contains
(
const
ordered_set
& that )
const
;
82
bool
strictly_contains
(
const
ordered_set
& that )
const
;
83
84
private
:
86
static
Comp s_key_comp;
87
88
};
// class ordered_set
89
}
// namespace math
90
}
// namespace claw
91
92
#include <
claw/impl/ordered_set.tpp
>
93
94
#endif // __CLAW_ORDERED_SET_HPP__
Generated on Thu Mar 14 2013 22:09:24 for Claw by
1.8.1.2