|
|
|
|
@ -97,7 +97,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug
|
|
|
|
|
*/ |
|
|
|
|
enum class Feature: UnsignedByte { |
|
|
|
|
/** Opening files from raw data using @ref openData() */ |
|
|
|
|
OpenData = 1 << 0 |
|
|
|
|
OpenData = 1 << 0, |
|
|
|
|
/** Opening already loaded state using @ref openState() */ |
|
|
|
|
OpenState = 1 << 1 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** @brief Set of features supported by this importer */ |
|
|
|
|
@ -128,6 +130,17 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug
|
|
|
|
|
*/ |
|
|
|
|
bool openData(Containers::ArrayView<const char> data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Open already loaded state |
|
|
|
|
* |
|
|
|
|
* Closes previous file, if it was opened, and tries to open given |
|
|
|
|
* state. Available only if @ref Feature::OpenState is supported. Returns |
|
|
|
|
* `true` on success, `false` otherwise. |
|
|
|
|
* @see @ref features(), @ref openData() |
|
|
|
|
*/ |
|
|
|
|
bool openState(const void* state, const std::string& filePath = {}); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Open file |
|
|
|
|
* |
|
|
|
|
@ -521,6 +534,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug
|
|
|
|
|
/** @brief Implementation for @ref openData() */ |
|
|
|
|
virtual void doOpenData(Containers::ArrayView<const char> data); |
|
|
|
|
|
|
|
|
|
/** @brief Implementation for @ref openState() */ |
|
|
|
|
virtual void doOpenState(const void* state, const std::string& filePath = {}); |
|
|
|
|
|
|
|
|
|
/** @brief Implementation for @ref close() */ |
|
|
|
|
virtual void doClose() = 0; |
|
|
|
|
|
|
|
|
|
|