コード例 #1
0
        /// <summary>
        /// 单独注册PrimaryPath
        /// </summary>
        public void registerPrimaryPath(ITezAttributeBuilder builder)
        {
            var definition_path            = builder.definition;
            var primary_length             = definition_path.primaryLength;
            TezAttributePath pre_path_node = null;

            for (int i = cPrimaryBegin; i < primary_length; i++)
            {
                this.getOrCreatePrimaryNode(definition_path.getPrimaryPathToken(i), ref pre_path_node).onRegisterObject(builder);
            }
        }
コード例 #2
0
        protected TezAttributeNode getOrCreatePrimaryNode(ITezAttributeToken token, ref TezAttributePath pre_path_node)
        {
            var id = token.tokenID;

            TezAttributeNode node = null;

            if (!m_Container.tryGetPrimaryNode(id, out node))
            {
                node = this.onCreatePrimaryChild(token);
                m_Container.addPrimaryNode(id, node);
                pre_path_node?.addChild(id);
            }

            if (node.nodeType == TezAttributeNodeType.Path)
            {
                pre_path_node = (TezAttributePath)node;
            }

            return(node);
        }