summaryrefslogtreecommitdiff
path: root/source/core/slang-castable-list-impl.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-04-11 10:18:18 -0400
committerGitHub <noreply@github.com>2023-04-11 10:18:18 -0400
commit20ea33f3321738e7c1b4cad7bdcaedcdb54dd0f0 (patch)
tree899484670ffacf3e884b5d670e2cc8ed6d5259e3 /source/core/slang-castable-list-impl.h
parentd934bbcc5702ebd8964f65b1708c239c29320103 (diff)
Artifact simplification (#2781)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP simplifying artifact interface. * Use ContainedKind. * Remove LazyCastableList. Use ContainedKind for find. * Remove ICastableList. * Remove need for ICastableList. * Remove IArtifactContainer. * Small fixes. * Small improvements around Artifact. * Make explicit find is for *representations* that can cast. Fix bug in handling casting in lookup. * Made associated items artifacts too. * Small fixes. * Small improvements around writing a container.
Diffstat (limited to 'source/core/slang-castable-list-impl.h')
-rw-r--r--source/core/slang-castable-list-impl.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/source/core/slang-castable-list-impl.h b/source/core/slang-castable-list-impl.h
deleted file mode 100644
index adbd121fb..000000000
--- a/source/core/slang-castable-list-impl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// slang-castable-list-impl.h
-#ifndef SLANG_CASTABLE_LIST_IMPL_H
-#define SLANG_CASTABLE_LIST_IMPL_H
-
-#include "slang-castable-list.h"
-
-#include "../../slang-com-helper.h"
-#include "../../slang-com-ptr.h"
-
-#include "../core/slang-com-object.h"
-
-namespace Slang
-{
-
-/* Implementation of the ICastableList interface.
-Is atomic reference counted */
-class CastableList : public ComBaseObject, public ICastableList
-{
-public:
- SLANG_COM_BASE_IUNKNOWN_ALL
-
- // ICastable
- SLANG_NO_THROW void* SLANG_MCALL castAs(const Guid& guid) SLANG_OVERRIDE;
-
- // ICastableList
- virtual Count SLANG_MCALL getCount() SLANG_OVERRIDE { return m_list.getCount(); }
- virtual ICastable* SLANG_MCALL getAt(Index i) SLANG_OVERRIDE { return m_list[i]; }
- virtual void SLANG_MCALL add(ICastable* castable) SLANG_OVERRIDE;
- virtual void SLANG_MCALL addUnknown(ISlangUnknown* unk) SLANG_OVERRIDE;
- virtual void SLANG_MCALL removeAt(Index i) SLANG_OVERRIDE;
- virtual void SLANG_MCALL clear() SLANG_OVERRIDE;
- virtual Index SLANG_MCALL indexOf(ICastable* castable) SLANG_OVERRIDE;
- virtual Index SLANG_MCALL indexOfUnknown(ISlangUnknown* unk) SLANG_OVERRIDE;
- virtual void* SLANG_MCALL find(const Guid& guid) SLANG_OVERRIDE;
- virtual ICastable* SLANG_MCALL findWithPredicate(FindFunc func, void* data) SLANG_OVERRIDE;
- virtual ICastable*const* SLANG_MCALL getBuffer() SLANG_OVERRIDE { return m_list.getBuffer(); }
-
- static ComPtr<ICastableList> create() { return ComPtr<ICastableList>(new CastableList); }
-
- /// Dtor
- virtual ~CastableList();
-
- void* getInterface(const Guid& guid);
- void* getObject(const Guid& guid);
-
-protected:
-
- List<ICastable*> m_list;
-};
-
-} // namespace Slang
-
-#endif