/*
** SellaNMS
** $Id: statement.h,v 1.5 2005/05/21 23:10:28 sella Exp $
** Copyright (c) 2001-2005 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

#ifndef __STATEMENT_H__
#define __STATEMENT_H__

#ifdef HAVE_CONFIG_H
	#include "config.h"
#endif

#include "clause.h"
#include "term.h"
#include <stl/string>
#include <stl/slist>

class Statement: public Clause {
	public:
		Statement();
		Statement(Statement const &src);
		virtual ~Statement();
		virtual Statement const& operator=(Statement const &src);

		RESULT setName(const string &name);
		string getName();

		virtual ACTION evaluate(variable_binding_t &input);
		virtual RESULT compile(ConfigNode *config);

		virtual RESULT clear();
		virtual RESULT print(unsigned long depth = 0);

		int gui_debug;

	protected:
		RESULT setType(const string &type);
		RESULT appendTerm(Term *term);

		virtual Term *getNewStatementTerm() const;

		slist<Term *>		terms;

	private:
		string				type;
		string				name;
};

#endif

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3 sts=3
*/
