using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CGL.Graphics.XFileLib.Text
{
    
    /// <summary>
    /// テンプレート情報
    /// </summary>
    class XTemplateInfo
    {
        Dictionary<string, XTypeInfo> fields = new Dictionary<string, XTypeInfo>();

        string uuid = "";
        /// <summary>
        /// UUID
        /// </summary>
        public string UUID { get { return uuid; } }
        /// <summary>
        /// フィールド情報
        /// </summary>
        public Dictionary<string, XTypeInfo> Fields { get { return fields; } }
        
        public XTemplateInfo(string uuid)
        {
            this.uuid = uuid;
        }
    }
    /// <summary>
    /// 型情報
    /// </summary>
    class XTypeInfo : ICloneable
    {
        /// <summary>
        /// フィールド名
        /// </summary>
        public string FieldName;
        /// <summary>
        /// 型名
        /// </summary>
        public string TypeName;
        /// <summary>
        /// 配列のサイズ
        /// </summary>
        public List<string> Dimensions;

        #region ICloneable メンバー

        public object Clone()
        {
            return new XTypeInfo { FieldName = FieldName, TypeName = TypeName, Dimensions = new List<string>(Dimensions) }; 
        }

        #endregion
    }
}
