亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ogr_srsnode.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
 * $Id: ogr_srsnode.cpp 10646 2007-01-18 02:38:10Z warmerdam $
 *
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  The OGR_SRSNode class.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 1999,  Les Technologies SoftMap Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 ****************************************************************************/

#include "ogr_spatialref.h"
#include "ogr_p.h"

CPL_CVSID("$Id: ogr_srsnode.cpp 10646 2007-01-18 02:38:10Z warmerdam $");

/************************************************************************/
/*                            OGR_SRSNode()                             */
/************************************************************************/

/**
 * Constructor.
 *
 * @param pszValueIn this optional parameter can be used to initialize
 * the value of the node upon creation.  If omitted the node will be created
 * with a value of "".  Newly created OGR_SRSNodes have no children.
 */

OGR_SRSNode::OGR_SRSNode( const char * pszValueIn )

{
    pszValue = CPLStrdup( pszValueIn );

    nChildren = 0;
    papoChildNodes = NULL;

    poParent = NULL;
}

/************************************************************************/
/*                            ~OGR_SRSNode()                            */
/************************************************************************/

OGR_SRSNode::~OGR_SRSNode()

{
    CPLFree( pszValue );

    ClearChildren();
}

/************************************************************************/
/*                           ClearChildren()                            */
/************************************************************************/

void OGR_SRSNode::ClearChildren()

{
    for( int i = 0; i < nChildren; i++ )
    {
        delete papoChildNodes[i];
    }

    CPLFree( papoChildNodes );

    papoChildNodes = NULL;
    nChildren = 0;
}

/************************************************************************/
/*                           GetChildCount()                            */
/************************************************************************/

/**
 * \fn int OGR_SRSNode::GetChildCount() const;
 *
 * Get number of children nodes.
 *
 * @return 0 for leaf nodes, or the number of children nodes. 
 */

/************************************************************************/
/*                              GetChild()                              */
/************************************************************************/

/**
 * Fetch requested child.
 *
 * @param iChild the index of the child to fetch, from 0 to
 * GetChildCount() - 1.
 *
 * @return a pointer to the child OGR_SRSNode, or NULL if there is no such
 * child. 
 */

OGR_SRSNode *OGR_SRSNode::GetChild( int iChild )

{
    if( iChild < 0 || iChild >= nChildren )
        return NULL;
    else
        return papoChildNodes[iChild];
}

const OGR_SRSNode *OGR_SRSNode::GetChild( int iChild ) const

{
    if( iChild < 0 || iChild >= nChildren )
        return NULL;
    else
        return papoChildNodes[iChild];
}

/************************************************************************/
/*                              GetNode()                               */
/************************************************************************/

/**
 * Find named node in tree.
 *
 * This method does a pre-order traversal of the node tree searching for
 * a node with this exact value (case insensitive), and returns it.  Leaf
 * nodes are not considered, under the assumption that they are just
 * attribute value nodes.
 *
 * If a node appears more than once in the tree (such as UNIT for instance),
 * the first encountered will be returned.  Use GetNode() on a subtree to be
 * more specific. 
 *
 * @param pszName the name of the node to search for.
 *
 * @return a pointer to the node found, or NULL if none.
 */

OGR_SRSNode *OGR_SRSNode::GetNode( const char * pszName )

{
    int  i;

    if( this == NULL )
        return NULL;
    
    if( nChildren > 0 && EQUAL(pszName,pszValue) )
        return this;

/* -------------------------------------------------------------------- */
/*      First we check the immediate children so we will get an         */
/*      immediate child in preference to a subchild.                    */
/* -------------------------------------------------------------------- */
    for( i = 0; i < nChildren; i++ )
    {
        if( EQUAL(papoChildNodes[i]->pszValue,pszName) 
            && papoChildNodes[i]->nChildren > 0 )
            return papoChildNodes[i];
    }

/* -------------------------------------------------------------------- */
/*      Then get each child to check their children.                    */
/* -------------------------------------------------------------------- */
    for( i = 0; i < nChildren; i++ )
    {
        OGR_SRSNode *poNode;

        poNode = papoChildNodes[i]->GetNode( pszName );
        if( poNode != NULL )
            return poNode;
    }

    return NULL;
}

const OGR_SRSNode *OGR_SRSNode::GetNode( const char * pszName ) const

{
    return ((OGR_SRSNode *) this)->GetNode( pszName );
}

/************************************************************************/
/*                              AddChild()                              */
/************************************************************************/

/**
 * Add passed node as a child of target node.
 *
 * Note that ownership of the passed node is assumed by the node on which
 * the method is invoked ... use the Clone() method if the original is to
 * be preserved.  New children are always added at the end of the list.
 *
 * @param poNew the node to add as a child.
 */

