diff options
Diffstat (limited to 'source/core/slang-blob.cpp')
| -rw-r--r-- | source/core/slang-blob.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/core/slang-blob.cpp b/source/core/slang-blob.cpp new file mode 100644 index 000000000..4421db09a --- /dev/null +++ b/source/core/slang-blob.cpp @@ -0,0 +1,14 @@ +#include "slang-blob.h" + +namespace Slang { + +// Allocate static const storage for the various interface IDs that the Slang API needs to expose +static const Guid IID_ISlangUnknown = SLANG_UUID_ISlangUnknown; +static const Guid IID_ISlangBlob = SLANG_UUID_ISlangBlob; + +ISlangUnknown* BlobBase::getInterface(const Guid& guid) +{ + return (guid == IID_ISlangUnknown || guid == IID_ISlangBlob) ? static_cast<ISlangBlob*>(this) : nullptr; +} + +} // namespace Slang |
