yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// slang-artifact-handler-impl.h 2#ifndef SLANG_ARTIFACT_HANDLER_IMPL_H 3#define SLANG_ARTIFACT_HANDLER_IMPL_H 4 5#include "../core/slang-com-object.h" 6#include "slang-artifact-representation.h" 7#include "slang-artifact.h" 8 9namespace Slang 10{ 11 12class DefaultArtifactHandler :public ComBaseObject ,public IArtifactHandler 13{ 14public : 15SLANG_NO_THROW uint32_t SLANG_MCALL addRef ()SLANG_OVERRIDE {return 1 ; } 16SLANG_NO_THROW uint32_t SLANG_MCALL release ()SLANG_OVERRIDE {return 1 ; } 17SLANG_NO_THROW SlangResult SLANG_MCALL queryInterface (SlangUUID const & uuid ,void ** outObject ) 18SLANG_OVERRIDE ; 19 20// ICastable 21SLANG_NO_THROW void * SLANG_MCALL castAs (const Guid & guid )SLANG_OVERRIDE ; 22 23// IArtifactHandler 24SLANG_NO_THROW SlangResult SLANG_MCALL expandChildren (IArtifact * container )SLANG_OVERRIDE ; 25SLANG_NO_THROW SlangResult SLANG_MCALL getOrCreateRepresentation ( 26IArtifact * artifact , 27const Guid & guid , 28ArtifactKeep keep , 29ICastable ** outCastable )SLANG_OVERRIDE ; 30 31static IArtifactHandler * getSingleton () {return & g_singleton ; } 32 33protected : 34SlangResult _loadSharedLibrary (IArtifact * artifact ,ISlangSharedLibrary ** outSharedLibrary ); 35SlangResult _createOSFile ( 36IArtifact * artifact , 37ArtifactKeep intermediateKeep , 38IOSFileArtifactRepresentation ** outFileRep ); 39 40void * getInterface (const Guid & uuid ); 41void * getObject (const Guid & uuid ); 42 43SlangResult _addRepresentation ( 44IArtifact * artifact , 45ArtifactKeep keep , 46ISlangUnknown * rep , 47ICastable ** outCastable ); 48SlangResult _addRepresentation ( 49IArtifact * artifact , 50ArtifactKeep keep , 51ICastable * castable , 52ICastable ** outCastable ); 53 54static DefaultArtifactHandler g_singleton ; 55}; 56 57}// namespace Slang 58 59#endif