YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Set.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_COLLECTION_SET_HPP
2
# define YAPOG_COLLECTION_SET_HPP
3
4
# include <set>
5
6
# include "
YAPOG/Macros.hpp
"
7
8
namespace
yap
9
{
10
template
<
typename
T>
11
class
LessComparator;
12
13
namespace
collection
14
{
15
template
<
typename
T,
typename
C = std::less<T>>
16
class
Set
17
{
18
public
:
19
20
typedef
T
DataType
;
21
typedef
C
ComparatorType
;
22
typedef
std::set<DataType, ComparatorType>
InnerType
;
23
typedef
typename
InnerType::size_type
SizeType
;
24
typedef
typename
InnerType::iterator
ItType
;
25
typedef
typename
InnerType::const_iterator
ConstItType
;
26
27
Set
();
28
29
Set
(
const
Set<T, C>
& copy);
30
31
Set
&
operator=
(
const
Set<T, C>
& copy);
32
33
ItType
begin
();
34
ConstItType
begin
()
const
;
35
ItType
Begin
();
36
ConstItType
Begin
()
const
;
37
38
ItType
end
();
39
ConstItType
end
()
const
;
40
ItType
End
();
41
ConstItType
End
()
const
;
42
43
bool
Add
(
const
T& data);
44
void
Add
(
const
Set<T, C>
& data);
45
46
bool
Contains
(
const
T& data)
const
;
47
bool
Contains
(
const
Set<T, C>
& data)
const
;
48
49
bool
Remove
(
const
T& data);
50
51
void
Clear
();
52
53
bool
IsEmpty
()
const
;
54
SizeType
Count
()
const
;
55
56
private
:
57
58
InnerType
data_
;
59
};
60
}
// namespace collection
61
}
// namespace yap
62
63
# include "
YAPOG/Collection/Set.hxx
"
64
65
#endif // YAPOG_COLLECTION_SET_HPP
YAPOG
include
YAPOG
Collection
Set.hpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1