diff options
Diffstat (limited to 'source/core/slang-castable.cpp')
| -rw-r--r-- | source/core/slang-castable.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/source/core/slang-castable.cpp b/source/core/slang-castable.cpp index 6b7644bf2..f3c6541dd 100644 --- a/source/core/slang-castable.cpp +++ b/source/core/slang-castable.cpp @@ -20,37 +20,6 @@ namespace Slang { return castable; } -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ObjectCastableAdapter !!!!!!!!!!!!!!!!!!!!!!!!!!! */ - -void* ObjectCastableAdapter::castAs(const Guid& guid) -{ - if (auto intf = getInterface(guid)) - { - return intf; - } - return getObject(guid); -} - -void* ObjectCastableAdapter::getInterface(const Guid& guid) -{ - if (guid == ISlangUnknown::getTypeGuid() || - guid == ICastable::getTypeGuid() || - guid == IObjectCastableAdapter::getTypeGuid()) - { - return static_cast<IObjectCastableAdapter*>(this); - } - return nullptr; -} - -void* ObjectCastableAdapter::getObject(const Guid& guid) -{ - if (guid == m_containedGuid) - { - return m_contained; - } - return nullptr; -} - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! UnknownCastableAdapter !!!!!!!!!!!!!!!!!!!!!!!!!!! */ void* UnknownCastableAdapter::castAs(const Guid& guid) |
