ogr_featurestyle.h

00001 /******************************************************************************
00002  * $Id: ogr_featurestyle.h,v 1.8 2004/12/02 18:24:12 fwarmerdam Exp $
00003  *
00004  * Project:  OpenGIS Simple Features Reference Implementation
00005  * Purpose:  Define of Feature Representation
00006  * Author:   Stephane Villeneuve, stephane.v@videtron.ca
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 1999, Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ******************************************************************************
00029  *
00030  * $Log: ogr_featurestyle.h,v $
00031  * Revision 1.8  2004/12/02 18:24:12  fwarmerdam
00032  * added support for fontname on symbol, per bug 684
00033  *
00034  * Revision 1.7  2004/05/11 00:39:43  warmerda
00035  * make asStyle*[] using methods non-inline
00036  *
00037  * Revision 1.6  2002/06/25 14:47:31  warmerda
00038  * CPL_DLL export style api
00039  *
00040  * Revision 1.5  2001/03/17 01:43:53  warmerda
00041  * Don't leave in trailing comma in enum (as submitted by Dale).
00042  *
00043  * Revision 1.4  2001/01/19 21:10:47  warmerda
00044  * replaced tabs
00045  *
00046  * Revision 1.3  2000/12/07 03:42:37  danmo
00047  * REmoved stray comma in OGRSType enum defn
00048  *
00049  * Revision 1.2  2000/08/28 20:26:18  svillene
00050  * Add missing virtual ~()
00051  *
00052  * Revision 1.1  2000/08/18 21:26:01  svillene
00053  * OGR Representation
00054  *
00055  *
00056  */
00057 
00058 #ifndef OGR_FEATURESTYLE_INCLUDE
00059 #define OGR_FEATURESTYLE_INCLUDE
00060 
00061 #include "cpl_conv.h"
00062 
00063 class OGRFeature;
00064 
00065 typedef enum ogr_style_tool_class_id
00066 {
00067     OGRSTCNone,
00068     OGRSTCPen,
00069     OGRSTCBrush,
00070     OGRSTCSymbol,
00071     OGRSTCLabel
00072 } OGRSTClassId;
00073 
00074 typedef enum ogr_style_tool_units_id
00075 {
00076     OGRSTUGround,
00077     OGRSTUPixel,
00078     OGRSTUPoints,
00079     OGRSTUMM,
00080     OGRSTUCM,
00081     OGRSTUInches
00082 } OGRSTUnitId;
00083 
00084 typedef enum ogr_style_tool_param_pen_id
00085 {  
00086     OGRSTPenColor = 0,                   
00087     OGRSTPenWidth,                   
00088     OGRSTPenPattern,
00089     OGRSTPenId,
00090     OGRSTPenPerOffset,
00091     OGRSTPenCap,
00092     OGRSTPenJoin,
00093     OGRSTPenPriority,
00094     OGRSTPenLast
00095               
00096 } OGRSTPenParam;
00097 
00098 typedef enum ogr_style_tool_param_brush_id
00099 {  
00100     OGRSTBrushFColor = 0,                   
00101     OGRSTBrushBColor,                   
00102     OGRSTBrushId,
00103     OGRSTBrushAngle,                   
00104     OGRSTBrushSize,
00105     OGRSTBrushDx,
00106     OGRSTBrushDy,
00107     OGRSTBrushPriority,
00108     OGRSTBrushLast
00109               
00110 } OGRSTBrushParam;
00111 
00112 
00113 
00114 typedef enum ogr_style_tool_param_symbol_id
00115 {  
00116     OGRSTSymbolId = 0,
00117     OGRSTSymbolAngle,
00118     OGRSTSymbolColor,
00119     OGRSTSymbolSize,
00120     OGRSTSymbolDx,
00121     OGRSTSymbolDy,
00122     OGRSTSymbolStep,
00123     OGRSTSymbolPerp,
00124     OGRSTSymbolOffset,
00125     OGRSTSymbolPriority,
00126     OGRSTSymbolFontName,
00127     OGRSTSymbolLast
00128               
00129 } OGRSTSymbolParam;
00130 
00131 typedef enum ogr_style_tool_param_label_id
00132 {  
00133     OGRSTLabelFontName = 0,
00134     OGRSTLabelSize,
00135     OGRSTLabelTextString,
00136     OGRSTLabelAngle,
00137     OGRSTLabelFColor,
00138     OGRSTLabelBColor,
00139     OGRSTLabelPlacement,
00140     OGRSTLabelAnchor,
00141     OGRSTLabelDx,
00142     OGRSTLabelDy,
00143     OGRSTLabelPerp,
00144     OGRSTLabelBold,
00145     OGRSTLabelItalic,
00146     OGRSTLabelUnderline,
00147     OGRSTLabelPriority,
00148     OGRSTLabelLast
00149               
00150 } OGRSTLabelParam;
00151 
00152 typedef enum ogr_style_type
00153 {
00154     OGRSTypeString,
00155     OGRSTypeDouble,
00156     OGRSTypeInteger
00157 }  OGRSType;
00158 
00159 typedef struct ogr_style_param
00160 {
00161     int              eParam;
00162     char            *pszToken;
00163     GBool            bGeoref;
00164     OGRSType         eType;
00165 }OGRStyleParamId;
00166 
00167 
00168 typedef struct ogr_style_value
00169 {
00170     char            *pszValue;
00171     double           dfValue;
00172     int              nValue;
00173     GBool            bValid;
00174     OGRSTUnitId      eUnit;
00175 }OGRStyleValue;
00176 
00177 
00178 //Everytime a pszStyleString gived in parameter is NULL, 
00179 //    the StyleString defined in the Mgr will be use.
00180 
00181 class CPL_DLL OGRStyleTable
00182 {
00183 public:
00184     char **m_papszStyleTable;
00185 
00186     OGRStyleTable();
00187     ~OGRStyleTable();
00188     GBool AddStyle(const char *pszName,const char *pszStyleString);
00189     GBool RemoveStyle(const char *pszName);
00190     GBool ModifyStyle(const char *pszName, const char *pszStyleString);
00191     
00192     GBool SaveStyleTable(const char *pszFilename);
00193     GBool LoadStyleTable(const char *pszFilename);
00194     const char *Find(const char *pszStyleString);
00195     GBool IsExist(const char *pszName);
00196     const char *GetStyleName(const char *pszName);
00197     void  Print(FILE *fpOut);
00198     void  Clear();
00199 };
00200 
00201 
00202 class OGRStyleTool;
00203 
00204 class CPL_DLL OGRStyleMgr
00205 {
00206 public:
00207     char *m_pszStyleString;
00208     OGRStyleTable *m_poDataSetStyleTable;
00209     
00210     OGRStyleMgr(OGRStyleTable *poDataSetStyleTable =NULL);
00211  
00212     ~OGRStyleMgr();
00213     GBool SetFeatureStyleString(OGRFeature *,const char *pszStyleString=NULL,
00214                                 GBool bNoMatching = FALSE);
00215     /*it will set in the gived feature the pszStyleString with 
00216             the style or will set the style name found in 
00217             dataset StyleTable (if bNoMatching == FALSE)*/
00218               
00219     const char *InitFromFeature(OGRFeature *);
00220     GBool InitStyleString(const char *pszStyleString = NULL);
00221     
00222     const char *GetStyleName(const char *pszStyleString= NULL);
00223     const char *GetStyleByName(const char *pszStyleName);
00224     
00225      GBool AddStyle(const char *pszStyleName, const char *pszStyleString=NULL);
00226     
00227     const char *GetStyleString(OGRFeature * = NULL);
00228  
00229     GBool AddPart(OGRStyleTool *);
00230     GBool AddPart(const char *);
00231 
00232     int GetPartCount(const char *pszStyleString = NULL);
00233     OGRStyleTool *GetPart(int hPartId, const char *pszStyleString = NULL);
00234     
00235     /*It could have a reference counting processus for the OGRStyleTable, if
00236       needed */
00237       
00238     OGRStyleTable *GetDataSetStyleTable(){return m_poDataSetStyleTable;}
00239     
00240     OGRStyleTool *CreateStyleToolFromStyleString(const char *pszStyleString);
00241 
00242 };
00243 
00244 class CPL_DLL OGRStyleTool
00245 {
00246 public:
00247     
00248     GBool m_bModified;
00249     GBool m_bParsed;
00250     double m_dfScale;
00251     OGRSTUnitId m_eUnit;
00252     OGRSTClassId m_eClassId;
00253     OGRStyleTool(){}
00254     OGRStyleTool(OGRSTClassId eClassId);
00255     virtual ~OGRStyleTool();
00256 
00257     GBool GetRGBFromString(const char *pszColor, int &nRed, int &nGreen, 
00258                            int &nBlue, int &nTransparence);
00259     int   GetSpecificId(const char *pszId, const char *pszWanted);
00260 
00261     GBool IsStyleModified() {return m_bModified;}
00262     void  StyleModified() {m_bModified = TRUE;}
00263 
00264     GBool IsStyleParsed() {return m_bParsed;}
00265     void  StyleParsed() {m_bParsed = TRUE;}
00266 
00267     char *m_pszStyleString;
00268     
00269     OGRSTClassId GetType();
00270 
00271     void SetInternalInputUnitFromParam(char *pszString);
00272     
00273     void SetUnit(OGRSTUnitId,double dfScale = 1.0); //the dfScale will be
00274          //used if we are working with Ground Unit ( ground = paper * scale);
00275 
00276     OGRSTUnitId GetUnit(){return m_eUnit;}
00277     
00278     /* It's existe two way to set the parameters in the Style, with generic
00279 methodes (using a defined enumeration) or with the reel method specific
00280 for Each style tools.*/
00281     
00282     virtual const char *GetStyleString() = 0;
00283     void SetStyleString(const char *pszStyleString);
00284     const char *GetStyleString(OGRStyleParamId *pasStyleParam ,
00285                             OGRStyleValue *pasStyleValue, int nSize);
00286 
00287     const char *GetParamStr(OGRStyleParamId &sStyleParam ,
00288                             OGRStyleValue &sStyleValue,
00289                             GBool &bValueIsNull);
00290 
00291     int GetParamNum(OGRStyleParamId &sStyleParam ,
00292                        OGRStyleValue &sStyleValue,
00293                        GBool &bValueIsNull);
00294 
00295     double GetParamDbl(OGRStyleParamId &sStyleParam ,
00296                        OGRStyleValue &sStyleValue,
00297                        GBool &bValueIsNull);
00298     
00299     void SetParamStr(OGRStyleParamId &sStyleParam ,
00300                      OGRStyleValue &sStyleValue,
00301                      const char *pszParamString);
00302     
00303     void SetParamNum(OGRStyleParamId &sStyleParam ,
00304                      OGRStyleValue &sStyleValue,
00305                      int nParam);
00306 
00307     void SetParamDbl(OGRStyleParamId &sStyleParam ,
00308                      OGRStyleValue &sStyleValue,
00309                      double dfParam);
00310 
00311     virtual GBool Parse() = 0;
00312     GBool Parse(OGRStyleParamId* pasStyle,
00313                 OGRStyleValue* pasValue,
00314                 int nCount);
00315 
00316     double ComputeWithUnit(double, OGRSTUnitId);
00317     int    ComputeWithUnit(int , OGRSTUnitId);
00318 
00319 };
00320 
00321 extern OGRStyleParamId CPL_DLL asStylePen[];
00322 
00323 class CPL_DLL OGRStylePen : public OGRStyleTool
00324 {
00325 public:
00326 
00327     OGRStyleValue    *m_pasStyleValue;
00328 
00329     OGRStylePen();
00330     virtual ~OGRStylePen(); 
00331 
00332     /**********************************************************************/
00333     /* Explicite fct for all parameters defined in the Drawing tools  Pen */
00334     /**********************************************************************/
00335      
00336     const char *Color(GBool &bDefault){return GetParamStr(OGRSTPenColor,bDefault);}
00337     void SetColor(const char *pszColor){SetParamStr(OGRSTPenColor,pszColor);}
00338     double Width(GBool &bDefault){return GetParamDbl(OGRSTPenWidth,bDefault);}
00339     void SetWidth(double dfWidth){SetParamDbl(OGRSTPenWidth,dfWidth);}
00340     const char *Pattern(GBool &bDefault){return (char *)GetParamStr(OGRSTPenPattern,bDefault);}
00341     void SetPattern(const char *pszPattern){SetParamStr(OGRSTPenPattern,pszPattern);}
00342     const char *Id(GBool &bDefault){return GetParamStr(OGRSTPenId,bDefault);}
00343     void SetId(const char *pszId){SetParamStr(OGRSTPenId,pszId);}
00344     double PerpendicularOffset(GBool &bDefault){return GetParamDbl(OGRSTPenPerOffset,bDefault);}
00345     void SetPerpendicularOffset(double dfPerp){SetParamDbl(OGRSTPenPerOffset,dfPerp);}
00346     const char *Cap(GBool &bDefault){return GetParamStr(OGRSTPenCap,bDefault);}
00347     void SetCap(const char *pszCap){SetParamStr(OGRSTPenCap,pszCap);}
00348     const char *Join(GBool &bDefault){return GetParamStr(OGRSTPenJoin,bDefault);}
00349     void SetJoin(const char *pszJoin){SetParamStr(OGRSTPenJoin,pszJoin);}
00350     int  Priority(GBool &bDefault){return GetParamNum(OGRSTPenPriority,bDefault);}
00351     void SetPriority(int nPriority){SetParamNum(OGRSTPenPriority,nPriority);}
00352     
00353     /*****************************************************************/
00354     
00355     GBool Parse();
00356     const char *GetParamStr(OGRSTPenParam eParam, GBool &bValueIsNull);
00357     int GetParamNum(OGRSTPenParam eParam,GBool &bValueIsNull);
00358     double GetParamDbl(OGRSTPenParam eParam,GBool &bValueIsNull);
00359     void SetParamStr(OGRSTPenParam eParam, const char *pszParamString);
00360     void SetParamNum(OGRSTPenParam eParam, int nParam);
00361     void SetParamDbl(OGRSTPenParam eParam, double dfParam);
00362     const char *GetStyleString();
00363 };
00364 
00365 extern OGRStyleParamId CPL_DLL asStyleBrush[];
00366 
00367 class CPL_DLL OGRStyleBrush : public OGRStyleTool
00368 {
00369 public:
00370 
00371     OGRStyleValue    *m_pasStyleValue;
00372 
00373     OGRStyleBrush();
00374     virtual ~OGRStyleBrush();
00375 
00376     /*a Explicite fct for all parameters defined in the Drawing tools Brush */
00377 
00378     const char *ForeColor(GBool &bDefault){return GetParamStr(OGRSTBrushFColor,bDefault);}
00379     void SetForeColor(const char *pszColor){SetParamStr(OGRSTBrushFColor,pszColor);}
00380     const char *BackColor(GBool &bDefault){return GetParamStr(OGRSTBrushBColor,bDefault);}
00381     void SetBackColor(const char *pszColor){SetParamStr(OGRSTBrushBColor,pszColor);}
00382     const char *Id(GBool &bDefault){ return GetParamStr(OGRSTBrushId,bDefault);}
00383     void  SetId(const char *pszId){SetParamStr(OGRSTBrushId,pszId);}
00384     double Angle(GBool &bDefault){return GetParamDbl(OGRSTBrushAngle,bDefault);}
00385     void SetAngle(double dfAngle){SetParamDbl(OGRSTBrushAngle,dfAngle );}
00386     double Size(GBool &bDefault){return GetParamDbl(OGRSTBrushSize,bDefault);}
00387     void SetSize(double dfSize){SetParamDbl(OGRSTBrushSize,dfSize  );}
00388     double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTBrushDx,bDefault);}
00389     void SetSpacingX(double dfX){SetParamDbl(OGRSTBrushDx,dfX );}
00390     double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTBrushDy,bDefault);}
00391     void SetSpacingY(double dfY){SetParamDbl(OGRSTBrushDy,dfY  );}
00392     int  Priority(GBool &bDefault){ return GetParamNum(OGRSTBrushPriority,bDefault);}
00393     void SetPriority(int nPriority){ SetParamNum(OGRSTBrushPriority,nPriority);}
00394     
00395 
00396     /*****************************************************************/
00397     
00398      GBool Parse();
00399      const char *GetParamStr(OGRSTBrushParam eParam, GBool &bValueIsNull);
00400      int GetParamNum(OGRSTBrushParam eParam,GBool &bValueIsNull);
00401      double GetParamDbl(OGRSTBrushParam eParam,GBool &bValueIsNull);
00402      void SetParamStr(OGRSTBrushParam eParam, const char *pszParamString);
00403      void SetParamNum(OGRSTBrushParam eParam, int nParam);
00404      void SetParamDbl(OGRSTBrushParam eParam, double dfParam);
00405      const char *GetStyleString();
00406 };
00407 
00408 extern OGRStyleParamId CPL_DLL asStyleSymbol[];
00409 
00410 class CPL_DLL OGRStyleSymbol : public OGRStyleTool
00411 {
00412 public:
00413 
00414     OGRStyleValue    *m_pasStyleValue;
00415 
00416     OGRStyleSymbol();
00417     virtual ~OGRStyleSymbol();
00418 
00419     /*****************************************************************/
00420     /* Explicite fct for all parameters defined in the Drawing tools */
00421     /*****************************************************************/
00422     
00423     const char *Id(GBool &bDefault){return GetParamStr(OGRSTSymbolId,bDefault);}
00424     void  SetId(const char *pszId){ SetParamStr(OGRSTSymbolId,pszId);}
00425     double Angle(GBool &bDefault){ return GetParamDbl(OGRSTSymbolAngle,bDefault);}
00426     void SetAngle(double dfAngle){SetParamDbl(OGRSTSymbolAngle,dfAngle );}
00427     const char *Color(GBool &bDefault){return GetParamStr(OGRSTSymbolColor,bDefault);}
00428     void SetColor(const char *pszColor){SetParamStr(OGRSTSymbolColor,pszColor);}
00429     double Size(GBool &bDefault){  return GetParamDbl(OGRSTSymbolSize,bDefault);}
00430     void SetSize(double dfSize){  SetParamDbl(OGRSTSymbolSize,dfSize  );}
00431     double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTSymbolDx,bDefault);}
00432     void SetSpacingX(double dfX){SetParamDbl(OGRSTSymbolDx,dfX  );}
00433     double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTSymbolDy,bDefault);}
00434     void SetSpacingY(double dfY){SetParamDbl(OGRSTSymbolDy,dfY  );}
00435     double Step(GBool &bDefault){return GetParamDbl(OGRSTSymbolStep,bDefault);}
00436     void SetStep(double dfStep){SetParamDbl(OGRSTSymbolStep,dfStep  );}
00437     double Offset(GBool &bDefault){return GetParamDbl(OGRSTSymbolOffset,bDefault);}
00438     void SetOffset(double dfOffset){SetParamDbl(OGRSTSymbolOffset,dfOffset  );}
00439     double Perp(GBool &bDefault){return GetParamDbl(OGRSTSymbolPerp,bDefault);}
00440     void SetPerp(double dfPerp){SetParamDbl(OGRSTSymbolPerp,dfPerp  );}  
00441     int  Priority(GBool &bDefault){return GetParamNum(OGRSTSymbolPriority,bDefault);}
00442     void SetPriority(int nPriority){SetParamNum(OGRSTSymbolPriority,nPriority);}
00443     const char *FontName(GBool &bDefault)
00444         {return GetParamStr(OGRSTSymbolFontName,bDefault);}
00445     void SetFontName(const char *pszFontName)
00446         {SetParamStr(OGRSTSymbolFontName,pszFontName);}
00447 
00448     /*****************************************************************/
00449     
00450      GBool Parse();
00451      const char *GetParamStr(OGRSTSymbolParam eParam, GBool &bValueIsNull);
00452      int GetParamNum(OGRSTSymbolParam eParam,GBool &bValueIsNull);
00453      double GetParamDbl(OGRSTSymbolParam eParam,GBool &bValueIsNull);
00454      void SetParamStr(OGRSTSymbolParam eParam, const char *pszParamString);
00455      void SetParamNum(OGRSTSymbolParam eParam, int nParam);
00456      void SetParamDbl(OGRSTSymbolParam eParam, double dfParam);
00457      const char *GetStyleString();
00458 };
00459 
00460 extern OGRStyleParamId CPL_DLL asStyleLabel[];
00461 
00462 class CPL_DLL OGRStyleLabel : public OGRStyleTool
00463 {
00464 public:
00465 
00466     OGRStyleValue    *m_pasStyleValue;
00467 
00468     OGRStyleLabel();
00469     virtual ~OGRStyleLabel();
00470 
00471     /*****************************************************************/
00472     /* Explicite fct for all parameters defined in the Drawing tools */
00473     /*****************************************************************/
00474     
00475     const char *FontName(GBool &bDefault){return GetParamStr(OGRSTLabelFontName,bDefault);}
00476     void  SetFontName(const char *pszFontName){SetParamStr(OGRSTLabelFontName,pszFontName);}
00477     double Size(GBool &bDefault){return GetParamDbl(OGRSTLabelSize,bDefault);}
00478     void SetSize(double dfSize){SetParamDbl(OGRSTLabelSize,dfSize);}
00479     const char *TextString(GBool &bDefault){return GetParamStr(OGRSTLabelTextString,bDefault);}
00480     void SetTextString(const char *pszTextString){SetParamStr(OGRSTLabelTextString,pszTextString);}
00481     double Angle(GBool &bDefault){return GetParamDbl(OGRSTLabelAngle,bDefault);}
00482     void SetAngle(double dfAngle){SetParamDbl(OGRSTLabelAngle,dfAngle);}
00483     const char *ForeColor(GBool &bDefault){return GetParamStr(OGRSTLabelFColor,bDefault);}
00484     void SetForColor(const char *pszForColor){SetParamStr(OGRSTLabelFColor,pszForColor);}
00485     const char *BackColor(GBool &bDefault){return GetParamStr(OGRSTLabelBColor,bDefault);}
00486     void SetBackColor(const char *pszBackColor){SetParamStr(OGRSTLabelBColor,pszBackColor);}
00487     const char *Placement(GBool &bDefault){return GetParamStr(OGRSTLabelPlacement,bDefault);}
00488     void SetPlacement(const char *pszPlacement){SetParamStr(OGRSTLabelPlacement,pszPlacement);}
00489     int  Anchor(GBool &bDefault){return GetParamNum(OGRSTLabelAnchor,bDefault);}
00490     void SetAnchor(int nAnchor){SetParamNum(OGRSTLabelAnchor,nAnchor);}
00491     double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTLabelDx,bDefault);}
00492     void SetSpacingX(double dfX){SetParamDbl(OGRSTLabelDx,dfX);}
00493     double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTLabelDy,bDefault);}
00494     void SetSpacingY(double dfY){SetParamDbl(OGRSTLabelDy,dfY);}
00495     double Perp(GBool &bDefault){return GetParamDbl(OGRSTLabelPerp,bDefault);}
00496     void SetPerp(double dfPerp){SetParamDbl(OGRSTLabelPerp,dfPerp);}  
00497     GBool Bold(GBool &bDefault){return GetParamNum(OGRSTLabelBold,bDefault);}
00498     void SetBold(GBool bBold){SetParamNum(OGRSTLabelBold,bBold);}
00499     GBool Italic(GBool &bDefault){return GetParamNum(OGRSTLabelItalic,bDefault);}
00500     void SetItalic(GBool bItalic){SetParamNum(OGRSTLabelItalic,bItalic);}
00501     GBool Underline(GBool &bDefault){return GetParamNum(OGRSTLabelUnderline,bDefault);}
00502     void SetUnderline(GBool bUnderline){SetParamNum(OGRSTLabelUnderline,bUnderline);}
00503     int  Priority(GBool &bDefault){return GetParamNum(OGRSTLabelPriority,bDefault);}
00504     void SetPriority(int nPriority){SetParamNum(OGRSTLabelPriority,nPriority);}
00505     
00506     /*****************************************************************/
00507     
00508      GBool Parse();
00509      const char *GetParamStr(OGRSTLabelParam eParam, GBool &bValueIsNull);
00510      int GetParamNum(OGRSTLabelParam eParam,GBool &bValueIsNull);
00511      double GetParamDbl(OGRSTLabelParam eParam,GBool &bValueIsNull);
00512      void SetParamStr(OGRSTLabelParam eParam, const char *pszParamString);
00513      void SetParamNum(OGRSTLabelParam eParam, int nParam);
00514      void SetParamDbl(OGRSTLabelParam eParam, double dfParam);
00515      const char *GetStyleString();
00516 };
00517 
00518 #endif
00519 
00520 
00521 
00522 
00523 
00524 
00525 
00526 
00527 
00528 
00529 
00530 
00531 
00532 

Generated on Mon Jan 9 18:03:31 2006 for OGR by  doxygen 1.4.6