Página Principal   Hierarquia de Classes   Lista de Componentes   Lista de Arquivos   Componentes Membros  

Mapping.hpp

00001 /*      Mapping.hpp - Morpheous
00002  *
00003  *  $Header: /home/aldon/cvs/Morpheous/include/Mapping.hpp,v 1.3 2003/08/21 02:00:56 aldon Exp $
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019 
00020 
00021 #ifndef __MAPPING_HPP__
00022 #define __MAPPING_HPP__
00023 
00024 #include <stdio.h>
00025 #include <vector>
00026 #include "Vector.hpp"
00027 #include "Pair.hpp"
00028 
00032 enum WhichImage {LEFT = 1, RIGHT = 2};
00033 
00037 class Mapping
00038 {
00039 private:
00043     std::vector<Pair> pairList;
00044 
00048     int selected;
00049 
00050 public:
00051 
00055     static const int NONE = -1;
00056 
00060     Mapping();
00061 
00065     ~Mapping();
00066 
00071     int getLength() const;
00072 
00076     void add(const Pair& pair);
00077     
00081     void removeSelected();
00082     
00088     void select(const Vector& point, WhichImage which);
00089 
00094     void save(FILE* out) const;
00095 
00100     void load(FILE* in);
00101     
00107     const Pair& getPair(int index) const;
00108     
00113     int getSelectedIndex() const;
00114     
00120     void moveSelected(const Vector& point, WhichImage which);
00121 
00126     const Pair* getPairList() const;
00127 
00134     const Vector& getPoint(int index, WhichImage which);
00135 };
00136 
00137 
00138 #endif // __MAPPING_HPP__

Gerado em Sun Sep 21 20:18:44 2003 para Morpheous por doxygen1.2.13.1 escrito por Dimitri van Heesch, © 1997-2001