1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Separate the KeywordExt from the list node that points to it.

This commit is contained in:
Bruno Haible
2002-11-20 12:58:14 +00:00
parent 2cd11405ed
commit befb3d467e
4 changed files with 17 additions and 8 deletions

View File

@@ -26,19 +26,20 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include "keyword.h"
/* List node of a linear list. */
class KeywordExt_List : private KeywordExt {
/* List node of a linear list of Keyword. */
class KeywordExt_List {
public:
/* Constructor. */
KeywordExt_List (const char *allchars, int allchars_length, const char *rest);
KeywordExt_List (KeywordExt *car);
/* Access to first element of list. */
KeywordExt * first () { return this; }
KeywordExt * first () { return _car; }
/* Access to next element of list. */
KeywordExt_List *& rest () { return _cdr; }
private:
KeywordExt_List * _cdr;
KeywordExt * const _car;
};
#endif