ogrfeaturestyle.cpp

来自「在linux环境下」· C++ 代码 · 共 1,732 行 · 第 1/5 页

CPP
1,732
字号
/* ======================================================================== *//*                OGRStylePen                                               *//*       Specific parameter (Set/Get) for the StylePen                      *//* ======================================================================== *//****************************************************************************//*                      OGRStylePen::OGRStylePen()                          *//*                                                                          *//****************************************************************************/OGRStylePen::OGRStylePen() : OGRStyleTool(OGRSTCPen){    m_pasStyleValue = (OGRStyleValue *)CPLCalloc(OGRSTPenLast,                                                  sizeof(OGRStyleValue));}/****************************************************************************//*                      OGRStylePen::~OGRStylePen()                         *//*                                                                          *//****************************************************************************/OGRStylePen::~OGRStylePen(){    for (int i = 0; i < OGRSTPenLast; i++)    {        if (m_pasStyleValue[i].pszValue != NULL)        {            CPLFree(m_pasStyleValue[i].pszValue);            m_pasStyleValue[i].pszValue = NULL;        }    }    CPLFree(m_pasStyleValue);}/************************************************************************//*                         OGRStylePen::Parse()                         *//************************************************************************/GBool OGRStylePen::Parse(){     return OGRStyleTool::Parse(asStylePen,m_pasStyleValue,(int)OGRSTPenLast);}/************************************************************************//*                            GetParamStr()                             *//************************************************************************/const char *OGRStylePen::GetParamStr(OGRSTPenParam eParam, GBool &bValueIsNull){       return OGRStyleTool::GetParamStr(asStylePen[eParam],                                     m_pasStyleValue[eParam],                                     bValueIsNull);}/************************************************************************//*                            GetParamNum()                             *//************************************************************************/int OGRStylePen::GetParamNum(OGRSTPenParam eParam,GBool &bValueIsNull){      return OGRStyleTool::GetParamNum(asStylePen[eParam],                                     m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            GetParamDbl()                             *//************************************************************************/double OGRStylePen::GetParamDbl(OGRSTPenParam eParam,GBool &bValueIsNull){      return OGRStyleTool::GetParamDbl(asStylePen[eParam],                                     m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            SetParamStr()                             *//************************************************************************/void OGRStylePen::SetParamStr(OGRSTPenParam eParam, const char *pszParamString){       OGRStyleTool::SetParamStr(asStylePen[eParam],m_pasStyleValue[eParam],                              pszParamString);}/************************************************************************//*                            SetParamNum()                             *//************************************************************************/void OGRStylePen::SetParamNum(OGRSTPenParam eParam, int nParam){      OGRStyleTool::SetParamNum(asStylePen[eParam],                              m_pasStyleValue[eParam],nParam);}    /************************************************************************//*                            SetParamDbl()                             *//************************************************************************/void OGRStylePen::SetParamDbl(OGRSTPenParam eParam, double dfParam){       OGRStyleTool::SetParamDbl(asStylePen[eParam],                              m_pasStyleValue[eParam],dfParam);}/************************************************************************//*                           GetStyleString()                           *//************************************************************************/const char *OGRStylePen::GetStyleString(){       return OGRStyleTool::GetStyleString(asStylePen,m_pasStyleValue,                                        (int)OGRSTPenLast);}/****************************************************************************//*                      OGRStyleBrush::OGRStyleBrush()                      *//*                                                                          *//****************************************************************************/OGRStyleBrush::OGRStyleBrush() : OGRStyleTool(OGRSTCBrush){    m_pasStyleValue = (OGRStyleValue *)CPLCalloc(OGRSTBrushLast,                                                  sizeof(OGRStyleValue));}/****************************************************************************//*                      OGRStyleBrush::~OGRStyleBrush()                     *//*                                                                          *//****************************************************************************/OGRStyleBrush::~OGRStyleBrush() {    for (int i = 0; i < OGRSTBrushLast; i++)    {        if (m_pasStyleValue[i].pszValue != NULL)        {            CPLFree(m_pasStyleValue[i].pszValue);            m_pasStyleValue[i].pszValue = NULL;        }    }    CPLFree(m_pasStyleValue);}/************************************************************************//*                               Parse()                                *//************************************************************************/GBool OGRStyleBrush::Parse(){     return OGRStyleTool::Parse(asStyleBrush,m_pasStyleValue,                               (int)OGRSTBrushLast);}/************************************************************************//*                            GetParamStr()                             *//************************************************************************/const char *OGRStyleBrush::GetParamStr(OGRSTBrushParam eParam, GBool &bValueIsNull){      return OGRStyleTool::GetParamStr(asStyleBrush[eParam],                                     m_pasStyleValue[eParam],                                     bValueIsNull);}/************************************************************************//*                            GetParamNum()                             *//************************************************************************/int OGRStyleBrush::GetParamNum(OGRSTBrushParam eParam,GBool &bValueIsNull){      return OGRStyleTool::GetParamNum(asStyleBrush[eParam],                                     m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            GetParamDbl()                             *//************************************************************************/double OGRStyleBrush::GetParamDbl(OGRSTBrushParam eParam,GBool &bValueIsNull){      return OGRStyleTool::GetParamDbl(asStyleBrush[eParam],                                     m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            SetParamStr()                             *//************************************************************************/void OGRStyleBrush::SetParamStr(OGRSTBrushParam eParam, const char *pszParamString){       OGRStyleTool::SetParamStr(asStyleBrush[eParam],m_pasStyleValue[eParam],                              pszParamString);}/************************************************************************//*                            SetParamNum()                             *//************************************************************************/void OGRStyleBrush::SetParamNum(OGRSTBrushParam eParam, int nParam){      OGRStyleTool::SetParamNum(asStyleBrush[eParam],                              m_pasStyleValue[eParam],nParam);}    /************************************************************************//*                            SetParamDbl()                             *//************************************************************************/void OGRStyleBrush::SetParamDbl(OGRSTBrushParam eParam, double dfParam){       OGRStyleTool::SetParamDbl(asStyleBrush[eParam],                              m_pasStyleValue[eParam],dfParam);}/************************************************************************//*                           GetStyleString()                           *//************************************************************************/const char *OGRStyleBrush::GetStyleString(){       return OGRStyleTool::GetStyleString(asStyleBrush,m_pasStyleValue,                                        (int)OGRSTBrushLast);}/****************************************************************************//*                      OGRStyleSymbol::OGRStyleSymbol()                    *//****************************************************************************/OGRStyleSymbol::OGRStyleSymbol() : OGRStyleTool(OGRSTCSymbol){    m_pasStyleValue = (OGRStyleValue *)CPLCalloc(OGRSTSymbolLast,                                                  sizeof(OGRStyleValue));}/****************************************************************************//*                      OGRStyleSymbol::~OGRStyleSymbol()                     *//*                                                                          *//****************************************************************************/OGRStyleSymbol::~OGRStyleSymbol(){    for (int i = 0; i < OGRSTSymbolLast; i++)    {        if (m_pasStyleValue[i].pszValue != NULL)        {            CPLFree(m_pasStyleValue[i].pszValue);            m_pasStyleValue[i].pszValue = NULL;        }    }    CPLFree(m_pasStyleValue);}/************************************************************************//*                               Parse()                                *//************************************************************************/GBool OGRStyleSymbol::Parse(){     return OGRStyleTool::Parse(asStyleSymbol,m_pasStyleValue,                               (int)OGRSTSymbolLast);}/************************************************************************//*                            GetParamStr()                             *//************************************************************************/const char *OGRStyleSymbol::GetParamStr(OGRSTSymbolParam eParam, GBool &bValueIsNull){   return OGRStyleTool::GetParamStr(asStyleSymbol[eParam],                                     m_pasStyleValue[eParam],                                     bValueIsNull);}/************************************************************************//*                            GetParamNum()                             *//************************************************************************/int OGRStyleSymbol::GetParamNum(OGRSTSymbolParam eParam,GBool &bValueIsNull){  return OGRStyleTool::GetParamNum(asStyleSymbol[eParam],                                    m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            GetParamDbl()                             *//************************************************************************/double OGRStyleSymbol::GetParamDbl(OGRSTSymbolParam eParam,GBool &bValueIsNull){  return OGRStyleTool::GetParamDbl(asStyleSymbol[eParam],                                    m_pasStyleValue[eParam],bValueIsNull);}/************************************************************************//*                            SetParamStr()                             *//************************************************************************/void OGRStyleSymbol::SetParamStr(OGRSTSymbolParam eParam, const char *pszParamString){   OGRStyleTool::SetParamStr(asStyleSymbol[eParam],m_pasStyleValue[eParam],                              pszParamString);}/************************************************************************//*                            SetParamNum()                             *//************************************************************************/void OGRStyleSymbol::SetParamNum(OGRSTSymbolParam eParam, int nParam){  OGRStyleTool::SetParamNum(asStyleSymbol[eParam],                             m_pasStyleValue[eParam],nParam);}/************************************************************************//*                            SetParamDbl()                             *//************************************************************************/void OGRStyleSymbol::SetParamDbl(OGRSTSymbolParam eParam, double dfParam)        {   OGRStyleTool::SetParamDbl(asStyleSymbol[eParam],                                      m_pasStyleValue[eParam],dfParam);        }/************************************************************************//*                           GetStyleString()                           *//************************************************************************/const char *OGRStyleSymbol::GetStyleString(){       return OGRStyleTool::GetStyleString(asStyleSymbol,m_pasStyleValue,                                        (int)OGRSTSymbolLast);}/****************************************************************************//*                      OGRStyleLabel::OGRStyleLabel()                      *//*                                                                          *//****************************************************************************/OGRStyleLabel::OGRStyleLabel() : OGRStyleTool(OGRSTCLabel){    m_pasStyleValue = (OGRStyleValue *)CPLCalloc(OGRSTLabelLast,                                                  sizeof(OGRStyleValue));}/****************************************************************************//*                      OGRStyleLabel::~OGRStyleLabel()                     *//*                                                                          *//****************************************************************************/OGRStyleLabel::~OGRStyleLabel(){    for (int i = 0; i < OGRSTLabelLast; i++)    {        if (m_pasStyleValue[i].pszValue != NULL)        {            CPLFree(m_pasStyleValue[i].pszValue);            m_pasStyleValue[i].pszValue = NULL;        }    }    CPLFree(m_pasStyleValue);}/************************************************************************//*                               Parse()                                *//************************************************************************/GBool OGRStyleLabel::Parse(){ return OGRStyleTool::Parse(asStyleLabel,m_pasStyleValue,                             (int)OGRSTLabelLast);}/************************************************************************//*                            GetParamStr()                             *//************************************************************************/const char *OGRStyleLabel::GetParamStr(OGRSTLabelParam eParam, GBool &bValueIsNul

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?