/* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PG_REPEATBASE_H_ #define PG_REPEATBASE_H_ #include #pragma interface #include #include #include class RepeatBase : public PGObject { protected: RepeatBase(PGObject::subclass_t); RepeatBase(const RepeatBase&); const RepeatBase& operator = (const RepeatBase&); public: ~RepeatBase(); void unset(); bool ispresent() const; PGObject& operator [] (u_int); PGObject &car() const; RepeatBase *cdr() const; bool end() const; PGObject &prepend(); PGObject &prepend(const PGObject&); PGObject &append(); PGObject &append(const PGObject&); bool commit(); bool OK() const; protected: PGObject *_car; RepeatBase *_cdr; virtual PGObject* ctora() const = 0; virtual PGObject* ctora(const PGObject*) const = 0; virtual RepeatBase* ctord() const = 0; }; #ifndef OUTLINE # include "RepeatBase.icc" #endif #endif /* !PG_REPEATBASE_H_ */