OSDN Git Service

SlimDXの改造後コード。(June2010を変更したもの。)
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / d3dcompiler / ShaderVariableDescriptionDC.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 "EnumsDC.h"\r
25 \r
26 namespace SlimDX\r
27 {\r
28         namespace D3DCompiler\r
29         {\r
30                 /// <summary>\r
31                 /// Describes a shader variable.\r
32                 /// </summary>\r
33                 /// <unmanaged>D3D11_SHADER_VARIABLE_DESC</unmanaged>\r
34                 public value class ShaderVariableDescription : System::IEquatable<ShaderVariableDescription>\r
35                 {\r
36                 private:\r
37                         System::String^ m_Name;\r
38                         int m_StartOffset;\r
39                         int m_Size;\r
40                         ShaderVariableFlags m_Flags;\r
41                         System::IntPtr defaultValue;\r
42                 \r
43                 internal:\r
44                         ShaderVariableDescription( const D3D11_SHADER_VARIABLE_DESC& description );\r
45                 \r
46                 public:\r
47                         /// <summary>\r
48                         /// The variable name.\r
49                         /// </summary>\r
50                         property System::String^ Name\r
51                         {\r
52                                 System::String^ get();\r
53                         }\r
54                         \r
55                         /// <summary>\r
56                         /// Offset from the start of the parent structure, to the beginning of the variable.\r
57                         /// </summary>\r
58                         property int StartOffset\r
59                         {\r
60                                 int get();\r
61                         }\r
62                         \r
63                         /// <summary>\r
64                         /// Size of the variable (in bytes).\r
65                         /// </summary>\r
66                         property int Size\r
67                         {\r
68                                 int get();\r
69                         }\r
70 \r
71                         /// <summary>\r
72                         /// Flags, which identify shader-variable properties.\r
73                         /// </summary>\r
74                         property ShaderVariableFlags Flags\r
75                         {\r
76                                 ShaderVariableFlags get();\r
77                         }\r
78 \r
79                         /// <summary>\r
80                         /// The default value for initializing the variable.\r
81                         /// </summary>\r
82                         property System::IntPtr DefaultValue\r
83                         {\r
84                                 System::IntPtr get();\r
85                         }\r
86 \r
87                         /// <summary>\r
88                         /// Tests for equality between two objects.\r
89                         /// </summary>\r
90                         /// <param name="left">The first value to compare.</param>\r
91                         /// <param name="right">The second value to compare.</param>\r
92                         /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>\r
93                         static bool operator == ( ShaderVariableDescription left, ShaderVariableDescription right );\r
94 \r
95                         /// <summary>\r
96                         /// Tests for inequality between two objects.\r
97                         /// </summary>\r
98                         /// <param name="left">The first value to compare.</param>\r
99                         /// <param name="right">The second value to compare.</param>\r
100                         /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>\r
101                         static bool operator != ( ShaderVariableDescription left, ShaderVariableDescription right );\r
102 \r
103                         /// <summary>\r
104                         /// Returns the hash code for this instance.\r
105                         /// </summary>\r
106                         /// <returns>A 32-bit signed integer hash code.</returns>\r
107                         virtual int GetHashCode() override;\r
108 \r
109                         /// <summary>\r
110                         /// Returns a value that indicates whether the current instance is equal to a specified object. \r
111                         /// </summary>\r
112                         /// <param name="obj">Object to make the comparison with.</param>\r
113                         /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>\r
114                         virtual bool Equals( System::Object^ obj ) override;\r
115 \r
116                         /// <summary>\r
117                         /// Returns a value that indicates whether the current instance is equal to the specified object. \r
118                         /// </summary>\r
119                         /// <param name="other">Object to make the comparison with.</param>\r
120                         /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>\r
121                         virtual bool Equals( ShaderVariableDescription other );\r
122 \r
123                         /// <summary>\r
124                         /// Determines whether the specified object instances are considered equal. \r
125                         /// </summary>\r
126                         /// <param name="value1">The first value to compare.</param>\r
127                         /// <param name="value2">The second value to compare.</param>\r
128                         /// <returns><c>true</c> if <paramref name="value1"/> is the same instance as <paramref name="value2"/> or \r
129                         /// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns>\r
130                         static bool Equals( ShaderVariableDescription% value1, ShaderVariableDescription% value2 );\r
131                 };\r
132         }\r
133 };