123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #pragma once
- #include <AK/SoundEngine/Common/AkSoundEngine.h>
- #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
- #include <AK/Tools/Common/AkArray.h>
- #include <AK/SoundEngine/Common/AkErrorMessageTranslator.h>
- struct SearchInfo;
- class AkXMLErrorMessageTranslator : public AkErrorMessageTranslator
- {
- public:
-
- AkXMLErrorMessageTranslator();
- AkXMLErrorMessageTranslator(const AkOSChar* in_filePath, AkUInt32 in_msTimeout = 10 /*Default timeout, 10ms*/);
- ~AkXMLErrorMessageTranslator();
- void Init();
- virtual void Term() override;
-
- AKRESULT SetFileName(const AkOSChar* in_filePath, AkUInt32 in_msTimeout = 10 /*Default timeout, 10ms*/);
- protected:
-
- virtual bool GetInfo(TagInformation* in_pTagList, AkUInt32 in_uCount, AkUInt32& io_uTranslated) override;
- private:
- AKRESULT Setup();
-
- AkInt32 ReadXmlFile(SearchInfo* io_searchInfo, const AkInt32& in_patternCount, AkInt32 in_longestDefaultTag, AkUInt32 in_uPos = 0);
-
- AkInt32 BoyerMooreSearch(char* in_data, AkUInt32 in_dataSize, SearchInfo* io_searchInfo, AkUInt32 in_patternCount);
-
-
- void BooyerMooreSearchIdStartingPoint(char* in_data, AkInt32 in_dataSize, SearchInfo& io_searchInfo);
-
-
- void ExtractId(char* in_data, AkInt32 in_dataSize, SearchInfo& io_searchInfo);
-
- void BoyerMooreBadHeuristic(const char* in_pattern, AkInt32 in_size, AkInt8 out_badChar[]);
- AkOSChar m_fileName[AK_MAX_PATH];
- bool m_bFileOpeningFailed;
- AkUInt32 m_msTimeout;
- enum class xmlTag
- {
- StreamedFiles = 0,
- SoundBanks,
-
-
- NUM_XML_TAG
- };
- AkUInt32 m_tagIndex[(AkInt32) AkXMLErrorMessageTranslator::xmlTag::NUM_XML_TAG];
- const char* s_xmlTag[(AkInt32)AkXMLErrorMessageTranslator::xmlTag::NUM_XML_TAG] =
- {
- "<StreamedFiles>",
- "<SoundBanks>"
- };
- };
|