diff options
author | Bruno Haible <bruno@clisp.org> | 2002-11-22 14:19:08 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2002-11-22 14:19:08 +0000 |
commit | 9fa6cbdde51fb80315b527d54ab14e112ab18adf (patch) | |
tree | 7a0c2216302f89c61f7bd81a940bca4828e841e3 /src/keyword-list.h | |
parent | 32f5ea88cf437049ce568b4dfa5e53c3baf83180 (diff) | |
download | gperf-9fa6cbdde51fb80315b527d54ab14e112ab18adf.tar.gz |
Let the input module see only Keyword, not KeywordExt.
Diffstat (limited to 'src/keyword-list.h')
-rw-r--r-- | src/keyword-list.h | 28 |
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 |