コード例 #1
0
        public void CreateTable(string nameId, string nameDisplay)
        {
            m_Meta = new MetaTable();
            m_Meta.SetColumns(m_ListMetaColumns.ToArray());
            m_Meta.name        = nameId;
            m_Meta.displayName = nameDisplay;

            m_Columns = m_ListColumns;

            m_ListMetaColumns = null;
            m_ListColumns     = null;
        }
コード例 #2
0
        static ObjectTable()
        {
            s_Meta = new Database.MetaTable[(int)ObjectMetaType.Count];

            var metaManaged = new Database.MetaTable();
            var metaNative  = new Database.MetaTable();

            s_Meta[(int)ObjectMetaType.Managed] = metaManaged;
            s_Meta[(int)ObjectMetaType.Native]  = metaNative;
            s_Meta[(int)ObjectMetaType.All]     = metaManaged;

            metaManaged.name        = TableName;
            metaManaged.displayName = TableDisplayName;
            metaNative.name         = TableName;
            metaNative.displayName  = TableDisplayName;

            var metaColIndex        = new Database.MetaColumn("Index", "Index", typeof(int), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(int)), "", 40);
            var metaColName         = new Database.MetaColumn("Name", "Name", typeof(string), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(string)), "", 200);
            var metaColValue        = new Database.MetaColumn("Value", "Value", typeof(string), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(string)), "", 180);
            var metaColType         = new Database.MetaColumn("Type", "Type", typeof(string), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(string)), "", 250);
            var metaColDataType     = new Database.MetaColumn("DataType", "Data Type", typeof(string), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(string)), "", 150);
            var metaColNOName       = new Database.MetaColumn("NativeObjectName", "Native Object Name", typeof(string), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(string)), "", 125);
            var metaColLength       = new Database.MetaColumn("Length", "Length", typeof(int), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.sumpositive, typeof(int)), "", 50);
            var metaColStatic       = new Database.MetaColumn("Static", "Static", typeof(bool), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.first, typeof(bool)), "", 50);
            var metaColRefCount     = new Database.MetaColumn("RefCount", "RefCount", typeof(int), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.sumpositive, typeof(int)), "", 50);
            var metaColOwnerSize    = new Database.MetaColumn("OwnedSize", "Owned Size", typeof(long), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.sumpositive, typeof(long)), "size", 50);
            var metaColTargetSize   = new Database.MetaColumn("TargetSize", "Target Size", typeof(long), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.sumpositive, typeof(long)), "size", 50);
            var metaColNativeSize   = new Database.MetaColumn("NativeSize", "Native Size", typeof(long), false, Grouping.groupByDuplicate, Grouping.GetMergeAlgo(Grouping.MergeAlgo.sumpositive, typeof(long)), "size", 75);
            var metaColNativeId     = new Database.MetaColumn("NativeInstanceId", "Native Instance ID", typeof(int), false, Grouping.groupByDuplicate, null, "", 75);
            var metaColAddress      = new Database.MetaColumn("Address", "Address", typeof(ulong), false, Grouping.groupByDuplicate, null, "", 75);
            var metaColUniqueString = new Database.MetaColumn("UniqueString", "Unique String", typeof(string), true, Grouping.groupByDuplicate, null, "", 250);

            var metaManagedCol = new List <Database.MetaColumn>();

            metaManagedCol.Add(metaColIndex);
            metaManagedCol.Add(metaColName);
            metaManagedCol.Add(metaColValue);
            metaManagedCol.Add(metaColType);
            metaManagedCol.Add(metaColDataType);
            metaManagedCol.Add(metaColNOName);
            metaManagedCol.Add(metaColLength);
            metaManagedCol.Add(metaColStatic);
            metaManagedCol.Add(metaColRefCount);
            metaManagedCol.Add(metaColOwnerSize);
            metaManagedCol.Add(metaColTargetSize);
            metaManagedCol.Add(metaColNativeSize);
            metaManagedCol.Add(metaColNativeId);
            metaManagedCol.Add(metaColAddress);
            metaManagedCol.Add(metaColUniqueString);
            var metaNativeCol = new List <Database.MetaColumn>();

            metaNativeCol.Add(new Database.MetaColumn(metaColIndex));
            metaNativeCol.Add(new Database.MetaColumn(metaColName));
            metaNativeCol.Add(new Database.MetaColumn(metaColValue));
            metaNativeCol.Add(new Database.MetaColumn(metaColType));
            metaNativeCol.Add(new Database.MetaColumn(metaColNOName));
            metaNativeCol.Add(new Database.MetaColumn(metaColDataType));
            metaNativeCol.Add(new Database.MetaColumn(metaColRefCount));
            metaNativeCol.Add(new Database.MetaColumn(metaColOwnerSize));
            metaNativeCol.Add(new Database.MetaColumn(metaColTargetSize));
            metaNativeCol.Add(new Database.MetaColumn(metaColNativeId));
            metaNativeCol.Add(new Database.MetaColumn(metaColAddress));
            metaNativeCol.Add(new Database.MetaColumn(metaColUniqueString));

            metaManaged.SetColumns(metaManagedCol.ToArray());
            metaNative.SetColumns(metaNativeCol.ToArray());
        }