00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 2003-2008 Peter Miller 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 00017 // <http://www.gnu.org/licenses/>. 00018 // 00019 00020 #ifndef LIBAEGIS_CHANGE_LIST_H 00021 #define LIBAEGIS_CHANGE_LIST_H 00022 00023 #include <common/main.h> 00024 00025 class change_list_ty 00026 { 00027 public: 00028 size_t length; 00029 private: 00030 size_t maximum; 00031 public: 00032 change::pointer *item; 00033 00037 ~change_list_ty(); 00038 00042 change_list_ty(); 00043 00048 void append(change::pointer cp); 00049 00054 bool member_p(change::pointer cp) const; 00055 00059 void clear(); 00060 00065 size_t size() const { return length; } 00066 00074 bool empty() const { return (length == 0); } 00075 00083 change::pointer get(size_t n) const { return item[n]; } 00084 00092 change::pointer operator[](size_t n) const { return get(n); } 00093 00094 private: 00098 change_list_ty(const change_list_ty &); 00099 00103 change_list_ty &operator=(const change_list_ty &); 00104 }; 00105 00106 #endif // LIBAEGIS_CHANGE_LIST_H