#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Logic/Base/LList.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVLLOGIC_LLIST_HEADER #define RAVLLOGIC_LLIST_HEADER 1 ///////////////////////////////////////////////////////////////////// //! rcsid="$Id: LList.hh,v 1.4 2002/08/09 14:14:41 jonstarck Exp $" //! docentry="Ravl.Logic" //! lib=RavlLogic //! file="Ravl/Logic/Base/LList.hh" //! author="Charles Galambos" #include "Ravl/Logic/Literal.hh" #include "Ravl/DList.hh" namespace RavlLogicN { using namespace RavlN; //! userlevel=Develop //: Logical List. class LListBodyC : public LiteralBodyC { public: LListBodyC() {} //: Default constructor. DListC &List() { return lst; } //: Access list. virtual bool Unify(const LiteralC &oth,BindSetC &bs) const; //: Unify with another variable. protected: virtual bool UnifyLiteral(const LiteralBodyC &oth,BindSetC &bs) const; //: Unify with simple symb. DListC lst; }; //! userlevel=Normal //: Logical List. class LListC : public LiteralC { public: LListC() {} //: Default constructor. // Creates invalid handle. LListC(bool) : LiteralC(*new LListBodyC()) {} //: Constructor. protected: LListBodyC &Body() { return static_cast(LiteralC::Body()); } //: Body access. const LListBodyC &Body() const { return static_cast(LiteralC::Body()); } //: Body access. public: DListC &List() { return Body().List(); } //: Access list. }; } #endif