OSDN Git Service

SlimDXの改造後コード。(June2010を変更したもの。)
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / d3dcompiler / ShaderReflectionTypeDC.h
1 /*\r
2 * Copyright (c) 2007-2010 SlimDX Group\r
3\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
10\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
13\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
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 #include "../ComObject.h"\r
25 \r
26 namespace SlimDX\r
27 {\r
28         namespace D3DCompiler\r
29         {\r
30                 value class ShaderTypeDescription;\r
31 \r
32                 /// <summary>\r
33                 /// Defines an interface that provides access to types of shader variables.\r
34                 /// </summary>\r
35                 /// <unmanaged>ID3D11ShaderReflectionType</unmanaged>\r
36                 public ref class ShaderReflectionType\r
37                 {\r
38                 private:\r
39                         ID3D11ShaderReflectionType* m_Pointer;\r
40                         ShaderReflectionType^ baseClass;\r
41                         ShaderReflectionType^ subType;\r
42 \r
43                         void Init();\r
44                         \r
45                 internal:\r
46                         ShaderReflectionType( ID3D11ShaderReflectionType* pointer );\r
47 \r
48                 public:\r
49                         /// <summary>\r
50                         /// Initializes a new instance of the <see cref="ShaderReflectionType"/> class.\r
51                         /// </summary>\r
52                         //// <param name="pointer">The unmanaged ID3D11ShaderReflectionType pointer.</param>\r
53                         ShaderReflectionType( System::IntPtr pointer );\r
54 \r
55                         /// <summary>\r
56                         /// Gets the variable's description.\r
57                         /// </summary>\r
58                         property ShaderTypeDescription Description\r
59                         {\r
60                                 ShaderTypeDescription get();\r
61                         }\r
62 \r
63                         /// <summary>\r
64                         /// Gets the type of this variable's base class.\r
65                         /// </summary>\r
66                         property ShaderReflectionType^ BaseClass\r
67                         {\r
68                                 ShaderReflectionType^ get() { return baseClass; }\r
69                         }\r
70                         \r
71                         /// <summary>\r
72                         /// Gets the variable's sub type.\r
73                         /// </summary>\r
74                         property ShaderReflectionType^ Subtype\r
75                         {\r
76                                 ShaderReflectionType^ get() { return subType; }\r
77                         }\r
78 \r
79                         /// <summary>\r
80                         /// Gets an interface by index.\r
81                         /// </summary>\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
85 \r
86                         /// <summary>\r
87                         /// Gets a member variable type by index.\r
88                         /// </summary>\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
92 \r
93                         /// <summary>\r
94                         /// Gets a member variable type by name.\r
95                         /// </summary>\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
99 \r
100                         /// <summary>\r
101                         /// Gets the name of a member variable type.\r
102                         /// </summary>\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
106 \r
107                         /// <summary>\r
108                         /// Determines whether the class type implements the given interface.\r
109                         /// </summary>\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
113 \r
114                         /// <summary>\r
115                         /// Determines whether the variable type is equivalent to or inherits from the given type.\r
116                         /// </summary>\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
120 \r
121                         /// <summary>\r
122                         /// Determines whether the underlying variable type is equivalent to that of the specified type.\r
123                         /// </summary>\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
127                 };\r
128         }\r
129 }