Пример #1
0
        public static int registerToken(ITezCategoryBaseToken baseToken)
        {
            var id = m_TokenDic.Count;

            m_TokenDic.Add(baseToken.toName, baseToken);
            return(id);
        }
Пример #2
0
        protected TezCategoryBaseToken(TValue value, int layer, ITezCategoryBaseToken parent) : base(value)
        {
            this.layer  = layer;
            this.parent = parent;
            this.UID    = TezCategorySystem.registerToken(this);
//            Debug.Log(string.Format("{0}:{1}", this.toName, this.UID));
        }
Пример #3
0
        /// <summary>
        /// 检测Category是否包含此类型
        /// </summary>
        public bool contains(ITezCategoryBaseToken token)
        {
            if (token.layer < m_Tokens.Length)
            {
                return(m_Tokens[token.layer].Equals(token));
            }

            return(false);
        }
Пример #4
0
        /// <summary>
        /// 用FinalToken创建一个共用的Category
        /// </summary>
        private static TezCategory createCategory(ITezCategoryFinalToken finalToken)
        {
            Stack <ITezCategoryBaseToken> stack      = new Stack <ITezCategoryBaseToken>();
            ITezCategoryBaseToken         temp_token = finalToken;

            while (temp_token != null)
            {
                stack.Push(temp_token);
                temp_token = temp_token.parent;
            }

            TezCategory category = new TezCategory();

            category.setToken(stack.ToArray());
            return(category);
        }
 public Table getTable(ITezCategoryBaseToken baseToken)
 {
     return(m_TableList[baseToken.UID]);
 }
Пример #6
0
 protected TezCategoryFinalToken(TValue value, ITezCategoryBaseToken parentToken) : base(value, parentToken.layer + 1, parentToken)
 {
 }
Пример #7
0
 private Equipment(Category value, ITezCategoryBaseToken parentToken) : base(value, parentToken)
 {
 }
Пример #8
0
 private T7(Category value, ITezCategoryBaseToken parentToken) : base(value, parentToken)
 {
 }