diff options
Diffstat (limited to 'source/compiler-core/slang-artifact-impl.cpp')
| -rw-r--r-- | source/compiler-core/slang-artifact-impl.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/compiler-core/slang-artifact-impl.cpp b/source/compiler-core/slang-artifact-impl.cpp index d8646eb20..056d89a4b 100644 --- a/source/compiler-core/slang-artifact-impl.cpp +++ b/source/compiler-core/slang-artifact-impl.cpp @@ -26,8 +26,7 @@ static bool _checkChildren(IArtifact::FindStyle findStyle) IArtifactHandler* Artifact::_getHandler() { - // TODO(JS): For now we just use the default handler, but in the future this should probably be a member - return DefaultArtifactHandler::getSingleton(); + return m_handler ? m_handler : DefaultArtifactHandler::getSingleton(); } void* Artifact::castAs(const Guid& guid) @@ -98,6 +97,16 @@ SlangResult Artifact::loadSharedLibrary(ArtifactKeep keep, ISlangSharedLibrary** return SLANG_OK; } +IArtifactHandler* Artifact::getHandler() +{ + return m_handler; +} + +void Artifact::setHandler(IArtifactHandler* handler) +{ + m_handler = handler; +} + SlangResult Artifact::getOrCreateRepresentation(const Guid& typeGuid, ArtifactKeep keep, ICastable** outCastable) { auto handler = _getHandler(); |
