summaryrefslogtreecommitdiffstats
path: root/pokemod/Matrix.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-05-03 22:21:05 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-05-03 22:21:05 +0000
commit621d0f09fafba69aa650bc1555927f41e9c8e60e (patch)
tree2a01644bf81c3e90c2afddad85ec359109f15f5a /pokemod/Matrix.cpp
parent7ed92969721c7b718da26b466bfa095185dfd4ed (diff)
Update PokeMod to PokeGen::PokeMod
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@6 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Matrix.cpp')
-rw-r--r--pokemod/Matrix.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/pokemod/Matrix.cpp b/pokemod/Matrix.cpp
index 96550a25..0d133783 100644
--- a/pokemod/Matrix.cpp
+++ b/pokemod/Matrix.cpp
@@ -24,7 +24,7 @@
#include "Matrix.h"
template<class T>
-PokeMod::Matrix<T>::Matrix(unsigned w, unsigned h, T &d)
+PokeGen::PokeMod::Matrix<T>::Matrix(unsigned w, unsigned h, T &d)
{
matrix.resize(w, std::vector<T>(h, d));
width = w;
@@ -32,13 +32,13 @@ PokeMod::Matrix<T>::Matrix(unsigned w, unsigned h, T &d)
}
template<class T>
-PokeMod::Matrix<T>::Matrix(XmlElement &x)
+PokeGen::PokeMod::Matrix<T>::Matrix(XmlElement &x)
{
ImportXml(xml);
}
template<class T>
-void PokeMod::Matrix<T>::AddRow(T &d)
+void PokeGen::PokeMod::Matrix<T>::AddRow(T &d)
{
for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
i->push_back(d);
@@ -46,7 +46,7 @@ void PokeMod::Matrix<T>::AddRow(T &d)
}
template<class T>
-void PokeMod::Matrix<T>::ImportXml(XmlElement &xml)
+void PokeGen::PokeMod::Matrix<T>::ImportXml(XmlElement &xml)
{
LogImportStart("Matrix");
String curName;
@@ -108,7 +108,7 @@ void PokeMod::Matrix<T>::ImportXml(XmlElement &xml)
}
template<class T>
-PokeMod::XmlElement PokeMod::Matrix<T>::ExportXml(const String &val)
+PokeGen::PokeMod::XmlElement PokeGen::PokeMod::Matrix<T>::ExportXml(const String &val)
{
Log(String("Matrix Export: Starting %s", val.c_str()), PM_DEBUG_INFO);
// Declare the elements
@@ -130,14 +130,14 @@ PokeMod::XmlElement PokeMod::Matrix<T>::ExportXml(const String &val)
}
template<class T>
-void PokeMod::Matrix<T>::AddCol(T &d)
+void PokeGen::PokeMod::Matrix<T>::AddCol(T &d)
{
matrix.push_back(std::vector<T>(GetHeight(), d));
++width;
}
template<class T>
-bool PokeMod::Matrix<T>::InsertRow(unsigned pos, T &d)
+bool PokeGen::PokeMod::Matrix<T>::InsertRow(unsigned pos, T &d)
{
if (height < pos)
return false;
@@ -148,7 +148,7 @@ bool PokeMod::Matrix<T>::InsertRow(unsigned pos, T &d)
}
template<class T>
-bool PokeMod::Matrix<T>::InsertCol(unsigned pos, T &d)
+bool PokeGen::PokeMod::Matrix<T>::InsertCol(unsigned pos, T &d)
{
if (width < pos)
return false;
@@ -158,7 +158,7 @@ bool PokeMod::Matrix<T>::InsertCol(unsigned pos, T &d)
}
template<class T>
-bool PokeMod::Matrix<T>::DeleteRow(unsigned pos)
+bool PokeGen::PokeMod::Matrix<T>::DeleteRow(unsigned pos)
{
if (height <= pos)
return false;
@@ -169,7 +169,7 @@ bool PokeMod::Matrix<T>::DeleteRow(unsigned pos)
}
template<class T>
-bool PokeMod::Matrix<T>::DeleteCol(unsigned pos)
+bool PokeGen::PokeMod::Matrix<T>::DeleteCol(unsigned pos)
{
if (width <= pos)
return false;
@@ -179,7 +179,7 @@ bool PokeMod::Matrix<T>::DeleteCol(unsigned pos)
}
template<class T>
-bool PokeMod::Matrix<T>::Set(unsigned row, unsigned col, T &s)
+bool PokeGen::PokeMod::Matrix<T>::Set(unsigned row, unsigned col, T &s)
{
if ((width <= col) || (height <= col))
return false;
@@ -188,7 +188,7 @@ bool PokeMod::Matrix<T>::Set(unsigned row, unsigned col, T &s)
}
template<class T>
-T PokeMod::Matrix<T>::Get(unsigned row, unsigned col)
+T PokeGen::PokeMod::Matrix<T>::Get(unsigned row, unsigned col)
{
if ((width <= col) || (height <= col))
return T();
@@ -196,7 +196,7 @@ T PokeMod::Matrix<T>::Get(unsigned row, unsigned col)
}
template<class T>
-std::vector<T> PokeMod::Matrix<T>::GetRow(unsigned row)
+std::vector<T> PokeGen::PokeMod::Matrix<T>::GetRow(unsigned row)
{
std::vector<T> r;
for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
@@ -205,31 +205,31 @@ std::vector<T> PokeMod::Matrix<T>::GetRow(unsigned row)
}
template<class T>
-std::vector<T> PokeMod::Matrix<T>::GetCol(unsigned col)
+std::vector<T> PokeGen::PokeMod::Matrix<T>::GetCol(unsigned col)
{
return matrix[col];
}
template<class T>
-unsigned PokeMod::Matrix<T>::GetHeight()
+unsigned PokeGen::PokeMod::Matrix<T>::GetHeight()
{
return height;
}
template<class T>
-unsigned PokeMod::Matrix<T>::GetWidth()
+unsigned PokeGen::PokeMod::Matrix<T>::GetWidth()
{
return width;
}
template<class T>
-T PokeMod::Matrix<T>::operator[](Point &p)
+T PokeGen::PokeMod::Matrix<T>::operator[](Point &p)
{
return matrix[p.GetY()][p.GetX()];
}
template<class T>
-std::vector<T> PokeMod::Matrix<T>::operator[](int col)
+std::vector<T> PokeGen::PokeMod::Matrix<T>::operator[](int col)
{
return matrix[col];
}