From 2fce43d484e4148ae858f410d51dcd9951d34374 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sun, 18 Sep 2016 15:45:13 +0000 Subject: remove include & rename --- omegalib/omega_lib/include/basic/Collection.h | 47 --------------------------- 1 file changed, 47 deletions(-) delete mode 100644 omegalib/omega_lib/include/basic/Collection.h (limited to 'omegalib/omega_lib/include/basic/Collection.h') diff --git a/omegalib/omega_lib/include/basic/Collection.h b/omegalib/omega_lib/include/basic/Collection.h deleted file mode 100644 index c7e4eef..0000000 --- a/omegalib/omega_lib/include/basic/Collection.h +++ /dev/null @@ -1,47 +0,0 @@ -#if !defined Already_Included_Collection -#define Already_Included_Collection - -namespace omega { - -template class Iterator; -template class Any_Iterator; - - -/* - * protocol for any kind of collection - */ - -template class Collection { -public: - virtual Iterator *new_iterator() = 0; - virtual Any_Iterator any_iterator() { return Any_Iterator(new_iterator()); } - - virtual int size() const = 0; -}; - - -/* - * protocol for collections whose elements are ordered - * by the way they are entered into the collection, and - * whose elements can be accessed by "index" - * - * note that the implementation need not be a linked list - */ - -template class Sequence : public Collection { -public: - virtual const T &operator[](int) const = 0; - virtual T &operator[](int) = 0; - - virtual int index(const T &) const = 0; // Y in X --> X[X.index(Y)] == Y -}; - -} // namespace - -#define instantiate_Collection(T) template class Collection; \ - instantiate_Any_Iterator(T) -#define instantiate_Sequence(T) template class Sequence; \ - instantiate_Collection(T) - -#endif - -- cgit v1.2.3-70-g09d2