YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Matrix.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_MATRIX_HPP
2
# define YAPOG_MATRIX_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Collection/Array.hpp
"
6
7
namespace
yap
8
{
9
namespace
collection
10
{
11
template
<
typename
T>
12
class
Matrix
13
{
14
public
:
15
16
typedef
T
DataType
;
17
typedef
Array<DataType>
InnerType
;
18
typedef
typename
InnerType::SizeType
SizeType
;
19
typedef
typename
InnerType::ItType
ItType
;
20
typedef
typename
InnerType::ConstItType
ConstItType
;
21
22
Matrix
(
SizeType
width,
SizeType
height,
const
DataType
& data);
23
24
Matrix
(
const
Matrix<T>
& copy);
25
Matrix
&
operator=
(
const
Matrix<T>
& copy);
26
27
ItType
begin
();
28
ConstItType
begin
()
const
;
29
ItType
Begin
();
30
ConstItType
Begin
()
const
;
31
32
ItType
end
();
33
ConstItType
end
()
const
;
34
ItType
End
();
35
ConstItType
End
()
const
;
36
37
void
Resize
(
SizeType
x,
SizeType
y,
const
T& data);
38
39
void
Set
(
SizeType
x,
SizeType
y,
const
T& data);
40
41
const
T&
operator()
(
SizeType
x,
SizeType
y)
const
;
42
T&
operator()
(
SizeType
x,
SizeType
y);
43
44
private
:
45
46
SizeType
GetIndex
(
SizeType
x,
SizeType
y)
const
;
47
48
SizeType
width_
;
49
SizeType
height_
;
50
51
InnerType
data_
;
52
};
53
}
// namespace collection
54
}
// namespace yap
55
56
# include "
YAPOG/Collection/Matrix.hxx
"
57
58
#endif // YAPOG_MATRIX_HPP
YAPOG
include
YAPOG
Collection
Matrix.hpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1