diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /source/compiler-core/slang-artifact-handler-impl.h | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'source/compiler-core/slang-artifact-handler-impl.h')
| -rw-r--r-- | source/compiler-core/slang-artifact-handler-impl.h | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/source/compiler-core/slang-artifact-handler-impl.h b/source/compiler-core/slang-artifact-handler-impl.h index c1cd25980..675dcd5f2 100644 --- a/source/compiler-core/slang-artifact-handler-impl.h +++ b/source/compiler-core/slang-artifact-handler-impl.h @@ -2,10 +2,9 @@ #ifndef SLANG_ARTIFACT_HANDLER_IMPL_H #define SLANG_ARTIFACT_HANDLER_IMPL_H -#include "slang-artifact.h" -#include "slang-artifact-representation.h" - #include "../core/slang-com-object.h" +#include "slang-artifact-representation.h" +#include "slang-artifact.h" namespace Slang { @@ -13,30 +12,46 @@ namespace Slang class DefaultArtifactHandler : public ComBaseObject, public IArtifactHandler { public: - SLANG_NO_THROW uint32_t SLANG_MCALL addRef() SLANG_OVERRIDE { return 1; } - SLANG_NO_THROW uint32_t SLANG_MCALL release() SLANG_OVERRIDE { return 1; } - SLANG_NO_THROW SlangResult SLANG_MCALL queryInterface(SlangUUID const& uuid, void** outObject) SLANG_OVERRIDE; - - // ICastable - SLANG_NO_THROW void* SLANG_MCALL castAs(const Guid& guid) SLANG_OVERRIDE; - - // IArtifactHandler - SLANG_NO_THROW SlangResult SLANG_MCALL expandChildren(IArtifact* container) SLANG_OVERRIDE; - SLANG_NO_THROW SlangResult SLANG_MCALL getOrCreateRepresentation(IArtifact* artifact, const Guid& guid, ArtifactKeep keep, ICastable** outCastable) SLANG_OVERRIDE; - - static IArtifactHandler* getSingleton() { return &g_singleton; } -protected: + SLANG_NO_THROW uint32_t SLANG_MCALL addRef() SLANG_OVERRIDE { return 1; } + SLANG_NO_THROW uint32_t SLANG_MCALL release() SLANG_OVERRIDE { return 1; } + SLANG_NO_THROW SlangResult SLANG_MCALL queryInterface(SlangUUID const& uuid, void** outObject) + SLANG_OVERRIDE; - SlangResult _loadSharedLibrary(IArtifact* artifact, ISlangSharedLibrary** outSharedLibrary); - SlangResult _createOSFile(IArtifact* artifact, ArtifactKeep intermediateKeep, IOSFileArtifactRepresentation** outFileRep); + // ICastable + SLANG_NO_THROW void* SLANG_MCALL castAs(const Guid& guid) SLANG_OVERRIDE; - void* getInterface(const Guid& uuid); - void* getObject(const Guid& uuid); + // IArtifactHandler + SLANG_NO_THROW SlangResult SLANG_MCALL expandChildren(IArtifact* container) SLANG_OVERRIDE; + SLANG_NO_THROW SlangResult SLANG_MCALL getOrCreateRepresentation( + IArtifact* artifact, + const Guid& guid, + ArtifactKeep keep, + ICastable** outCastable) SLANG_OVERRIDE; - SlangResult _addRepresentation(IArtifact* artifact, ArtifactKeep keep, ISlangUnknown* rep, ICastable** outCastable); - SlangResult _addRepresentation(IArtifact* artifact, ArtifactKeep keep, ICastable* castable, ICastable** outCastable); - - static DefaultArtifactHandler g_singleton; + static IArtifactHandler* getSingleton() { return &g_singleton; } + +protected: + SlangResult _loadSharedLibrary(IArtifact* artifact, ISlangSharedLibrary** outSharedLibrary); + SlangResult _createOSFile( + IArtifact* artifact, + ArtifactKeep intermediateKeep, + IOSFileArtifactRepresentation** outFileRep); + + void* getInterface(const Guid& uuid); + void* getObject(const Guid& uuid); + + SlangResult _addRepresentation( + IArtifact* artifact, + ArtifactKeep keep, + ISlangUnknown* rep, + ICastable** outCastable); + SlangResult _addRepresentation( + IArtifact* artifact, + ArtifactKeep keep, + ICastable* castable, + ICastable** outCastable); + + static DefaultArtifactHandler g_singleton; }; } // namespace Slang |
