/** 
 * @file SynExtension.h
 * @brief չ
 * @author ޻ 
 * @date 2012-5-20
 * @details 
 */ 
#pragma once

#include "SynLanguage.h"

struct LanguageName {
	const TCHAR *langName;	//дעչû
	const TCHAR *extName;	//ĬϺ׺
	UINT langID;			//ö
};

class CSynExtension
{
public:
	CSynExtension(void);
	~CSynExtension(void);	
	
	/**
	 * ʼչעȡ
	 * @return void 
	 */
	void InitLanguageExt();
	
	/**
	 * չ
	 * @param CString strExt չ
	 * @return UINT Ա
	 */
	UINT GetLanguageByExt(CString strExt);
	
	/**
	 * ԷԱʶ
	 * @param UINT nLanguage Ա
	 * @return LPCTSTR Աʶ
	 */
	LPCTSTR GetLanguageString(UINT nLanguage);
	
	/**
	 * ԻȡԵĵһչڱʱʹ
	 * @param UINT nLanguage Ա
	 * @param CString & strFilter չ
	 * @return void 
	 */
	void GetLanguageOneFilter(UINT nLanguage, CString &strFilter);
	
	/**
	 * ԻȡԵչ
	 * @param UINT nLanguage Ա
	 * @param CString & strFilter չ
	 * @return void 
	 */
	void GetLanguageFilter(UINT nLanguage, CString &strFilter);
	
	/**
	 * Եչ
	 * @param UINT nLanguage Ա
	 * @param const CString & strFilter չ 
	 * @return void 
	 */
	void SetLanguageFilter(UINT nLanguage, CString &strFilter);

	/**
	 * ȡԵչɴ/Իʽ
	 * @param CString & strFilter չ
	 * @return void 
	 */
	void GetAllLanguageFilter(CString &strFilter);
	
	/**
	 * жϺ׺Ƿ֧
	 * @param LPCTSTR strExt ׺
	 * @return bool ַ֧
	 */
	bool IsDocSupport(LPCTSTR strExt);

	/** ĬϵԽṹ */
	static LanguageName m_LangNames[MAX_SYN_LANG];

private:
	/** չ */
	CMap<int, int, CString, CString&> m_mapLangExt;	
};
