Class NNArchiveVersionedConfig
Defined in File NNArchiveVersionedConfig.hpp
Class Documentation
-
class NNArchiveVersionedConfig
Public Functions
-
explicit NNArchiveVersionedConfig(const std::vector<uint8_t> &data, NNArchiveEntry::Compression compression = NNArchiveEntry::Compression::AUTO)
@data Should point to a whole compressed NNArchive read to memory if compression is not set to RAW_FS. If compression is set to RAW_FS, then this should point to just the config.json file read to memory.
-
explicit NNArchiveVersionedConfig(const std::filesystem::path &path, NNArchiveEntry::Compression compression = NNArchiveEntry::Compression::AUTO)
@path Should point to: 1) if compression is set to RAW_FS: to just the config.json file. 2) if compression is set to AUTO: to whole compressed NNArchive or just the config.json file which must end in .json . 3) else: to whole compressed NNArchive. see NNArchive class for parameter explanation
Returned data should be just the config.json if compression == RAW_FS or the whole NNArchive otherwise see NNArchive class for parameter explanation
-
inline NNArchiveVersionedConfig(const NNArchiveConfig &config)
Construct NNArchiveVersionedConfig from a specific version of a config.
- Parameters:
version – Version of the config.
-
inline NNArchiveConfigVersion getVersion() const
Get version of the underlying config.
-
template<typename T>
inline const T &getConfig() const Get stored config cast to a specific version.
- Template Parameters:
T – Config type to cast to.
-
template<>
inline const NNArchiveConfig &getConfig() const
-
explicit NNArchiveVersionedConfig(const std::vector<uint8_t> &data, NNArchiveEntry::Compression compression = NNArchiveEntry::Compression::AUTO)