Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/support/agcontainer.h @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 /* | |
2 * AnaGram, A System for Syntax Directed Programming | |
3 * Copyright 1997-2002 Parsifal Software. All Rights Reserved. | |
4 * See the file COPYING for license and usage terms. | |
5 * | |
6 * agccontainer.h - container class | |
7 */ | |
8 | |
9 #ifndef AGCONTAINER_H | |
10 #define AGCONTAINER_H | |
11 | |
12 template <class T> | |
13 class AgContainer { | |
14 public: | |
15 virtual ~AgContainer() {} | |
16 virtual unsigned size() const = 0; | |
17 }; | |
18 | |
19 template <class T> | |
20 class AgIndexedContainer : public AgContainer<T> { | |
21 public: | |
22 virtual ~AgIndexedContainer() {} | |
23 virtual T &operator [] (const unsigned) = 0; | |
24 virtual const T &operator [] (const unsigned) const = 0; | |
25 }; | |
26 | |
27 #endif /* AGCONTAINER_H */ |