5#include <Common/Utility/string_utils.h>
13class IResourceIdentifierResolver;
65 void setResolved(
Path resolved);
66 void setResolved(std::string resolved);
69 using ResolvedIdentifier = std::variant<
74 std::string m_identifier;
75 ResolvedIdentifier m_resolvedIdentifier;
PH_DEFINE_INLINE_TO_STRING_FORMATTER(ph::ResourceIdentifier)
Definition IResourceIdentifierResolver.h:12
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
An general identifier that points to some resource. This is the most general form of a resource ident...
Definition ResourceIdentifier.h:20
const std::string & getIdentifier() const
Definition ResourceIdentifier.cpp:55
std::string getString() const
Definition ResourceIdentifier.cpp:67
Path getPath() const
Definition ResourceIdentifier.cpp:60
std::string toString() const
Definition ResourceIdentifier.cpp:79
bool resolve(IResourceIdentifierResolver &resolver)
Work out the resource the identifier points to.
Definition ResourceIdentifier.cpp:19
void setPath(Path path)
Directly set a path to resource. This will also clear any existing identifier as we cannot automatica...
Definition ResourceIdentifier.cpp:24
ResourceIdentifier()
Creates empty identifier that refers to nothing.
Definition ResourceIdentifier.cpp:10
bool isEmpty() const
Whether any information is contained.
Definition ResourceIdentifier.cpp:74
bool isResolved() const
Whether the target resource is identified.
Definition ResourceIdentifier.cpp:45
bool hasIdentifier() const
Whether there is an identifier. An identifier may not exist in the following situations:
Definition ResourceIdentifier.cpp:50
The root for all renderer implementations.
Definition EEngineProject.h:6