From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- source/compiler-core/slang-artifact-handler-impl.h | 63 +++++++++++++--------- 1 file changed, 39 insertions(+), 24 deletions(-) (limited to 'source/compiler-core/slang-artifact-handler-impl.h') 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 -- cgit v1.2.3