コード例 #1
0
    static XType()
    {
        ALL = new SortedDictionary <string, XType>(
            StringComparer.Ordinal);

        OBJECT = new XType("std::object");
        BOOL   = new XType("std::bool");
        INT    = new XType("std::int");
        U8     = new XType("std::u8");
        U16    = new XType("std::u16");
        U32    = new XType("std::u32");
        U64    = new XType("std::u64");
        I8     = new XType("std::i8");
        I16    = new XType("std::i16");
        I32    = new XType("std::i32");
        I64    = new XType("std::i64");
        // STRING = new XType("std::string");
        XTYPE = new XType("std::type");

        Interpreter.AddExportQualified("std::object");
        Interpreter.AddExportQualified("std::bool");
        Interpreter.AddExportQualified("std::int");
        Interpreter.AddExportQualified("std::u8");
        Interpreter.AddExportQualified("std::u16");
        Interpreter.AddExportQualified("std::u32");
        Interpreter.AddExportQualified("std::u64");
        Interpreter.AddExportQualified("std::i8");
        Interpreter.AddExportQualified("std::i16");
        Interpreter.AddExportQualified("std::i32");
        Interpreter.AddExportQualified("std::i64");
        Interpreter.AddExportQualified("std::string");
        Interpreter.AddExportQualified("std::type");

        BOOL.IsBasic = true;
        INT.IsBasic  = true;
        U8.IsBasic   = true;
        U16.IsBasic  = true;
        U32.IsBasic  = true;
        U64.IsBasic  = true;
        I8.IsBasic   = true;
        I16.IsBasic  = true;
        I32.IsBasic  = true;
        I64.IsBasic  = true;

        BOOL.IsRestricted = true;
        U8.IsRestricted   = true;
        U16.IsRestricted  = true;
        U32.IsRestricted  = true;
        U64.IsRestricted  = true;
        I8.IsRestricted   = true;
        I16.IsRestricted  = true;
        I32.IsRestricted  = true;
        I64.IsRestricted  = true;

        BOOL.AllowsSubTypes = false;
        U8.AllowsSubTypes   = false;
        U16.AllowsSubTypes  = false;
        U32.AllowsSubTypes  = false;
        U64.AllowsSubTypes  = false;
        I8.AllowsSubTypes   = false;
        I16.AllowsSubTypes  = false;
        I32.AllowsSubTypes  = false;
        I64.AllowsSubTypes  = false;

        OBJECT.LockDown();
        BOOL.LockDown();
        INT.LockDown();
        U8.LockDown();
        U16.LockDown();
        U32.LockDown();
        U64.LockDown();
        I8.LockDown();
        I16.LockDown();
        I32.LockDown();
        I64.LockDown();
        // STRING.LockDown();
        XTYPE.LockDown();

        ARRAY_OBJECT = LookupArray(OBJECT, false);
        ARRAY_BOOL   = LookupArray(BOOL, false);
        ARRAY_U8     = LookupArray(U8, false);
        ARRAY_U16    = LookupArray(U16, false);
        ARRAY_U32    = LookupArray(U32, false);
        ARRAY_U64    = LookupArray(U64, false);
        ARRAY_I8     = LookupArray(I8, false);
        ARRAY_I16    = LookupArray(I16, false);
        ARRAY_I32    = LookupArray(I32, false);
        ARRAY_I64    = LookupArray(I64, false);
    }