// Copyright (c) 1999-2000 David Muse
// See the COPYING file for more information

#ifndef EMBEDSCRIPT_H
#define EMBEDSCRIPT_H

#include <inputoutput.h>

class embedscript : virtual public inputoutput {
	public:
		void	convertToPerl(strstream *container, char *string);
		void	convertToPython(strstream *container, char *string);
		void	convertToTCL(strstream *container, char *string);
		void	convertToZend(strstream *container, char *string);
		void	convertToPHP(strstream *container, char *string);
			// These functions convert "string" to 
			// perl/python/tcl/php(zend) code.  Embedded code is
			// identified by <"language"> </"language"> tags,
			// such as <perl> </perl>.  The resulting code is 
			// written to "container" or to standard output if
			// "container" is NULL.  
			//
			// A perl/python/tcl/php(zend) engine may then be
			// used to process the contents of "container".

		void	convertToScript(strstream *container, char *string,
					char *tagstart, char *tagend, 
					char *printstart, char *printend, 
					char *escreturn);
			// These functions convert "string" to arbitrary
			// scripting language code.  Embedded code is
			// identified by <"tagstart"> </"tagend"> tags.
			// The resulting code is written to "container" or 
			// to standard output if "container" is NULL.
			// The "printstart" and "printend" parameters need the
			// syntax for the "print" command of the language 
			// (such as   "print (\""   and   "\");"   in python).
			// The "escreturn" parameter needs the escape sequence
			// for a carriage return (such as \n in most languages).
};


#endif