/*
** SellaNMS
** $Id: suffix.h,v 1.5 2006/01/24 07:08:10 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 __SUFFIX_H__
#define __SUFFIX_H__

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

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

#define	FUNCTION_NOP	0x00000001
#define	FUNCTION_ADD	0x00000002
#define	FUNCTION_SUB	0x00000004
#define	FUNCTION_MUL	0x00000008
#define	FUNCTION_DIV	0x00000010

class Suffix: public Clause {
	public:
		RESULT setName(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);

	private:
		string				name;

		unsigned long		function;
		unsigned long		argument;

		slist<Dependency>	dependencies;
};

#endif

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