Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Container.hpp

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2004 Andrew Sutton 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library 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 GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to: 00016 * 00017 * The Free Software Foundation, Inc. 00018 * 59 Temple Place, Suite 330 00019 * Boston, MA 02111-1307 USA 00020 * 00021 * Contact: 00022 * Andrew Sutton asutton@cs.kent.edu 00023 */ 00024 00025 #ifndef OMF_CONTAINER_HPP 00026 #define OMF_CONTAINER_HPP 00027 00028 // OMF includes 00029 #include <OMF/Object.hpp> 00030 #include <OMF/Iterator.hpp> 00031 #include <OMF/ConstIterator.hpp> 00032 00033 namespace OMF 00034 { 00048 class Container : public Object 00049 { 00050 public: 00051 Container(); 00052 virtual ~Container(); 00053 00054 virtual size_t size() const = 0; 00055 virtual bool empty() const = 0; 00056 00057 virtual Iterator begin() = 0; 00058 virtual Iterator end() = 0; 00059 virtual Iterator find(Object *obj) = 0; 00060 virtual Iterator find(bool value) = 0; 00061 virtual Iterator find(int value) = 0; 00062 virtual Iterator find(const char *value) = 0; 00063 00064 virtual ConstIterator begin() const = 0; 00065 virtual ConstIterator end() const = 0; 00066 virtual ConstIterator find(Object *obj) const = 0; 00067 virtual ConstIterator find(bool value) const = 0; 00068 virtual ConstIterator find(int value) const = 0; 00069 virtual ConstIterator find(const char *value) const = 0; 00070 00074 virtual void add(Object *obj) = 0; 00075 virtual void add(bool value) = 0; 00076 virtual void add(int value) = 0; 00077 virtual void add(const char *value) = 0; 00078 00082 virtual void remove(Object *obj) = 0; 00083 virtual void remove(bool value) = 0; 00084 virtual void remove(int value) = 0; 00085 virtual void remove(const char *value) = 0; 00086 00090 virtual void clear() = 0; 00091 00096 bool contains(Object *obj) const; 00097 bool contains(bool value) const; 00098 bool contains(int value) const; 00099 bool contains(const char *value) const; 00100 00108 void collect(OMF::Object *obj); 00109 00115 virtual unsigned hashCode() const; 00116 }; 00117 } 00118 00119 #endif

Generated on Fri Sep 10 13:07:33 2004 for OpenModelingFramework by doxygen 1.3.8