summaryrefslogtreecommitdiff
path: root/src/keyword-list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyword-list.h')
-rw-r--r--src/keyword-list.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/keyword-list.h b/src/keyword-list.h
index 0a3f5d3..18a7158 100644
--- a/src/keyword-list.h
+++ b/src/keyword-list.h
@@ -27,19 +27,33 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include "keyword.h"
/* List node of a linear list of Keyword. */
-class KeywordExt_List {
+class Keyword_List
+{
public:
/* Constructor. */
- KeywordExt_List (KeywordExt *car);
+ Keyword_List (Keyword *car);
/* Access to first element of list. */
- KeywordExt * first () { return _car; }
+ Keyword * first () { return _car; }
/* Access to next element of list. */
- KeywordExt_List *& rest () { return _cdr; }
+ Keyword_List *& rest () { return _cdr; }
+
+protected:
+ Keyword_List * _cdr;
+ Keyword * const _car;
+};
+
+/* List node of a linear list of KeywordExt. */
+class KeywordExt_List : public Keyword_List
+{
+public:
+ /* Unused constructor. */
+ KeywordExt_List (KeywordExt *car);
-private:
- KeywordExt_List * _cdr;
- KeywordExt * const _car;
+ /* Access to first element of list. */
+ KeywordExt * first () { return static_cast<KeywordExt*>(_car); }
+ /* Access to next element of list. */
+ KeywordExt_List *& rest () { return static_cast<KeywordExt_List*>(_cdr); }
};
#endif