PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/DICK.B1/IronPython/Runtime/Types/TypeCache.Generated.cs

https://bitbucket.org/williamybs/uidipythontool
C# | 283 lines | 220 code | 43 blank | 20 comment | 56 complexity | d6b6ff6d45c195b284a35aacb798c1a4 MD5 | raw file
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Microsoft Public License. A
  6. * copy of the license can be found in the License.html file at the root of this distribution. If
  7. * you cannot locate the Microsoft Public License, please send an email to
  8. * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. * by the terms of the Microsoft Public License.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. using System;
  16. using Microsoft.Scripting.Runtime;
  17. using IronPython.Modules;
  18. using IronPython.Runtime.Exceptions;
  19. #if CLR2
  20. using Microsoft.Scripting.Math;
  21. using Complex = Microsoft.Scripting.Math.Complex64;
  22. #else
  23. using System.Numerics;
  24. #endif
  25. namespace IronPython.Runtime.Types {
  26. public static class TypeCache {
  27. #region Generated TypeCache Storage
  28. // *** BEGIN GENERATED CODE ***
  29. // generated by function: gen_typecache_storage from: generate_typecache.py
  30. private static PythonType array;
  31. private static PythonType builtinfunction;
  32. private static PythonType pythondictionary;
  33. private static PythonType frozensetcollection;
  34. private static PythonType pythonfunction;
  35. private static PythonType builtin;
  36. private static PythonType obj;
  37. private static PythonType setcollection;
  38. private static PythonType pythontype;
  39. private static PythonType str;
  40. private static PythonType pythontuple;
  41. private static PythonType weakreference;
  42. private static PythonType list;
  43. private static PythonType pythonfile;
  44. private static PythonType pythonmodule;
  45. private static PythonType method;
  46. private static PythonType enumerate;
  47. private static PythonType intType;
  48. private static PythonType singleType;
  49. private static PythonType doubleType;
  50. private static PythonType biginteger;
  51. private static PythonType complex;
  52. private static PythonType super;
  53. private static PythonType oldclass;
  54. private static PythonType oldinstance;
  55. private static PythonType nullType;
  56. private static PythonType boolType;
  57. private static PythonType baseException;
  58. // *** END GENERATED CODE ***
  59. #endregion
  60. #region Generated TypeCache Entries
  61. // *** BEGIN GENERATED CODE ***
  62. // generated by function: gen_typecache from: generate_typecache.py
  63. public static PythonType Array {
  64. get {
  65. if (array == null) array = DynamicHelpers.GetPythonTypeFromType(typeof(Array));
  66. return array;
  67. }
  68. }
  69. public static PythonType BuiltinFunction {
  70. get {
  71. if (builtinfunction == null) builtinfunction = DynamicHelpers.GetPythonTypeFromType(typeof(BuiltinFunction));
  72. return builtinfunction;
  73. }
  74. }
  75. public static PythonType Dict {
  76. get {
  77. if (pythondictionary == null) pythondictionary = DynamicHelpers.GetPythonTypeFromType(typeof(PythonDictionary));
  78. return pythondictionary;
  79. }
  80. }
  81. public static PythonType FrozenSet {
  82. get {
  83. if (frozensetcollection == null) frozensetcollection = DynamicHelpers.GetPythonTypeFromType(typeof(FrozenSetCollection));
  84. return frozensetcollection;
  85. }
  86. }
  87. public static PythonType Function {
  88. get {
  89. if (pythonfunction == null) pythonfunction = DynamicHelpers.GetPythonTypeFromType(typeof(PythonFunction));
  90. return pythonfunction;
  91. }
  92. }
  93. public static PythonType Builtin {
  94. get {
  95. if (builtin == null) builtin = DynamicHelpers.GetPythonTypeFromType(typeof(Builtin));
  96. return builtin;
  97. }
  98. }
  99. public static PythonType Object {
  100. get {
  101. if (obj == null) obj = DynamicHelpers.GetPythonTypeFromType(typeof(Object));
  102. return obj;
  103. }
  104. }
  105. public static PythonType Set {
  106. get {
  107. if (setcollection == null) setcollection = DynamicHelpers.GetPythonTypeFromType(typeof(SetCollection));
  108. return setcollection;
  109. }
  110. }
  111. public static PythonType PythonType {
  112. get {
  113. if (pythontype == null) pythontype = DynamicHelpers.GetPythonTypeFromType(typeof(PythonType));
  114. return pythontype;
  115. }
  116. }
  117. public static PythonType String {
  118. get {
  119. if (str == null) str = DynamicHelpers.GetPythonTypeFromType(typeof(String));
  120. return str;
  121. }
  122. }
  123. public static PythonType PythonTuple {
  124. get {
  125. if (pythontuple == null) pythontuple = DynamicHelpers.GetPythonTypeFromType(typeof(PythonTuple));
  126. return pythontuple;
  127. }
  128. }
  129. public static PythonType WeakReference {
  130. get {
  131. if (weakreference == null) weakreference = DynamicHelpers.GetPythonTypeFromType(typeof(WeakReference));
  132. return weakreference;
  133. }
  134. }
  135. public static PythonType List {
  136. get {
  137. if (list == null) list = DynamicHelpers.GetPythonTypeFromType(typeof(List));
  138. return list;
  139. }
  140. }
  141. public static PythonType PythonFile {
  142. get {
  143. if (pythonfile == null) pythonfile = DynamicHelpers.GetPythonTypeFromType(typeof(PythonFile));
  144. return pythonfile;
  145. }
  146. }
  147. public static PythonType Module {
  148. get {
  149. if (pythonmodule == null) pythonmodule = DynamicHelpers.GetPythonTypeFromType(typeof(PythonModule));
  150. return pythonmodule;
  151. }
  152. }
  153. public static PythonType Method {
  154. get {
  155. if (method == null) method = DynamicHelpers.GetPythonTypeFromType(typeof(Method));
  156. return method;
  157. }
  158. }
  159. public static PythonType Enumerate {
  160. get {
  161. if (enumerate == null) enumerate = DynamicHelpers.GetPythonTypeFromType(typeof(Enumerate));
  162. return enumerate;
  163. }
  164. }
  165. public static PythonType Int32 {
  166. get {
  167. if (intType == null) intType = DynamicHelpers.GetPythonTypeFromType(typeof(Int32));
  168. return intType;
  169. }
  170. }
  171. public static PythonType Single {
  172. get {
  173. if (singleType == null) singleType = DynamicHelpers.GetPythonTypeFromType(typeof(Single));
  174. return singleType;
  175. }
  176. }
  177. public static PythonType Double {
  178. get {
  179. if (doubleType == null) doubleType = DynamicHelpers.GetPythonTypeFromType(typeof(Double));
  180. return doubleType;
  181. }
  182. }
  183. public static PythonType BigInteger {
  184. get {
  185. if (biginteger == null) biginteger = DynamicHelpers.GetPythonTypeFromType(typeof(BigInteger));
  186. return biginteger;
  187. }
  188. }
  189. public static PythonType Complex {
  190. get {
  191. if (complex == null) complex = DynamicHelpers.GetPythonTypeFromType(typeof(Complex));
  192. return complex;
  193. }
  194. }
  195. public static PythonType Super {
  196. get {
  197. if (super == null) super = DynamicHelpers.GetPythonTypeFromType(typeof(Super));
  198. return super;
  199. }
  200. }
  201. public static PythonType OldClass {
  202. get {
  203. if (oldclass == null) oldclass = DynamicHelpers.GetPythonTypeFromType(typeof(OldClass));
  204. return oldclass;
  205. }
  206. }
  207. public static PythonType OldInstance {
  208. get {
  209. if (oldinstance == null) oldinstance = DynamicHelpers.GetPythonTypeFromType(typeof(OldInstance));
  210. return oldinstance;
  211. }
  212. }
  213. public static PythonType Null {
  214. get {
  215. if (nullType == null) nullType = DynamicHelpers.GetPythonTypeFromType(typeof(DynamicNull));
  216. return nullType;
  217. }
  218. }
  219. public static PythonType Boolean {
  220. get {
  221. if (boolType == null) boolType = DynamicHelpers.GetPythonTypeFromType(typeof(Boolean));
  222. return boolType;
  223. }
  224. }
  225. public static PythonType BaseException {
  226. get {
  227. if (baseException == null) baseException = DynamicHelpers.GetPythonTypeFromType(typeof(PythonExceptions.BaseException));
  228. return baseException;
  229. }
  230. }
  231. // *** END GENERATED CODE ***
  232. #endregion
  233. [Obsolete("use Complex instead")]
  234. public static PythonType Complex64 {
  235. get {
  236. return Complex;
  237. }
  238. }
  239. }
  240. }