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