2 * Copyright (c) 2007-2010 SlimDX Group
\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
5 * of this software and associated documentation files (the "Software"), to deal
\r
6 * in the Software without restriction, including without limitation the rights
\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
8 * copies of the Software, and to permit persons to whom the Software is
\r
9 * furnished to do so, subject to the following conditions:
\r
11 * The above copyright notice and this permission notice shall be included in
\r
12 * all copies or substantial portions of the Software.
\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
24 #include "../ComObject.h"
\r
28 namespace D3DCompiler
\r
30 value class ShaderTypeDescription;
\r
33 /// Defines an interface that provides access to types of shader variables.
\r
35 /// <unmanaged>ID3D11ShaderReflectionType</unmanaged>
\r
36 public ref class ShaderReflectionType
\r
39 ID3D11ShaderReflectionType* m_Pointer;
\r
40 ShaderReflectionType^ baseClass;
\r
41 ShaderReflectionType^ subType;
\r
46 ShaderReflectionType( ID3D11ShaderReflectionType* pointer );
\r
50 /// Initializes a new instance of the <see cref="ShaderReflectionType"/> class.
\r
52 //// <param name="pointer">The unmanaged ID3D11ShaderReflectionType pointer.</param>
\r
53 ShaderReflectionType( System::IntPtr pointer );
\r
56 /// Gets the variable's description.
\r
58 property ShaderTypeDescription Description
\r
60 ShaderTypeDescription get();
\r
64 /// Gets the type of this variable's base class.
\r
66 property ShaderReflectionType^ BaseClass
\r
68 ShaderReflectionType^ get() { return baseClass; }
\r
72 /// Gets the variable's sub type.
\r
74 property ShaderReflectionType^ Subtype
\r
76 ShaderReflectionType^ get() { return subType; }
\r
80 /// Gets an interface by index.
\r
82 /// <param name="index">The zero-based index of the interface to retrieve.</param>
\r
83 /// <returns>The interface at the given index.</returns>
\r
84 ShaderReflectionType^ GetInterface( int index );
\r
87 /// Gets a member variable type by index.
\r
89 /// <param name="index">The zero-based index of the member variable to retrieve.</param>
\r
90 /// <returns>The member variable type at the given index.</returns>
\r
91 ShaderReflectionType^ GetMemberType( int index );
\r
94 /// Gets a member variable type by name.
\r
96 /// <param name="name">The name of the member variable to retrieve.</param>
\r
97 /// <returns>The member variable type with the given name.</returns>
\r
98 ShaderReflectionType^ GetMemberType( System::String^ name );
\r
101 /// Gets the name of a member variable type.
\r
103 /// <param name="index">The zero-based index of the member variable to retrieve.</param>
\r
104 /// <returns>The name of the given member variable type.</returns>
\r
105 System::String^ GetMemberTypeName( int index );
\r
108 /// Determines whether the class type implements the given interface.
\r
110 /// <param name="base">The potential parent type.</param>
\r
111 /// <returns><c>true</c> if the class type implements the given interface; otherwise, <c>false</c>.</returns>
\r
112 bool ImplementsInterface( ShaderReflectionType^ base );
\r
115 /// Determines whether the variable type is equivalent to or inherits from the given type.
\r
117 /// <param name="type">The potential parent type.</param>
\r
118 /// <returns><c>true</c> if the class type is equivalent to or inherits from the given type; otherwise, <c>false</c>.</returns>
\r
119 bool IsOfType( ShaderReflectionType^ type );
\r
122 /// Determines whether the underlying variable type is equivalent to that of the specified type.
\r
124 /// <param name="type">The type to test for equivalence.</param>
\r
125 /// <returns><c>true</c> if the underlying class type is equivalent to that of the specified type; otherwise, <c>false</c>.</returns>
\r
126 bool IsTypeEqual( ShaderReflectionType^ type );
\r