24 class PackagedResourceData;
113 [[nodiscard]] const
PackageID& getPackageID() const noexcept {
return mPackageID; }
#define CE_REFLECTABLE_CLASS
Definition IReflectable.hpp:38
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Path to file or directory.
Definition FilePath.hpp:37
A helper class that wraps and protects a value from non-synchronized access.
Definition Threading.hpp:516
Definition Optional.hpp:17
A package is a collection of resources that are stored in a single data blob.
Definition Package.hpp:54
LockedObject< PackageIndex, SharedMutex > mIndex
The package index. Contains information about the contents of the package.
Definition Package.hpp:101
Package(PackageManager &manager, const PackageURL &packageURL)
Creates a new package.
const SPtr< PackageMetadata > & getMetadata() const noexcept
Definition Package.hpp:116
PackageURL mPackageURL
An absolute URL to the package.
Definition Package.hpp:75
void setMetadata(const SPtr< PackageMetadata > &metadata) noexcept
Definition Package.hpp:119
PackageManager & mManager
The package manager from which this package was loaded from.
Definition Package.hpp:71
PackageID mPackageID
A UUID that uniquely identifies the package.
Definition Package.hpp:79
bool isEmpty() const noexcept
Checks if the package is currently empty and contains no resources.
SPtr< PackageMetadata > mMetadata
A pointer to the package metadata object.
Definition Package.hpp:82
UPtr< PrivateData > mData
The package data.
Definition Package.hpp:88
A manager that handles packages, their loading, saving and other runtime related tasks.
Definition PackageManager.hpp:18
A ResourceData sub-class that represents a resource owned and contained within a package.
Definition Package.hpp:170
PackagedResourceData(Package &package, ResourceData &&existingData) noexcept
Creates a new PackagedResourceData instance from an existing ResourceData.
PackagedResourceData(Package &package) noexcept
Creates a new PackagedResourceData instance.
A simple reference counter base class.
Definition SmartPtr.hpp:438
An object, provided by the resource manager, to view and alter data from the resource itself.
Definition Resource.hpp:89
Definition ResourceHandle.hpp:166
A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or p...
Definition URI.hpp:54
Definition ResourceHandle.hpp:339
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::unordered_map< Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > HashMap
HashMap is an associative container that contains key-value pairs with unique keys.
Definition Map.hpp:33
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that describes a single entry in the package.
Definition Package.hpp:58
FilePath path
The path of the package entry.
Definition Package.hpp:63
ResourceID resourceID
The resource ID for the entry.
Definition Package.hpp:60
WeakResourceHandle< Resource > handle
A weak handle to the resource. Can be locked to return a strong handle to resource.
Definition Package.hpp:66
A structure that wraps the index of a package.
Definition Package.hpp:92
HashMap< String, Entry > byPath
Index of package resources by their paths.
Definition Package.hpp:97
HashMap< ResourceID, Entry > byUUID
Index of package resources by their UUID.
Definition Package.hpp:94
Type that uniquely represents a package in the resource system.
Definition Package.hpp:39
static const PackageID null
A null (or empty) resource ID.
Definition Package.hpp:46
PackageID(const UUID &uuid)
Converts a raw UUID into a PackageID.
Definition Package.hpp:43
Type that uniquely represents a resource in the resource system.
Definition Resource.hpp:37
Represents a universally unique identifier (UUID).
Definition UUID.hpp:27
constexpr UUID()=default
Initializes an empty UUID.