You.i Engine
YiAssetDecoderTranslation.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_ASSET_DECODER_TRANSLATION_H_
3 #define _YI_ASSET_DECODER_TRANSLATION_H_
4 
5 #include "asset/YiAssetDecoder.h"
6 #include "utility/YiRtti.h"
7 
8 class CYIAsset;
10 class CYIString;
11 class CYIAssetLoadParams;
12 
22 {
23 public:
24 
27 
28  virtual bool SupportsParams(const CYIAssetLoadParams *pDecodeParams) override;
29 
30  virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override;
31 
32  virtual std::shared_ptr<CYIAsset> DecodeAsset(const CYIString &path, const CYIAssetLoadParams *pDecodeParams) override;
33 
34  virtual std::shared_ptr<CYIAsset> DecodeAsset(const uint8_t *pData, uint32_t nDataSize, const CYIAssetLoadParams *pDecodeParams) override;
35 
36  virtual bool DecodeAsset(const std::shared_ptr<CYIAsset> &pAsset) override;
37  virtual bool DecodeAsset(const std::shared_ptr<CYIAsset> &pAsset, const uint8_t *pData, uint32_t uDataSize) override;
38 
39 private:
40 
44  bool PopulateTranslation(const std::shared_ptr<CYIAssetTranslation> &pAsset, const CYIString &path, const CYIAssetLoadParams *pDecodeParams);
45  bool PopulateTranslation(const std::shared_ptr<CYIAssetTranslation> &pAsset, const uint8_t *pData, uint32_t nDataSize, const CYIAssetLoadParams *pDecodeParams);
46 
48 };
49 
52 #endif // _YI_ASSET_DECODER_TRANSLATION_H_
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
virtual ~CYIAssetDecoderTranslation()
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
Base class for decoders which can accept specialized parameter objects.
Definition: YiAssetLoadParams.h:16
An asset container which holds a shared translator that refers to a specific localisation resource...
Definition: YiAssetTranslation.h:19
virtual bool SupportsParams(const CYIAssetLoadParams *pDecodeParams) override
Decodes an ".mo" binary translation file.
Definition: YiAssetDecoderTranslation.h:21
virtual std::shared_ptr< CYIAsset > DecodeAsset(const CYIString &path, const CYIAssetLoadParams *pDecodeParams) override
virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override
Base class for any asset. An asset provides functions for dynamically loading and unloading itself an...
Definition: YiAsset.h:33
Base class for all specialized decoders.
Definition: YiAssetDecoder.h:22
This file contains the classes and macros used to implement RTTI in You.i Engine. ...