コード例 #1
0
        public static void initDefTypes()
        {
            {
                UInt16        utype    = 2;
                string        typeName = "BOOL";
                string        name     = "UINT8";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 3;
                string        typeName = "UINT16";
                string        name     = "UINT16";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 5;
                string        typeName = "SPACE_KEY";
                string        name     = "UINT64";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 4;
                string        typeName = "ENTITY_ID";
                string        name     = "UINT32";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 6;
                string        typeName = "MJPAI";
                string        name     = "INT8";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 7;
                string        typeName = "INT16";
                string        name     = "INT16";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 8;
                string        typeName = "INT32";
                string        name     = "INT32";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 9;
                string        typeName = "INT64";
                string        name     = "INT64";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 1;
                string        typeName = "STRING";
                string        name     = "STRING";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 12;
                string        typeName = "UNICODE";
                string        name     = "UNICODE";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 13;
                string        typeName = "FLOAT";
                string        name     = "FLOAT";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 14;
                string        typeName = "DOUBLE";
                string        name     = "DOUBLE";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 10;
                string        typeName = "PYTHON";
                string        name     = "PYTHON";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 10;
                string        typeName = "PY_DICT";
                string        name     = "PY_DICT";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 10;
                string        typeName = "PY_TUPLE";
                string        name     = "PY_TUPLE";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 10;
                string        typeName = "PY_LIST";
                string        name     = "PY_LIST";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 10;
                string        typeName = "ENTITYCALL";
                string        name     = "ENTITYCALL";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 11;
                string        typeName = "BLOB";
                string        name     = "BLOB";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 15;
                string        typeName = "VECTOR2";
                string        name     = "VECTOR2";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 16;
                string        typeName = "VECTOR3";
                string        name     = "VECTOR3";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16        utype    = 17;
                string        typeName = "VECTOR4";
                string        name     = "VECTOR4";
                DATATYPE_BASE val      = null;
                EntityDef.datatypes.TryGetValue(name, out val);
                EntityDef.datatypes[typeName]   = val;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16           utype    = 22;
                string           typeName = "MJ_LIST";
                DATATYPE_MJ_LIST datatype = new DATATYPE_MJ_LIST();
                EntityDef.datatypes[typeName]   = datatype;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16 utype    = 23;
                string typeName = "ENTITY_LIST";
                DATATYPE_ENTITY_LIST datatype = new DATATYPE_ENTITY_LIST();
                EntityDef.datatypes[typeName]   = datatype;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16 utype    = 24;
                string typeName = "PLAYER_PUBLIC_INFO";
                DATATYPE_PLAYER_PUBLIC_INFO datatype = new DATATYPE_PLAYER_PUBLIC_INFO();
                EntityDef.datatypes[typeName]   = datatype;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16 utype    = 25;
                string typeName = "PLAYERINFO_LIST";
                DATATYPE_PLAYERINFO_LIST datatype = new DATATYPE_PLAYERINFO_LIST();
                EntityDef.datatypes[typeName]   = datatype;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            {
                UInt16 utype    = 26;
                string typeName = "ROOM_PUBLIC_INFO";
                DATATYPE_ROOM_PUBLIC_INFO datatype = new DATATYPE_ROOM_PUBLIC_INFO();
                EntityDef.datatypes[typeName]   = datatype;
                EntityDef.id2datatypes[utype]   = EntityDef.datatypes[typeName];
                EntityDef.datatype2id[typeName] = utype;
            }

            foreach (string datatypeStr in EntityDef.datatypes.Keys)
            {
                DATATYPE_BASE dataType = EntityDef.datatypes[datatypeStr];
                if (dataType != null)
                {
                    dataType.bind();
                }
            }
        }