diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-09-19 16:27:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 13:27:50 -0700 |
| commit | dd3d80e61b316390a468a142de2be2fb85b73d0d (patch) | |
| tree | cbfd3ddcbaed84de335818e9e618d7c3ebff6ecd /include/slang.h | |
| parent | 9d40ce4e8921ef468281c91f052dbd443ecf56e2 (diff) | |
Allow lookups of overloaded methods. (#5110)
* Allow lookups of overloaded methods.
* Update slang-reflection-api.cpp
* Update slang.cpp
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'include/slang.h')
| -rw-r--r-- | include/slang.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h index 3bcdcbba8..30aa239a7 100644 --- a/include/slang.h +++ b/include/slang.h @@ -2592,6 +2592,9 @@ extern "C" SLANG_API SlangReflectionGeneric* spReflectionFunction_GetGenericContainer(SlangReflectionFunction* func); SLANG_API SlangReflectionFunction* spReflectionFunction_applySpecializations(SlangReflectionFunction* func, SlangReflectionGeneric* generic); SLANG_API SlangReflectionFunction* spReflectionFunction_specializeWithArgTypes(SlangReflectionFunction* func, SlangInt argTypeCount, SlangReflectionType* const* argTypes); + SLANG_API bool spReflectionFunction_isOverloaded(SlangReflectionFunction* func); + SLANG_API unsigned int spReflectionFunction_getOverloadCount(SlangReflectionFunction* func); + SLANG_API SlangReflectionFunction* spReflectionFunction_getOverload(SlangReflectionFunction* func, unsigned int index); // Abstract Decl Reflection @@ -3595,6 +3598,21 @@ namespace slang { return (FunctionReflection*)spReflectionFunction_specializeWithArgTypes((SlangReflectionFunction*)this, argCount, (SlangReflectionType* const*)types); } + + bool isOverloaded() + { + return spReflectionFunction_isOverloaded((SlangReflectionFunction*)this); + } + + unsigned int getOverloadCount() + { + return spReflectionFunction_getOverloadCount((SlangReflectionFunction*)this); + } + + FunctionReflection* getOverload(unsigned int index) + { + return (FunctionReflection*)spReflectionFunction_getOverload((SlangReflectionFunction*)this, index); + } }; struct GenericReflection |
