Generic.cpp

00001 /*
00002  *  Copyright (C) 2010  Regents of the University of Michigan
00003  *
00004  *   This program is free software: you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, either version 3 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #include "Generic.h"
00019 
00020 #if defined(TEST)
00021 
00022 #include <iostream>
00023 #include <list>
00024 #include <utility>
00025 #include <vector>
00026 
00027 //
00028 // g++ -g -o testGeneric -DTEST Generic.cpp
00029 //
00030 int main(int argc, const char **argv)
00031 {
00032     std::vector<int> a;
00033     std::vector< std::pair<int, int> > b;
00034     std::pair<int, int> c;
00035 
00036     std::vector<int>::iterator i;
00037 
00038     a.push_back(0);
00039     a.push_back(1);
00040     a.push_back(2);
00041     a.push_back(3);
00042 
00043     std::cout << a;
00044 
00045     c.first = 10;
00046     c.second = 20;
00047     b.push_back(c);
00048     b.push_back(c);
00049     b.push_back(c);
00050 
00051     std::cout << b;
00052 
00053     i = a.begin();
00054 
00055     std::list<std::pair<int, int> > l;
00056 
00057     l.push_back(c);
00058 
00059     std::cout << l;
00060 
00061 //  std::cout << "iterator i: " << i << std::endl;
00062 
00063 //  std::cout << argv;
00064 }
00065 
00066 #endif
Generated on Tue Sep 6 17:52:00 2011 for libStatGen Software by  doxygen 1.6.3