Emergency 2017 Dokumentation  v3.0.1
qsf::editor::UnknownAssetImport Class Reference

Unknown asset import class. More...

#include <UnknownAssetImport.h>

Public Member Functions

 UnknownAssetImport (AssetPackage &assetPackage, const std::string &ogreResourceGroup, const std::string &resourceDirectory)
 Constructor. More...
 
 ~UnknownAssetImport ()
 Destructor. More...
 
virtual GlobalAssetId importByAbsoluteFilename (const std::string &absoluteFilename) const override
 Import asset. More...
 
- Public Member Functions inherited from qsf::editor::AssetImport
AssetPackagegetAssetPackage () const
 Return the asset package instance new imported assets should be registered in. More...
 

Static Public Member Functions

static NamedIdentifier getAssetTypeByAbsoluteFilename (const std::string &absoluteFilename)
 Try to detect the asset type. More...
 

Additional Inherited Members

- Static Public Attributes inherited from qsf::editor::AssetImport
static const std::string ASSET_CATEGORY_NAME
 Asset category newly imported assets will be in. More...
 
static const std::string ASSET_DATA_NAME_PREFIX
 Prefix used for intermediate asset data names. More...
 
- Protected Member Functions inherited from qsf::editor::AssetImport
 AssetImport (AssetPackage &assetPackage)
 Constructor. More...
 
 ~AssetImport ()
 Destructor. More...
 
void copyAbsoluteAssetDataFile (const std::string &absoluteFilename, const std::string &relativeAssetPackageFilename, Asset &asset) const
 
void copyRelativeAssetDataFile (const std::string &resourceDirectory, const std::string &filename, const std::string &relativeAssetPackageFilename, Asset &asset) const
 
std::string getAssetDataNameWithoutPrefix (const std::string &assetDataName) const
 Return the asset data name without prefab. More...
 
std::string correctAssetDataName (const std::string &assetDataName) const
 Correct asset data name, if required. More...
 
void copyToAssetStorageManagerSourceAssetDirectory (const std::string &absoluteFilename, GlobalAssetId globalAssetId) const
 Copy the provided asset source into the directory where the asset storage manager temporally locally stores assets to be edited by the user. More...
 
void copyCompiledToAssetStorageManagerSourceAssetDirectory (const std::string &absoluteFilename, GlobalAssetId globalAssetId) const
 Copy the provided compiled asset into the directory where the asset storage manager temporally locally stores assets to be edited by the user. More...
 
void addImportedQsfMaterial (GlobalAssetId globalAssetId) const
 Add the given global asset ID to the imported QSF materials list, so its source material will be either moved out from the import directory inside our material datasource or deleted, depending on whether the import is accepted or not. More...
 
void scheduleDependantQsfMaterialsForRecompilation (GlobalAssetId globalAssetId) const
 Schedule all qsf material assets that directly depend on this asset for recompilation. More...
 
- Static Protected Member Functions inherited from qsf::editor::AssetImport
static void print (LogMessage::SeverityLevel severityLevel, const std::string &text)
 Print a text into the log. More...
 
static void emitProgress (const std::string &message, float progress=0.0f)
 Call this method in order to tell others about the asset import progress. More...
 

Detailed Description

Unknown asset import class.

Definition at line 34 of file UnknownAssetImport.h.

Constructor & Destructor Documentation

qsf::editor::UnknownAssetImport::UnknownAssetImport ( AssetPackage assetPackage,
const std::string &  ogreResourceGroup,
const std::string &  resourceDirectory 
)
inline

Constructor.

Parameters
[in]assetPackageAsset package instance new imported assets should be registered in, instance must stay valid as long as this asset import instance exists
[in]ogreResourceGroupUTF-8 name of the OGRE resource group to use
[in]resourceDirectoryResource directory where to search for further dependencies

Definition at line 16 of file UnknownAssetImport-inl.h.

qsf::editor::UnknownAssetImport::~UnknownAssetImport ( )
inline

Destructor.

Note
  • Not virtual by default

Definition at line 24 of file UnknownAssetImport-inl.h.

Member Function Documentation

static NamedIdentifier qsf::editor::UnknownAssetImport::getAssetTypeByAbsoluteFilename ( const std::string &  absoluteFilename)
static

Try to detect the asset type.

Parameters
[in]absoluteFilenameAbsolute UTF-8 filename in platform-independent notation
Returns
The asset type asset, "qsf::getUninitialized<NamedIdentifier>()" on failure (you should not continue in this case because there's e.g. a JSON syntax error)
Todo:
  • TODO(co) This might be a candidate for "qsf::AssetTypeManager"
virtual GlobalAssetId qsf::editor::UnknownAssetImport::importByAbsoluteFilename ( const std::string &  absoluteFilename) const
overridevirtual

Import asset.

Parameters
[in]absoluteFilenameAbsolute UTF-8 filename in platform-independent notation of the asset to import
Returns
The global asset ID of the imported asset, "qsf::getUninitialized<GlobalAssetId>()" if invalid

Implements qsf::editor::AssetImport.


The documentation for this class was generated from the following files: