XLE
v0.02.0
|
Container file with with one child that is initialized via InputStreamFormatter More...
#include <ConfigFileContainer.h>
Public Member Functions | |
ConfigFileContainer (const ResChar initializer[]) | |
const std::shared_ptr< DependencyValidation > & | GetDependencyValidation () const |
Public Attributes | |
Type | _asset |
Protected Attributes | |
std::shared_ptr< DependencyValidation > | _validationCallback |
Container file with with one child that is initialized via InputStreamFormatter
Represents a file that contains a single serialized item. That item must be a type that can be deserialized with InputStreamFormatter.
Consider a configuration object like:
This might contain some configuration options, maybe some simple members or maybe even some complex members.
Sometimes we might want to store a configuration settings like this in it's own individual file. Other times, we might want to store it within a larger file, just as part of heirarchy of serialized objects.
Because the object is deserialized directly from the formatter, we have the flexibility to do that.
When we want that object to exist on it's own, in an individual file, we can use ConfigFileContainer<Config>. With a ConfigFileContainer, it can be considered a fully functional asset, with a dependency validation, relative path rules and reporting correctly to the InvalidAssetManager.