/*
** SellaNMS
** $Id: map_statement_term.h,v 1.6 2005/08/18 06:51:45 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 __MAP_STATEMENT_TERM_H__
#define __MAP_STATEMENT_TERM_H__

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

#include "term.h"
#include "map_statement.h"

class MapStatementTerm: public Term {
	public:
		MapStatementTerm();
		MapStatementTerm(Term const &src);
		MapStatementTerm(MapStatementTerm const &src);
		virtual ~MapStatementTerm();
		virtual Term const& operator=(Term const &src);
		virtual MapStatementTerm const& operator=(MapStatementTerm const &src);

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

		virtual RESULT clear();
		virtual RESULT print(unsigned long depth);
		
	protected:

	private:
		string								table;
		vector<string>						defined;
		vector<string>						definedExcept;
		string								query;

		slist<pair<string, string> >	fields;
		slist<pair<string, string> >	variables;
};

#endif

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