/*
** SellaNMS
** $Id: format_statement_from.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 __FORMAT_STATEMENT_FROM_H__
#define __FORMAT_STATEMENT_FROM_H__

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

#include "from.h"
#include "format_statement_from_group.h"
#include "format_statement_from_variable.h"
#include <stl/slist>

class FormatStatementFrom: public From {
	public:
		FormatStatementFrom();
		FormatStatementFrom(From const &src);
		FormatStatementFrom(FormatStatementFrom const &src);
		virtual ~FormatStatementFrom();
		virtual From const& operator=(From const &src);
		virtual FormatStatementFrom const& operator=(FormatStatementFrom const &src);

		virtual RESULT compile(ConfigNode *config);

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

		RESULT getAppliedMapStatements(slist<string> &map_names);

		RESULT setVariableType(unsigned long &type, string &variable);
		RESULT setVariableFunction(unsigned long &function, string &variable);
		RESULT setVariableMap(slist<string> &mapStatements, string &variable);

	private:
		slist<FormatStatementFromGroup>		groups;
		slist<FormatStatementFromVariable>	variables;
};

#endif

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