int_vector.h

Go to the documentation of this file.
00001 /*
00002 **    Mesh Converter
00003 **    Copyright (C) 2008  Damien Rohmer
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 3 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 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, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 
00020 /*
00021 ** int_vector.h
00022 ** 
00023 ** Made by damien
00024 ** Login   <damien@ortie.inrialpes.fr>
00025 ** 
00026 ** Started on  Thu Feb  7 20:42:09 2008 damien
00027 ** Last update Thu Feb  7 20:42:09 2008 damien
00028 */
00029 
00030 #ifndef         INT_VECTOR_H_
00031 # define        INT_VECTOR_H_
00032 
00033 #include <stdlib.h>
00034 #include <iostream>
00035 #include <cmath>
00036 #include <string>
00037 #include <errno.h>
00038 #include <stdio.h>
00039 
00040 #include <vector>
00041 using namespace std;
00042 
00043 class int_vector
00044 {
00045  public:
00046   int_vector();
00047   int_vector(const int_vector&);
00048   int_vector(const std::vector<int>&);
00049   ~int_vector();
00050 
00051   int size() const;
00052   int resize(int _size);
00053 
00054   int &operator[](int k_vertex);
00055   int operator[](int k_vertex) const;
00056   int_vector& operator=(const int_vector&);
00057 
00058   int add_unique(int k_index);
00059   int add(int k_vertex);
00060   int add(const std::vector <int>& _int_list);
00061 
00063 
00065   int exists(int index_to_find) const;
00066 
00067   friend bool operator==(const int_vector& cont_1,const int_vector& cont_2);
00068   friend bool operator!=(const int_vector& cont_1,const int_vector& cont_2);
00069 
00070  private:
00071   
00072   std::vector <int> int_list;
00073 };
00074 
00075 
00076 #endif      /* !INT_VECTOR_H_ */

Generated on Mon Mar 30 16:55:54 2009 by  doxygen 1.5.6