Exemple #1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 21DEC2008  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Creates an rtree from an already initialized page file, probably stored
         * into persistent storage.
         */
        public RTree(PageFile file)
        {
            if (file.Tree != null)
            {
                throw new ArgumentException
                          ("PageFile already in use by another rtree instance.");
            }

            if (file.TreeType == -1)
            {
                throw new ArgumentException
                          ("PageFile is empty. Use some other RTree constructor.");
            }

            file.Tree = this;
            _file     = file;
        }
Exemple #2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 21DEC2008  James Shen                 	          Initial Creation
        ////////////////////////////////////////////////////////////////////////////
        /**
         * Creates an rtree from an already initialized page file, probably stored
         * into persistent storage.
         */
        public RTree(PageFile file)
        {
            if (file.Tree != null)
            {
                throw new ArgumentException
                        ("PageFile already in use by another rtree instance.");
            }

            if (file.TreeType == -1)
            {
                throw new ArgumentException
                        ("PageFile is empty. Use some other RTree constructor.");
            }

            file.Tree = this;
            _file = file;
        }