home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 17
/
Freelog017.iso
/
BeOS
/
ababelone
/
Sources
/
Coordonnees.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-11-06
|
2KB
|
55 lines
/*
Copyright (C) 2000 by Hervé PHILIPPE <rv@bemail.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _COORDONNEES_H_
#define _COORDONNEES_H_
#include <SupportDefs.h> // Pour int8
#define TYPE_COORD int8
#define COORD_NULL Coordonnees(-1, -1)
class Coordonnees
{
// FONCTIONS
public:
// Constructeurs
Coordonnees();
Coordonnees(const Coordonnees& coordonnees_case);
Coordonnees(TYPE_COORD coord_x, TYPE_COORD coord_y);
// Destructeur
~Coordonnees();
// Opérateurs
Coordonnees& operator=(const Coordonnees& coordonnees_case);
Coordonnees operator+(const Coordonnees& coordonnees_case) const;
Coordonnees operator-(const Coordonnees& coordonnees_case) const;
Coordonnees& operator+=(const Coordonnees& coordonnees_case);
Coordonnees& operator-=(const Coordonnees& coordonnees_case);
bool operator==(const Coordonnees& coordonnees_case);
bool operator!=(const Coordonnees& coordonnees_case);
// VARIABLES ET CONSTANTES
public:
TYPE_COORD x;
TYPE_COORD y;
};
#include "Coordonnees.cpp" // Obligatoire, car ce sont des fonctions "inline" !
#endif