1 #ifndef CORE_RESOURCES_BUNDLEHANDLERS_HPP
2 #define CORE_RESOURCES_BUNDLEHANDLERS_HPP
4 #include <BLIB/Logging.hpp>
5 #include <BLIB/Resources.hpp>
28 virtual bool processFile(
const std::string& path, std::ostream& output,
29 bl::resource::bundle::FileHandlerContext& context)
override {
31 if (!bl::resource::ResourceManager<T>::initializeExisting(path, obj)) {
32 BL_LOG_ERROR <<
"Failed to process: " << path;
35 bl::serial::StreamOutputBuffer wrapper(output);
36 bl::serial::binary::OutputStream os(wrapper);
37 if (!obj.saveBundle(os, context)) {
38 BL_LOG_ERROR <<
"Failed to serialize '" << path <<
"' into bundle";
Core classes and functionality for both the editor and game.
Generic handler for peoplemon files when being bundled. Performs format conversion and registers depe...
virtual bool processFile(const std::string &path, std::ostream &output, bl::resource::bundle::FileHandlerContext &context) override
Processes the given resource file to bundle.