@@ -1776,6 +1776,7 @@ public: \
1776
1776
typedef struct SlangReflectionVariableLayout SlangReflectionVariableLayout;
1777
1777
typedef struct SlangReflectionTypeParameter SlangReflectionTypeParameter;
1778
1778
typedef struct SlangReflectionUserAttribute SlangReflectionUserAttribute;
1779
+ typedef SlangReflectionUserAttribute SlangReflectionAttribute;
1779
1780
typedef struct SlangReflectionFunction SlangReflectionFunction;
1780
1781
typedef struct SlangReflectionGeneric SlangReflectionGeneric;
1781
1782
@@ -2140,46 +2141,48 @@ union GenericArgReflection
2140
2141
bool boolVal;
2141
2142
};
2142
2143
2143
- struct UserAttribute
2144
+ struct Attribute
2144
2145
{
2145
2146
char const * getName ()
2146
2147
{
2147
- return spReflectionUserAttribute_GetName ((SlangReflectionUserAttribute *)this );
2148
+ return spReflectionUserAttribute_GetName ((SlangReflectionAttribute *)this );
2148
2149
}
2149
2150
uint32_t getArgumentCount ()
2150
2151
{
2151
2152
return (uint32_t )spReflectionUserAttribute_GetArgumentCount (
2152
- (SlangReflectionUserAttribute *)this );
2153
+ (SlangReflectionAttribute *)this );
2153
2154
}
2154
2155
TypeReflection* getArgumentType (uint32_t index)
2155
2156
{
2156
2157
return (TypeReflection*)spReflectionUserAttribute_GetArgumentType (
2157
- (SlangReflectionUserAttribute *)this ,
2158
+ (SlangReflectionAttribute *)this ,
2158
2159
index );
2159
2160
}
2160
2161
SlangResult getArgumentValueInt (uint32_t index, int * value)
2161
2162
{
2162
2163
return spReflectionUserAttribute_GetArgumentValueInt (
2163
- (SlangReflectionUserAttribute *)this ,
2164
+ (SlangReflectionAttribute *)this ,
2164
2165
index ,
2165
2166
value);
2166
2167
}
2167
2168
SlangResult getArgumentValueFloat (uint32_t index, float * value)
2168
2169
{
2169
2170
return spReflectionUserAttribute_GetArgumentValueFloat (
2170
- (SlangReflectionUserAttribute *)this ,
2171
+ (SlangReflectionAttribute *)this ,
2171
2172
index ,
2172
2173
value);
2173
2174
}
2174
2175
const char * getArgumentValueString (uint32_t index, size_t * outSize)
2175
2176
{
2176
2177
return spReflectionUserAttribute_GetArgumentValueString (
2177
- (SlangReflectionUserAttribute *)this ,
2178
+ (SlangReflectionAttribute *)this ,
2178
2179
index ,
2179
2180
outSize);
2180
2181
}
2181
2182
};
2182
2183
2184
+ typedef Attribute UserAttribute;
2185
+
2183
2186
struct TypeReflection
2184
2187
{
2185
2188
enum class Kind
@@ -2320,13 +2323,15 @@ struct TypeReflection
2320
2323
return (UserAttribute*)spReflectionType_GetUserAttribute ((SlangReflectionType*)this , index );
2321
2324
}
2322
2325
2323
- UserAttribute* findUserAttributeByName (char const * name)
2326
+ UserAttribute* findAttributeByName (char const * name)
2324
2327
{
2325
2328
return (UserAttribute*)spReflectionType_FindUserAttributeByName (
2326
2329
(SlangReflectionType*)this ,
2327
2330
name);
2328
2331
}
2329
2332
2333
+ UserAttribute* findUserAttributeByName (char const * name) { return findAttributeByName (name); }
2334
+
2330
2335
TypeReflection* applySpecializations (GenericReflection* generic)
2331
2336
{
2332
2337
return (TypeReflection*)spReflectionType_applySpecializations (
@@ -2777,21 +2782,26 @@ struct VariableReflection
2777
2782
return spReflectionVariable_GetUserAttributeCount ((SlangReflectionVariable*)this );
2778
2783
}
2779
2784
2780
- UserAttribute * getUserAttributeByIndex (unsigned int index)
2785
+ Attribute * getUserAttributeByIndex (unsigned int index)
2781
2786
{
2782
2787
return (UserAttribute*)spReflectionVariable_GetUserAttribute (
2783
2788
(SlangReflectionVariable*)this ,
2784
2789
index );
2785
2790
}
2786
2791
2787
- UserAttribute* findUserAttributeByName (SlangSession* globalSession, char const * name)
2792
+ Attribute* findAttributeByName (SlangSession* globalSession, char const * name)
2788
2793
{
2789
2794
return (UserAttribute*)spReflectionVariable_FindUserAttributeByName (
2790
2795
(SlangReflectionVariable*)this ,
2791
2796
globalSession,
2792
2797
name);
2793
2798
}
2794
2799
2800
+ Attribute* findUserAttributeByName (SlangSession* globalSession, char const * name)
2801
+ {
2802
+ return findAttributeByName (globalSession, name);
2803
+ }
2804
+
2795
2805
bool hasDefaultValue ()
2796
2806
{
2797
2807
return spReflectionVariable_HasDefaultValue ((SlangReflectionVariable*)this );
@@ -2908,20 +2918,22 @@ struct FunctionReflection
2908
2918
{
2909
2919
return spReflectionFunction_GetUserAttributeCount ((SlangReflectionFunction*)this );
2910
2920
}
2911
- UserAttribute * getUserAttributeByIndex (unsigned int index)
2921
+ Attribute * getUserAttributeByIndex (unsigned int index)
2912
2922
{
2913
- return (UserAttribute*)spReflectionFunction_GetUserAttribute (
2914
- (SlangReflectionFunction*)this ,
2915
- index );
2923
+ return (
2924
+ Attribute*)spReflectionFunction_GetUserAttribute ((SlangReflectionFunction*)this , index );
2916
2925
}
2917
- UserAttribute* findUserAttributeByName (SlangSession* globalSession, char const * name)
2926
+ Attribute* findAttributeByName (SlangSession* globalSession, char const * name)
2918
2927
{
2919
- return (UserAttribute *)spReflectionFunction_FindUserAttributeByName (
2928
+ return (Attribute *)spReflectionFunction_FindUserAttributeByName (
2920
2929
(SlangReflectionFunction*)this ,
2921
2930
globalSession,
2922
2931
name);
2923
2932
}
2924
-
2933
+ Attribute* findUserAttributeByName (SlangSession* globalSession, char const * name)
2934
+ {
2935
+ return findAttributeByName (globalSession, name);
2936
+ }
2925
2937
Modifier* findModifier (Modifier::ID id)
2926
2938
{
2927
2939
return (Modifier*)spReflectionFunction_FindModifier (
0 commit comments