You.i Engine
YiAssetLocator.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_ASSET_LOCATOR_H_
3 #define _YI_ASSET_LOCATOR_H_
4 
6 #include "framework/YiPredef.h"
7 #include "utility/YiRtti.h"
8 #include "utility/YiString.h"
9 
15 class CYIAssetLocatorPriv;
17 
119 {
120 public:
124  enum PRIORITY
125  {
128  };
129 
133  CYIAssetLocator();
134  CYIAssetLocator(const CYIAssetLocator &other);
136 
138 
146  void SetBase(const CYIString &basepath);
147 
153  const CYIString &GetBase() const;
154 
165  void Refresh();
166 
179  void AddConfigurationProperty(std::unique_ptr<CYIAbstractAssetConfiguration> pConfiguration, PRIORITY ePriority = LOWEST);
180 
191  void RemoveConfigurationProperties(const CYIString &qualifier);
192 
204 
210  void AddFallbackDirectory(const CYIString &rPath);
211 
218 
226  CYIString GetPath(const CYIString &filename, const CYIRuntimeTypeInfo &assetType) const;
227 
238  bool AddAssetTypeDirectory(const CYIString &directoryName, const CYIRuntimeTypeInfo &assetType);
239 
248  void RemoveAssetTypeDirectory(const CYIRuntimeTypeInfo &assetType);
249 
250 private:
251  std::unique_ptr<CYIAssetLocatorPriv> m_pPriv;
252 };
253 
256 #endif
void ClearFallbackDirectories()
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
void ClearConfigurationProperties()
void RemoveConfigurationProperties(const CYIString &qualifier)
bool AddAssetTypeDirectory(const CYIString &directoryName, const CYIRuntimeTypeInfo &assetType)
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
void SetBase(const CYIString &basepath)
void RemoveAssetTypeDirectory(const CYIRuntimeTypeInfo &assetType)
CYIAssetLocator & operator=(const CYIAssetLocator &other)
Definition: YiAssetLocator.h:127
The abstract runtime representation of a C++ type.
Definition: YiRtti.h:48
CYIString GetPath(const CYIString &filename, const CYIRuntimeTypeInfo &assetType) const
const CYIString & GetBase() const
Definition: YiAssetLocator.h:126
PRIORITY
Definition: YiAssetLocator.h:124
void AddConfigurationProperty(std::unique_ptr< CYIAbstractAssetConfiguration > pConfiguration, PRIORITY ePriority=LOWEST)
void AddFallbackDirectory(const CYIString &rPath)
Represents a set of qualifiers and rules for resolving paths to assets, used in conjunction with CYIA...
Definition: YiAbstractAssetConfiguration.h:31
This file contains the classes and macros used to implement RTTI in You.i Engine. ...
Using a base file path, determines the path to an asset given a file name and an asset type...
Definition: YiAssetLocator.h:118