|
Katana Plug-in APIs 0.1
|
00001 // Copyright (c) 2012 The Foundry Visionmongers Ltd. All Rights Reserved. 00002 00003 #ifndef FNDEFAULTASSETPLUGIN__H 00004 #define FNDEFAULTASSETPLUGIN__H 00005 00006 #include <map> 00007 #include <string> 00008 #include <vector> 00009 00010 #include <FnAsset/FnAssetAPI.h> 00011 #include <FnAsset/ns.h> 00012 #include <FnAsset/suite/FnAssetSuite.h> 00013 #include <FnPluginSystem/FnPlugin.h> 00014 #include <FnPluginSystem/FnPluginSystem.h> 00015 00016 FNASSET_NAMESPACE_ENTER 00017 { 00033 class FNASSET_API DefaultAssetPlugin 00034 { 00035 public: 00036 00049 static bool isAssetId(const std::string& str, bool throwOnError=false); 00050 00064 static bool containsAssetId(const std::string& str, 00065 bool throwOnError=false); 00066 00067 00076 static std::string resolveAsset(const std::string& assetId, 00077 bool throwOnError=false); 00078 00079 00090 static std::string resolveAllAssets(const std::string &inputString, 00091 bool throwOnError = false); 00092 00108 static std::string resolvePath(const std::string& path, int frame, 00109 bool throwOnError=false); 00110 00111 00112 static std::string getUniqueScenegraphLocationFromAssetId( 00113 const std::string & assetId, bool includeVersion, 00114 bool throwOnError=false); 00115 00116 static std::string getRelatedAssetId( 00117 const std::string & assetId, const std::string& relation, 00118 bool throwOnError=false); 00119 00132 static bool getAssetAttributes( 00133 const std::string &assetId, const std::string &scope, 00134 std::map<std::string, std::string> &attributesMap, 00135 bool throwOnError = false); 00136 00147 static bool checkPermissions( 00148 const std::string &assetId, 00149 const std::map<std::string, std::string> &context, 00150 bool throwOnError = false); 00151 00166 static std::string resolveAssetVersion( 00167 const std::string &assetId, 00168 const std::string &versionTag = std::string(), 00169 bool throwOnError = false); 00170 00180 static std::string getAssetDisplayName( 00181 const std::string &assetId, bool throwOnError = false); 00182 00193 static bool getAssetVersions( 00194 const std::string& assetId, 00195 std::vector<std::string> &versions, 00196 bool throwOnError = false); 00197 00214 static bool getAssetFields( 00215 const std::string &assetId, bool includeDefaults, 00216 std::map<std::string, std::string> &returnFields, 00217 bool throwOnError = false); 00218 00227 static std::string buildAssetId( 00228 const std::map<std::string, std::string> &fields, 00229 bool throwOnError = false); 00230 00247 static std::string getAssetIdForScope( 00248 const std::string &assetId, const std::string &scope, 00249 bool throwOnError = false); 00250 00252 static FnPlugStatus setHost(FnPluginHost *host); 00253 00254 private: 00255 static const FnDefaultAssetHostSuite* _hostSuite; 00256 00258 }; 00259 00261 } 00262 FNASSET_NAMESPACE_EXIT 00263 00264 #endif // FNDEFAULTASSETPLUGIN__H
1.7.3