kgrid2d.h File Reference

#include <math.h>
#include <qpair.h>
#include <qvaluelist.h>
#include <qvaluevector.h>
#include <kglobal.h>

Include dependency graph for kgrid2d.h:

Go to the source code of this file.

Namespaces

namespace  KGrid2D

Classes

class  KGrid2D::Generic< Type >
 This template class represents a generic bidimensionnal grid. More...
class  KGrid2D::SquareBase
 This class contains static methods to manipulate coordinates for a square bidimensionnal grid. More...
class  KGrid2D::Square< T >
 This template is a Generic implementation for a square bidimensionnal grid (SquareBase). More...
class  KGrid2D::HexagonalBase
 This class contains static methods to manipulate coordinates on an hexagonal grid where hexagons form horizontal lines:. More...
class  KGrid2D::Hexagonal< Type >
 This template implements a hexagonal grid where hexagons form horizontal lines:. More...

Typedefs

typedef QPair< int, int > KGrid2D::Coord
 This type represents coordinates on a bidimensionnal grid.
typedef QValueList< CoordKGrid2D::CoordList
 This type represents a list of Coord.

Functions

KGrid2D::Coord operator+ (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
KGrid2D::Coord operator- (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
KGrid2D::Coord maximum (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
KGrid2D::Coord minimum (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
QTextStream & operator<< (QTextStream &s, const KGrid2D::Coord &c)
QTextStream & operator<< (QTextStream &s, const KGrid2D::CoordList &list)
template<class Type>
QDataStream & operator<< (QDataStream &s, const KGrid2D::Generic< Type > &m)
template<class Type>
QDataStream & operator>> (QDataStream &s, KGrid2D::Generic< Type > &m)


Function Documentation

KGrid2D::Coord maximum const KGrid2D::Coord c1,
const KGrid2D::Coord c2
[inline]
 

Returns:
the maximum of both coordinates.
Since:
3.2

Definition at line 71 of file kgrid2d.h.

KGrid2D::Coord minimum const KGrid2D::Coord c1,
const KGrid2D::Coord c2
[inline]
 

Returns:
the minimum of both coordinates.
Since:
3.2

Definition at line 79 of file kgrid2d.h.

KGrid2D::Coord operator+ const KGrid2D::Coord c1,
const KGrid2D::Coord c2
[inline]
 

Definition at line 57 of file kgrid2d.h.

KGrid2D::Coord operator- const KGrid2D::Coord c1,
const KGrid2D::Coord c2
[inline]
 

Definition at line 62 of file kgrid2d.h.

template<class Type>
QDataStream& operator<< QDataStream &  s,
const KGrid2D::Generic< Type > &  m
 

Definition at line 216 of file kgrid2d.h.

QTextStream& operator<< QTextStream &  s,
const KGrid2D::CoordList list
[inline]
 

Definition at line 87 of file kgrid2d.h.

QTextStream& operator<< QTextStream &  s,
const KGrid2D::Coord c
[inline]
 

Definition at line 83 of file kgrid2d.h.

template<class Type>
QDataStream& operator>> QDataStream &  s,
KGrid2D::Generic< Type > &  m
 

Definition at line 223 of file kgrid2d.h.

References KGrid2D::Generic< Type >::resize(), and KGrid2D::Generic< Type >::size().

Here is the call graph for this function:


Generated on Wed Aug 23 18:04:36 2006 for libkdegames by  doxygen 1.4.6