Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

xypos.h

Go to the documentation of this file.
00001 //* Módulo   : xypos.h                                                           
00002 // _Desc_    : Declara classe XYPosition.
00003 // _Autores_ : Carlos Henrique Levy e Jaudênia Cavalcante.                       
00004 // _Data_    : 15 mar 96.                                                           
00005 
00006 
00007 #ifndef __XYPOS_H
00008 #define __XYPOS_H
00009 
00010 #include "xycoord.h"
00011 
00012 class XYObject;
00013 
00014 //* XYPosition
00015 //    Classe que define a posição de um objeto de forma absoluta ou de forma 
00016 // relativa a um outro objeto.                                               
00017 class XYPosition
00018 {
00019    public:
00020 
00021  //* Construtores e Destrutor
00022    //* Construtor A
00023    XYPosition (
00024         XYCoordinate* x,      // coordenada x para posição
00025         XYCoordinate* y)      // coordenada y para posição      
00026         : _x(x), _y(y) {};
00027 
00028    //* Destrutor da classe XYPosition
00029    virtual ~XYPosition (void)
00030    {
00031       // libera valor da coordenada x
00032       if (_x) delete _x;
00033 
00034       // libera valor da coordenada y
00035       if (_y) delete _y;
00036    }
00037 
00038  //* Define/Consulta atributos
00039    //* Define as coordenadas
00040    virtual void set (XYCoordinate x, XYCoordinate y);
00041 
00042    //* Consulta as coordenadas
00043    virtual void getX (int* xr, const XYObject* org = 0) const;
00044    virtual void getX (double* xr, const XYObject* org = 0) const;
00045    virtual void getX (XYCoordinate* xr) const;
00046    virtual void getY (int* yr, const XYObject* org = 0) const;
00047    virtual void getY (double* yr, const XYObject* org = 0) const;
00048    virtual void getY (XYCoordinate* yr) const;
00049 
00050    private:
00051 
00052    XYCoordinate* _x;   // valor para a coordenada x da posição
00053    XYCoordinate* _y;   // valor para a coordenada y da posição
00054 };
00055 
00056 #endif
00057 

XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group