#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Logic/Base/Var.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_VAR_HEADER #define RAVLLOGIC_VAR_HEADER 1 ///////////////////////////////////////////////////////// //! rcsid="$Id: Var.hh,v 1.6 2002/08/09 14:14:41 jonstarck Exp $" //! docentry="Ravl.Logic" //! lib=RavlLogic //! author="Charles Galambos" //! file="Ravl/Logic/Base/Var.hh" #include "Ravl/Logic/Literal.hh" namespace RavlLogicN { using namespace RavlN; //! userlevel=Develop //: Variable body. class VarBodyC : public LiteralBodyC { public: VarBodyC() {} //: Default constructor. virtual bool IsVariable() const { return true; } //: Is this a variable ? virtual bool IsGrounded() const { return false; } //: Is this a simple object with no variables ? virtual void Dump(ostream &out); //: Dump info in human readable format to stream 'out'. virtual StringC Name() const; //: Get the name of symbol. virtual bool Substitute(const BindSetC &binds,LiteralC &result) const; //: Substitute variables in 'binds' for their bound values. // This builds a new literal with the substute values (if there // are any). The new value is assigned to 'result'
// Returns true if at least one substitution has been made,
// false if none.
virtual bool ReplaceVars(HashC