dvander@2042: /** dvander@2042: * vim: set ts=4 : dvander@2042: * ============================================================================= dvander@2042: * SourceMod dvander@2042: * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. dvander@2042: * ============================================================================= dvander@2042: * dvander@2042: * This program is free software; you can redistribute it and/or modify it under dvander@2042: * the terms of the GNU General Public License, version 3.0, as published by the dvander@2042: * Free Software Foundation. dvander@2042: * dvander@2042: * This program is distributed in the hope that it will be useful, but WITHOUT dvander@2042: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS dvander@2042: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more dvander@2042: * details. dvander@2042: * dvander@2042: * You should have received a copy of the GNU General Public License along with dvander@2042: * this program. If not, see . dvander@2042: * dvander@2042: * As a special exception, AlliedModders LLC gives you permission to link the dvander@2042: * code of this program (as well as its derivative works) to "Half-Life 2," the dvander@2042: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software dvander@2042: * by the Valve Corporation. You must obey the GNU General Public License in dvander@2042: * all respects for all other code used. Additionally, AlliedModders LLC grants dvander@2042: * this exception to all derivative works. AlliedModders LLC defines further dvander@2042: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), dvander@2042: * or . dvander@2042: * dvander@2042: * Version: $Id$ dvander@2042: */ dvander@2042: dvander@2042: #ifndef _INCLUDE_SOURCEMOD_PHRASECOLLECTION_H_ dvander@2042: #define _INCLUDE_SOURCEMOD_PHRASECOLLECTION_H_ dvander@2042: dvander@2042: #include dvander@2042: #include dvander@2042: #include dvander@2042: dvander@2042: using namespace SourceHook; dvander@2042: using namespace SourceMod; dvander@2042: dvander@2042: class CPhraseCollection : public IPhraseCollection dvander@2042: { dvander@2042: public: dvander@2042: CPhraseCollection(); dvander@2042: ~CPhraseCollection(); dvander@2042: public: dvander@2042: IPhraseFile *AddPhraseFile(const char *filename); dvander@2042: unsigned int GetFileCount(); dvander@2042: IPhraseFile *GetFile(unsigned int file); dvander@2042: void Destroy(); dvander@2042: TransError FindTranslation(const char *key, unsigned int langid, Translation *pTrans); dvander@2042: bool FormatString( dvander@2042: char *buffer, dvander@2042: size_t maxlength, dvander@2042: const char *format, dvander@2042: void **params, dvander@2042: unsigned int numparams, dvander@2042: size_t *pOutLength, dvander@2042: const char **pFailPhrase); dvander@2042: private: dvander@2042: CVector m_Files; dvander@2042: }; dvander@2042: dvander@2042: #endif //_INCLUDE_SOURCEMOD_PHRASECOLLECTION_H_