diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-11-06 14:28:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-06 14:28:25 -0500 |
| commit | 1185bd464092f372430cbfaa15a7be4dcaa90752 (patch) | |
| tree | b3b68f2d9de00c0845f4912a797f10b27741031f /source/core/slang-string-util.h | |
| parent | 453331951b0df2a612f9bc0d68eab2ad786ec5bf (diff) | |
Feature/shared library refactor (#712)
* * Added ISlangSharedLibraryLoader and ISlangSharedLibrary
* Implemented default implementations
* Added slang API function to get/set the ISlangSharedLibraryLoader on the session
* Put function caching onto the Session - so that if the loader is chaged, its easy to reset the shared libraries, and functions
* Run premake.
* Fix problem with setting null, would cause an unnecessary function/shared lib flush.
* * Unload SharedLibrary when DefaultSharedLibrary is deleted.
* Make SharedLibrary handle unload safely if already unloaded.
* Refactor SharedLibrary, such that it becomes a utility class - simplifying it's semantics.
* Simplified ISlangSharedLibrary such that doesn't have unload and isLoaded so easier to implement.
Use updated SharedLibrary impl.
* Disable aarch64 on windows
* Premake windows files without aarch64 build.
* Moved slang-shared-library to core (so can be used in code outside of main slang)
Fixed problem in premake5 where on windows projects were incorrectly constructed
* Allowed RefObject to base class of com types
Added ConfigurableSharedLibraryLoader
Added -dxc-path -fxc-path -glslang-path
Fix problem with dxc-path not honoring it's path when loading dxil
* Added documentation for command line control of dll loading paths.
* Remove some tabbing issues.
* Change name of include guard.
Diffstat (limited to 'source/core/slang-string-util.h')
| -rw-r--r-- | source/core/slang-string-util.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/core/slang-string-util.h b/source/core/slang-string-util.h index 47d92f2fe..b365b6cf5 100644 --- a/source/core/slang-string-util.h +++ b/source/core/slang-string-util.h @@ -13,11 +13,11 @@ namespace Slang { /** A blob that uses a `String` for its storage. */ -class StringBlob : public ISlangBlob +class StringBlob : public ISlangBlob, public RefObject { public: // ISlangUnknown - SLANG_IUNKNOWN_ALL + SLANG_REF_OBJECT_IUNKNOWN_ALL // ISlangBlob SLANG_NO_THROW void const* SLANG_MCALL getBufferPointer() SLANG_OVERRIDE { return m_string.Buffer(); } @@ -30,15 +30,9 @@ public: : m_string(string) {} - /// Need virtual dtor, because BlobBase is derived from and release impl used is the one in the base class (that doesn't know the derived type) - /// Alternatively could be implemented by always using SLANG_IUNKNOWN_RELEASE in derived types - this would make derived types slightly smaller/faster - virtual ~StringBlob() {} - protected: ISlangUnknown* getInterface(const Guid& guid); - String m_string; - uint32_t m_refCount = 0; }; struct StringUtil @@ -62,7 +56,6 @@ struct StringUtil /// Create a blob from a string static ComPtr<ISlangBlob> createStringBlob(const String& string); - }; } // namespace Slang |