void OGR_SRSNode::AddChild( OGR_SRSNode * poNew )

{
    InsertChild( poNew, nChildren );
}

/************************************************************************/
/*                            InsertChild()                             */
/************************************************************************/

/**
 * Insert the passed node as a child of target node, at the indicated
 * position. 
 *
 * Note that ownership of the passed node is assumed by the node on which
 * the method is invoked ... use the Clone() method if the original is to
 * be preserved.  All existing children at location iChild and beyond are
 * push down one space to make space for the new child. 
 *
 * @param poNew the node to add as a child.
 * @param iChild position to insert, use 0 to insert at the beginning. 
 */

void OGR_SRSNode::InsertChild( OGR_SRSNode * poNew, int iChild )

{
    if( iChild > nChildren )
        iChild = nChildren;

    nChildren++;
    papoChildNodes = (OGR_SRSNode **)
        CPLRealloc( papoChildNodes, sizeof(void*) * nChildren );

    memmove( papoChildNodes + iChild + 1, papoChildNodes + iChild,
             sizeof(void*) * (nChildren - iChild - 1) );
    
    papoChildNodes[iChild] = poNew;
    poNew->poParent = this;
}

/************************************************************************/
/*                            DestroyChild()                            */
/************************************************************************/

/**
 * Remove a child node, and it's subtree.
 *
 * Note that removing a child node will result in children after it
 * being renumbered down one.
 *
 * @param iChild the index of the child.
 */

void OGR_SRSNode::DestroyChild( int iChild )

{
    if( iChild < 0 || iChild >= nChildren )
        return;

    delete papoChildNodes[iChild];
    while( iChild < nChildren-1 )
    {
        papoChildNodes[iChild] = papoChildNodes[iChild+1];
        iChild++;
    }

    nChildren--;
}

/************************************************************************/
/*                             FindChild()                              */
/************************************************************************/

/**
 * Find the index of the child matching the given string.
 *
 * Note that the node value must match pszValue with the exception of
 * case.  The comparison is case insensitive.
 *
 * @param pszValue the node value being searched for.
 *
 * @return the child index, or -1 on failure. 
 */

int OGR_SRSNode::FindChild( const char * pszValue ) const

{
    for( int i = 0; i < nChildren; i++ )
    {
        if( EQUAL(papoChildNodes[i]->pszValue,pszValue) )
            return i;
    }

    return -1;
}

/************************************************************************/
/*                              GetValue()                              */
/************************************************************************/

