]> git.donarmstrong.com Git - flightcrew.git/blob - src/zipios/src/zipios_common.h
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / zipios / src / zipios_common.h
1 #ifndef ZIPIOS_COMMON_H
2 #define ZIPIOS_COMMON_H
3
4 #include "zipios++/zipios-config.h"
5
6 #include <vector>
7
8 namespace zipios {
9
10 using std::vector;
11
12 static const char separator = '/' ;
13
14 template< class Type >
15 void operator += ( vector< Type > &v1, const vector< Type > &v2 ) {
16   typename std::vector<Type>::const_iterator cit ;
17   for ( cit = v2.begin() ; cit != v2.end() ; ++cit )
18     v1.push_back( *cit ) ;
19 }
20
21 template< class T >
22 inline const T& min( const T& a, const T& b ) {
23   return b < a ? b : a ;
24 }
25
26
27 } // namespace
28
29 #endif
30
31 /** \file
32     Header file containing miscellaneous small functions.
33 */
34
35 /*
36   Zipios++ - a small C++ library that provides easy access to .zip files.
37   Copyright (C) 2000  Thomas Søndergaard
38   
39   This library is free software; you can redistribute it and/or
40   modify it under the terms of the GNU Lesser General Public
41   License as published by the Free Software Foundation; either
42   version 2 of the License, or (at your option) any later version.
43   
44   This library is distributed in the hope that it will be useful,
45   but WITHOUT ANY WARRANTY; without even the implied warranty of
46   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47   Lesser General Public License for more details.
48   
49   You should have received a copy of the GNU Lesser General Public
50   License along with this library; if not, write to the Free Software
51   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
52 */