• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames

kgrid2d.h File Reference

#include <math.h>
#include <QtCore/QPair>
#include <QtCore/QVector>
#include <QtCore/QTextStream>
#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::Hexagonal< Type >
 This template implements a hexagonal grid where hexagons form horizontal lines:. More...
class  KGrid2D::HexagonalBase
 This class contains static methods to manipulate coordinates on an hexagonal grid where hexagons form horizontal lines:. More...
class  KGrid2D::Square< T >
 This template is a Generic implementation for a square bidimensionnal grid (SquareBase). More...
class  KGrid2D::SquareBase
 kgamecanvas.hThis class contains static methods to manipulate coordinates for a square bidimensionnal grid. More...

Typedefs

typedef QPair< int, int > KGrid2D::Coord
typedef QList< Coord > KGrid2D::CoordList

Functions

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

Definition at line 61 of file kgrid2d.h.

KGrid2D::Coord minimum ( const KGrid2D::Coord &  c1,
const KGrid2D::Coord &  c2 
) [inline]

Returns:
the minimum of both coordinates.

Definition at line 68 of file kgrid2d.h.

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

Definition at line 48 of file kgrid2d.h.

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

Definition at line 53 of file kgrid2d.h.

template<class Type>
QDataStream& operator<< ( QDataStream &  s,
const KGrid2D::Generic< Type > &  m 
) [inline]

Definition at line 205 of file kgrid2d.h.

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

Definition at line 76 of file kgrid2d.h.

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

Definition at line 72 of file kgrid2d.h.

template<class Type>
QDataStream& operator>> ( QDataStream &  s,
KGrid2D::Generic< Type > &  m 
) [inline]

Definition at line 212 of file kgrid2d.h.

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal