Exemplo n.º 1
0
        internal virtual IPartitionSpaceNode CreateIPartitionSpaceNode()
        {
            // TODO: 实例化相应的具体类。
            IPartitionSpaceNode target = null;

            return(target);
        }
Exemplo n.º 2
0
        public void DeactivateSpaceNodeTest()
        {
            IPartitionSpaceNode target = CreateIPartitionSpaceNode(); // TODO: 初始化为适当的值
            object sender = null;                                     // TODO: 初始化为适当的值
            DeactivateSpaceNodeEventArgs eventArgs = null;            // TODO: 初始化为适当的值

            target.DeactivateSpaceNode(sender, eventArgs);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 3
0
        public void ProcessPartitionSpaceTest()
        {
            BaseMap             owner  = null;                    // TODO: 初始化为适当的值
            MapSpaceNode        target = new MapSpaceNode(owner); // TODO: 初始化为适当的值
            IPartitionSpaceNode partitionSpaceInterface = null;   // TODO: 初始化为适当的值

            target.ProcessPartitionSpace(partitionSpaceInterface);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        public virtual void ProcessPartitionSpace(IPartitionSpaceNode partitionSpaceInterface)
        {
            if (partitionSpaceInterface == null)
            {
                throw new Exception("MapSpaceNode.ProcessPartitionSpace(...) - partitionSpaceInterface == null error!");
            }

            if (this.EventPartitionSpaceNode != null)
            {
                throw new Exception("MapSpaceNode.ProcessPartitionSpace(...) - this.EventPartitionSpaceNode != null error!");
            }

            this.EventInitSpaceNode       += new EventHandler <SpaceNodeEventArgs>(partitionSpaceInterface.InitSpaceNode);
            this.EventPartitionSpaceNode  += new EventHandler <PartitionSpaceNodeEventArgs>(partitionSpaceInterface.ProcessPartitionSpaceNode);
            this.EventActivateSpaceNode   += new EventHandler <ActivateSpaceNodeEventArgs>(partitionSpaceInterface.ActivateSpaceNode);
            this.EventDeactivateSpaceNode += new EventHandler <DeactivateSpaceNodeEventArgs>(partitionSpaceInterface.DeactivateSpaceNode);

            // EventInitSpaceNode
            SpaceNodeEventArgs spaceNodeEventArgs = new SpaceNodeEventArgs(this);

            this.EventInitSpaceNode(this, spaceNodeEventArgs);

            // EventPartitionSpaceNode
            PartitionSpaceNodeEventArgs partitionSpaceNodeEventArgs = new PartitionSpaceNodeEventArgs(this, this.m_Owner);

            this.EventPartitionSpaceNode(this, partitionSpaceNodeEventArgs);

            if (partitionSpaceNodeEventArgs.PartitionSpace != null)
            {
                m_SpaceNodes = partitionSpaceNodeEventArgs.PartitionSpace;

                for (int iIndex0 = 0; iIndex0 < m_SpaceNodes.GetLength(0); iIndex0++)
                {
                    for (int iIndex1 = 0; iIndex1 < m_SpaceNodes.GetLength(1); iIndex1++)
                    {
                        for (int iIndex2 = 0; iIndex2 < m_SpaceNodes.GetLength(2); iIndex2++)
                        {
                            if (m_SpaceNodes[iIndex0, iIndex1, iIndex2] != null)
                            {
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].RankIndex    = new RankIndex(iIndex0, iIndex1, iIndex2);
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].Parent       = this;
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].Owner        = this.Owner;
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].m_LayerIndex = this.m_LayerIndex + 1;

                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].ProcessPartitionSpace(partitionSpaceInterface);
                            }
                        }
                    }
                }

                m_IsLeaf = false;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 
        /// </summary>
        public virtual void ProcessPartitionSpace( IPartitionSpaceNode partitionSpaceInterface )
        {
            if ( partitionSpaceInterface == null )
                throw new Exception( "MapSpaceNode.ProcessPartitionSpace(...) - partitionSpaceInterface == null error!" );

            if ( this.EventPartitionSpaceNode != null )
                throw new Exception( "MapSpaceNode.ProcessPartitionSpace(...) - this.EventPartitionSpaceNode != null error!" );

            this.EventInitSpaceNode += new EventHandler<SpaceNodeEventArgs>( partitionSpaceInterface.InitSpaceNode );
            this.EventPartitionSpaceNode += new EventHandler<PartitionSpaceNodeEventArgs>( partitionSpaceInterface.ProcessPartitionSpaceNode );
            this.EventActivateSpaceNode += new EventHandler<ActivateSpaceNodeEventArgs>( partitionSpaceInterface.ActivateSpaceNode );
            this.EventDeactivateSpaceNode += new EventHandler<DeactivateSpaceNodeEventArgs>( partitionSpaceInterface.DeactivateSpaceNode );

            // EventInitSpaceNode
            SpaceNodeEventArgs spaceNodeEventArgs = new SpaceNodeEventArgs( this );
            this.EventInitSpaceNode( this, spaceNodeEventArgs );

            // EventPartitionSpaceNode
            PartitionSpaceNodeEventArgs partitionSpaceNodeEventArgs = new PartitionSpaceNodeEventArgs( this, this.m_Owner );
            this.EventPartitionSpaceNode( this, partitionSpaceNodeEventArgs );

            if ( partitionSpaceNodeEventArgs.PartitionSpace != null )
            {
                m_SpaceNodes = partitionSpaceNodeEventArgs.PartitionSpace;

                for ( int iIndex0 = 0; iIndex0 < m_SpaceNodes.GetLength( 0 ); iIndex0++ )
                {
                    for ( int iIndex1 = 0; iIndex1 < m_SpaceNodes.GetLength( 1 ); iIndex1++ )
                    {
                        for ( int iIndex2 = 0; iIndex2 < m_SpaceNodes.GetLength( 2 ); iIndex2++ )
                        {
                            if ( m_SpaceNodes[iIndex0, iIndex1, iIndex2] != null )
                            {
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].RankIndex = new RankIndex( iIndex0, iIndex1, iIndex2 );
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].Parent = this;
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].Owner = this.Owner;
                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].m_LayerIndex = this.m_LayerIndex + 1;

                                m_SpaceNodes[iIndex0, iIndex1, iIndex2].ProcessPartitionSpace( partitionSpaceInterface );
                            }
                        }
                    }
                }

                m_IsLeaf = false;
            }
        }