Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef VIL_NITF2_INDEX_VECTOR_H
00006 #define VIL_NITF2_INDEX_VECTOR_H
00007
00008 #include <vcl_ostream.h>
00009 #include <vcl_vector.h>
00010
00011
00012
00013
00014
00015
00016 class vil_nitf2_index_vector : public vcl_vector<int>
00017 {
00018 public:
00019
00020 vil_nitf2_index_vector() : vcl_vector<int>() {}
00021 vil_nitf2_index_vector(int i): vcl_vector<int>(1) {
00022 (*this)[0] = i; }
00023 vil_nitf2_index_vector(int i, int j) : vcl_vector<int>(2) {
00024 (*this)[0] = i; (*this)[1] = j; }
00025 vil_nitf2_index_vector(int i, int j, int k) : vcl_vector<int>(3) {
00026 (*this)[0] = i; (*this)[1] = j; (*this)[2] = k; }
00027 vil_nitf2_index_vector(int i, int j, int k, int l) : vcl_vector<int>(4) {
00028 (*this)[0] = i; (*this)[1] = j; (*this)[2] = k; (*this)[3] = l; }
00029
00030
00031 vil_nitf2_index_vector(const vcl_vector<int>& v) : vcl_vector<int>(v) {}
00032
00033
00034 virtual ~vil_nitf2_index_vector() {}
00035 };
00036
00037 inline vcl_ostream& operator << (vcl_ostream& os, const vil_nitf2_index_vector& vec)
00038 {
00039 os << '(';
00040 for (vil_nitf2_index_vector::const_iterator it = vec.begin(); it != vec.end(); ++it) {
00041 if (it != vec.begin()) os << ", ";
00042 os << *it;
00043 }
00044 os << ')';
00045 return os;
00046 }
00047
00048 #endif // VIL_NITF2_INDEX_VECTOR_H