/**
 * \fn const char *OGR_SRSNode::GetValue() const;
 *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费高清在线观看| 色综合一个色综合| 亚洲精品视频在线| 日韩一级片在线播放| 91片黄在线观看| 激情伊人五月天久久综合| 亚洲欧美一区二区久久| 久久久天堂av| 4438亚洲最大| 97精品超碰一区二区三区| 精品一区二区三区在线观看| 亚洲成av人片| 国产精品亚洲一区二区三区在线 | 日韩精品在线看片z| 91精品1区2区| 成人黄动漫网站免费app| 麻豆国产精品官网| 亚洲成人7777| 一二三四社区欧美黄| 国产精品国产三级国产三级人妇| 精品久久久久久久一区二区蜜臀| 欧美色图激情小说| 91麻豆高清视频| www.欧美日韩国产在线| 国产一区二区免费看| 狠狠色丁香婷综合久久| 免费精品99久久国产综合精品| 亚洲精品中文字幕乱码三区| 中文字幕日本乱码精品影院| 国产精品全国免费观看高清| 久久久国际精品| 久久久久成人黄色影片| 久久综合国产精品| 久久亚洲私人国产精品va媚药| 日韩亚洲欧美成人一区| 欧美一区二区视频在线观看| 欧美绝品在线观看成人午夜影视| 在线视频一区二区三| 91麻豆蜜桃一区二区三区| 不卡的电影网站| 99视频精品全部免费在线| www.日韩精品| 91视频.com| 欧美性受xxxx黑人xyx| 欧美无砖专区一中文字| 911精品国产一区二区在线| 欧美日韩精品一区二区三区蜜桃| 91.麻豆视频| 欧美电影免费观看高清完整版| 欧美大片拔萝卜| 久久久久久久久久久久久女国产乱| 精品国产成人在线影院| 久久免费视频一区| 国产亚洲欧美日韩在线一区| 国产精品美女视频| 亚洲精品成a人| 午夜视频在线观看一区二区三区 | 床上的激情91.| 91免费在线视频观看| 在线国产电影不卡| 91麻豆精品国产91久久久资源速度 | 久久久久久免费毛片精品| 久久精品一区八戒影视| 一区免费观看视频| 午夜精品久久一牛影视| 国产做a爰片久久毛片| av在线不卡观看免费观看| 欧美探花视频资源| 欧美va在线播放| 国产精品超碰97尤物18| 亚洲大片精品永久免费| 精品一区二区三区在线视频| 成人av电影在线网| 欧美午夜免费电影| 欧美mv日韩mv国产网站app| 国产精品久线观看视频| 五月天久久比比资源色| 国产毛片精品一区| 在线免费精品视频| 精品乱人伦小说| 一区二区三区国产精品| 精品一区二区三区久久| av在线不卡电影| 日韩欧美国产精品| 亚洲青青青在线视频| 奇米色777欧美一区二区| 成人黄色电影在线| 91.成人天堂一区| 国产精品免费av| 日韩成人精品在线| 91免费视频观看| 精品国产乱码久久久久久免费| 国产精品传媒在线| 精品综合久久久久久8888| 色屁屁一区二区| 久久久亚洲欧洲日产国码αv| 亚洲国产sm捆绑调教视频 | 韩国毛片一区二区三区| 欧美视频一区二区三区| 国产日韩欧美综合在线| 蜜臀久久99精品久久久画质超高清 | 成人一级片网址| 91精品国产色综合久久不卡电影| 国产精品天美传媒| 久久99精品久久只有精品| 在线免费观看一区| 一区精品在线播放| 国产精品99久久久久久似苏梦涵| 欧美日本一区二区三区| 一区二区三区视频在线看| 国产aⅴ综合色| 精品久久人人做人人爰| 午夜日韩在线电影| 91福利在线观看| 国产精品久久久久久久久免费丝袜 | 国产精品福利一区二区三区| 国产美女久久久久| 精品久久久三级丝袜| 麻豆成人在线观看| 欧美一区二区三区免费大片| 亚洲一区二区三区国产| 91视频在线看| 国产精品国产三级国产aⅴ入口| 韩日精品视频一区| 精品精品国产高清a毛片牛牛| 日本伊人精品一区二区三区观看方式| 色婷婷av一区二区三区gif| 亚洲天堂免费在线观看视频| 成人污污视频在线观看| 国产日韩综合av| 国产精品一区2区| 日本一区二区视频在线| 国产成人啪免费观看软件| 精品国产伦一区二区三区观看体验| 免费人成精品欧美精品 | 在线播放91灌醉迷j高跟美女| 亚洲综合偷拍欧美一区色| 91国产福利在线| 亚洲一区av在线| 欧美日韩免费视频| 午夜欧美视频在线观看| 91精品国产综合久久精品| 视频一区在线播放| 欧美sm美女调教| 国产成人亚洲精品青草天美 | 日本特黄久久久高潮| 在线播放中文字幕一区| 久久狠狠亚洲综合| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 久久99国产精品久久| 精品久久久久久久久久久久久久久久久 | 精品福利av导航| 国产精品一区专区| 国产精品免费久久| 欧美在线短视频| 男人的j进女人的j一区| 精品国产91亚洲一区二区三区婷婷| 极品少妇xxxx精品少妇| 国产亚洲精品aa午夜观看| 成人av资源网站| 亚洲国产成人av网| 精品免费国产二区三区| 成人黄色小视频| 亚洲一线二线三线久久久| 欧美日韩免费观看一区三区| 久久成人av少妇免费| 国产精品久久久久久久久免费相片 | 26uuu精品一区二区在线观看| 91麻豆精品国产91久久久使用方法| 国内欧美视频一区二区| 成人免费一区二区三区在线观看| 欧美视频一区二区三区在线观看| 乱中年女人伦av一区二区| 国产精品国产自产拍在线| 91国产免费观看| 国产一区二区三区在线观看免费| 亚洲视频在线一区二区| 欧美一区二区三区男人的天堂| 成人性色生活片| 日本一道高清亚洲日美韩| 欧美国产1区2区| 欧美精品精品一区| 国产69精品久久久久毛片 | 麻豆免费精品视频| 中文字幕亚洲精品在线观看| 欧美一级爆毛片| 99综合影院在线| 免费成人av资源网| 亚洲欧美一区二区三区极速播放 | 波多野结衣亚洲| 奇米精品一区二区三区在线观看一| 国产欧美日韩久久| 日韩一二三区不卡| 色噜噜夜夜夜综合网| 国产一区二区三区电影在线观看| 亚洲国产中文字幕在线视频综合| 国产日韩精品一区二区三区| 91精品欧美福利在线观看 | 国产日韩欧美电影| 91精品国产入口|