#ifndef CFBASETIDY_H
#define CFBASETIDY_H
#include <string>

class CCFBaseTidy
{
public:
	CCFBaseTidy();
	virtual ~CCFBaseTidy();

	/**
	* ʽ
	* @param const char * pSourceIn
	* @param const char * pOptions
	* @param string & strOut
	* @param string & strErr
	* @return bool
	*/
	virtual bool TidyMain(const char* pSourceIn, const char* pOptions, std::string &strOut, std::string &strErr);

protected:

	/**
	* øʽ
	* @param void * pTidy ʽָ
	* @param const char * pOptions 
	*/
	void TidyOptionsSet(void* pTidy, const char* pOptions);

	/**
	* ʼĬϵĸʽ
	*/
	virtual void InitTidyDefault();

	/**
	* øʽ
	* @param const char * pOptions 
	*/
	void SetTidyFromOptions(const char* pOptions);

	/**
	* ÿһĲ
	* @param const char * pOption 
	* @param int nPos ʼλ
	* @param int nSize С
	*/
	void SetTidyOption(const char* pOption, int nPos, int nSize);

	/**
	* þ
	* @param const std::string & strParam д
	* @param int nNumValue ֵ
	* @param const std::string & strNumValue ֵ
	* @param const std::string & strTextValue ıֵ
	*/
	virtual void SetTidyProp(const std::string& strParam, int nNumValue, const std::string& strNumValue, const std::string& strTextValue);

	/**
	* ĸʽָ
	*/
	void* tidy;
};
#endif
