/* **********************************************************************************
 *
 * Copyright (c) Microsoft Corporation. All rights reserved.
 *
 * This source code is subject to terms and conditions of the Shared Source License
 * for IronPython. A copy of the license can be found in the License.html file
 * at the root of this distribution. If you can not locate the Shared Source License
 * for IronPython, please send an email to ironpy@microsoft.com.
 * By using this source code in any fashion, you are agreeing to be bound by
 * the terms of the Shared Source License for IronPython.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * **********************************************************************************/

using System;
using System.Collections.Generic;
using System.Text;
using IronPython.Modules;

namespace IronPython.Runtime {
    public static class TypeCache {
        #region Generated TypeCache Storage

        // *** BEGIN GENERATED CODE ***

        private static DynamicType builtinfunction,dict,frozenset,function,codecs,generator,set,reflectedtype,str,systemstate,tuple,usertype,weakreference,list,pythonfile,method,enumerate;
        private static ReflectedType builtin;
        private static PythonType obj,intType;

        // *** END GENERATED CODE ***

        #endregion
        
        #region Generated TypeCache Entries

        // *** BEGIN GENERATED CODE ***

        public static DynamicType BuiltinFunction {
            get {
                if(builtinfunction == null) builtinfunction = Ops.GetDynamicTypeFromType(typeof(BuiltinFunction));
                return builtinfunction;
            }
        }

        public static DynamicType Dict {
            get {
                if(dict == null) dict = Ops.GetDynamicTypeFromType(typeof(Dict));
                return dict;
            }
        }

        public static DynamicType FrozenSet {
            get {
                if(frozenset == null) frozenset = Ops.GetDynamicTypeFromType(typeof(FrozenSetCollection));
                return frozenset;
            }
        }

        public static DynamicType Function {
            get {
                if(function == null) function = Ops.GetDynamicTypeFromType(typeof(PythonFunction));
                return function;
            }
        }

        public static DynamicType Codecs {
            get {
                if(codecs == null) codecs = Ops.GetDynamicTypeFromType(typeof(PythonCodecs));
                return codecs;
            }
        }

        public static ReflectedType Builtin {
            get {
                if(builtin == null) builtin = (ReflectedType)Ops.GetDynamicTypeFromType(typeof(Builtin));
                return builtin;
            }
        }

        public static DynamicType Generator {
            get {
                if(generator == null) generator = Ops.GetDynamicTypeFromType(typeof(Generator));
                return generator;
            }
        }

        public static PythonType Object {
            get {
                if(obj == null) obj = (PythonType)Ops.GetDynamicTypeFromType(typeof(Object));
                return obj;
            }
        }

        public static DynamicType Set {
            get {
                if(set == null) set = Ops.GetDynamicTypeFromType(typeof(SetCollection));
                return set;
            }
        }

        public static DynamicType ReflectedType {
            get {
                if(reflectedtype == null) reflectedtype = Ops.GetDynamicTypeFromType(typeof(ReflectedType));
                return reflectedtype;
            }
        }

        public static DynamicType String {
            get {
                if(str == null) str = Ops.GetDynamicTypeFromType(typeof(String));
                return str;
            }
        }

        public static DynamicType SystemState {
            get {
                if(systemstate == null) systemstate = Ops.GetDynamicTypeFromType(typeof(SystemState));
                return systemstate;
            }
        }

        public static DynamicType Tuple {
            get {
                if(tuple == null) tuple = Ops.GetDynamicTypeFromType(typeof(Tuple));
                return tuple;
            }
        }

        public static DynamicType UserType {
            get {
                if(usertype == null) usertype = Ops.GetDynamicTypeFromType(typeof(UserType));
                return usertype;
            }
        }

        public static DynamicType WeakReference {
            get {
                if(weakreference == null) weakreference = Ops.GetDynamicTypeFromType(typeof(WeakReference));
                return weakreference;
            }
        }

        public static DynamicType List {
            get {
                if(list == null) list = Ops.GetDynamicTypeFromType(typeof(List));
                return list;
            }
        }

        public static DynamicType PythonFile {
            get {
                if(pythonfile == null) pythonfile = Ops.GetDynamicTypeFromType(typeof(PythonFile));
                return pythonfile;
            }
        }

        public static DynamicType Method {
            get {
                if(method == null) method = Ops.GetDynamicTypeFromType(typeof(Method));
                return method;
            }
        }

        public static DynamicType Enumerate {
            get {
                if(enumerate == null) enumerate = Ops.GetDynamicTypeFromType(typeof(Enumerate));
                return enumerate;
            }
        }

        public static PythonType Int32 {
            get {
                if(intType == null) intType = (PythonType)Ops.GetDynamicTypeFromType(typeof(Int32));
                return intType;
            }
        }


        // *** END GENERATED CODE ***

        #endregion
    }
}
