00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #ifndef OGR_FEATURESTYLE_INCLUDE
00077 #define OGR_FEATURESTYLE_INCLUDE
00078
00079 #include "cpl_conv.h"
00080
00081 class OGRFeature;
00082
00083 typedef enum ogr_style_tool_class_id
00084 {
00085 OGRSTCNone,
00086 OGRSTCPen,
00087 OGRSTCBrush,
00088 OGRSTCSymbol,
00089 OGRSTCLabel,
00090 OGRSTCVector
00091 } OGRSTClassId;
00092
00093 typedef enum ogr_style_tool_units_id
00094 {
00095 OGRSTUGround,
00096 OGRSTUPixel,
00097 OGRSTUPoints,
00098 OGRSTUMM,
00099 OGRSTUCM,
00100 OGRSTUInches
00101 } OGRSTUnitId;
00102
00103 typedef enum ogr_style_tool_param_pen_id
00104 {
00105 OGRSTPenColor = 0,
00106 OGRSTPenWidth,
00107 OGRSTPenPattern,
00108 OGRSTPenId,
00109 OGRSTPenPerOffset,
00110 OGRSTPenCap,
00111 OGRSTPenJoin,
00112 OGRSTPenPriority,
00113 OGRSTPenLast
00114
00115 } OGRSTPenParam;
00116
00117 typedef enum ogr_style_tool_param_brush_id
00118 {
00119 OGRSTBrushFColor = 0,
00120 OGRSTBrushBColor,
00121 OGRSTBrushId,
00122 OGRSTBrushAngle,
00123 OGRSTBrushSize,
00124 OGRSTBrushDx,
00125 OGRSTBrushDy,
00126 OGRSTBrushPriority,
00127 OGRSTBrushLast
00128
00129 } OGRSTBrushParam;
00130
00131
00132
00133 typedef enum ogr_style_tool_param_symbol_id
00134 {
00135 OGRSTSymbolId = 0,
00136 OGRSTSymbolAngle,
00137 OGRSTSymbolColor,
00138 OGRSTSymbolSize,
00139 OGRSTSymbolDx,
00140 OGRSTSymbolDy,
00141 OGRSTSymbolStep,
00142 OGRSTSymbolPerp,
00143 OGRSTSymbolOffset,
00144 OGRSTSymbolPriority,
00145 OGRSTSymbolFontName,
00146 OGRSTSymbolLast
00147
00148 } OGRSTSymbolParam;
00149
00150 typedef enum ogr_style_tool_param_label_id
00151 {
00152 OGRSTLabelFontName = 0,
00153 OGRSTLabelSize,
00154 OGRSTLabelTextString,
00155 OGRSTLabelAngle,
00156 OGRSTLabelFColor,
00157 OGRSTLabelBColor,
00158 OGRSTLabelPlacement,
00159 OGRSTLabelAnchor,
00160 OGRSTLabelDx,
00161 OGRSTLabelDy,
00162 OGRSTLabelPerp,
00163 OGRSTLabelBold,
00164 OGRSTLabelItalic,
00165 OGRSTLabelUnderline,
00166 OGRSTLabelPriority,
00167 OGRSTLabelStrikeout,
00168 OGRSTLabelStretch,
00169 OGRSTLabelAdjHor,
00170 OGRSTLabelAdjVert,
00171 OGRSTLabelHColor,
00172 OGRSTLabelLast
00173
00174 } OGRSTLabelParam;
00175
00176 typedef enum ogr_style_tool_param_vector_id
00177 {
00178 OGRSTVectorId = 0,
00179 OGRSTVectorNoCompress,
00180 OGRSTVectorSprain,
00181 OGRSTVectorNoSlope,
00182 OGRSTVectorMirroring,
00183 OGRSTVectorCentering,
00184 OGRSTVectorPriority,
00185 OGRSTVectorLast
00186
00187 } OGRSTVectorParam;
00188
00189 typedef enum ogr_style_type
00190 {
00191 OGRSTypeString,
00192 OGRSTypeDouble,
00193 OGRSTypeInteger,
00194 OGRSTypeBoolean
00195 } OGRSType;
00196
00197 typedef struct ogr_style_param
00198 {
00199 int eParam;
00200 char *pszToken;
00201 GBool bGeoref;
00202 OGRSType eType;
00203 }OGRStyleParamId;
00204
00205
00206 typedef struct ogr_style_value
00207 {
00208 char *pszValue;
00209 double dfValue;
00210 int nValue;
00211 GBool bValid;
00212 OGRSTUnitId eUnit;
00213 }OGRStyleValue;
00214
00215
00216
00217
00218
00219 class CPL_DLL OGRStyleTable
00220 {
00221 private:
00222 char **m_papszStyleTable;
00223
00224 public:
00225 OGRStyleTable();
00226 ~OGRStyleTable();
00227 GBool AddStyle(const char *pszName,const char *pszStyleString);
00228 GBool RemoveStyle(const char *pszName);
00229 GBool ModifyStyle(const char *pszName, const char *pszStyleString);
00230
00231 GBool SaveStyleTable(const char *pszFilename);
00232 GBool LoadStyleTable(const char *pszFilename);
00233 const char *Find(const char *pszStyleString);
00234 GBool IsExist(const char *pszName);
00235 const char *GetStyleName(const char *pszName);
00236 void Print(FILE *fpOut);
00237 void Clear();
00238 OGRStyleTable *Clone();
00239 };
00240
00241
00242 class OGRStyleTool;
00243
00244 class CPL_DLL OGRStyleMgr
00245 {
00246 private:
00247 OGRStyleTable *m_poDataSetStyleTable;
00248 char *m_pszStyleString;
00249
00250 public:
00251 OGRStyleMgr(OGRStyleTable *poDataSetStyleTable = NULL);
00252 ~OGRStyleMgr();
00253
00254 GBool SetFeatureStyleString(OGRFeature *,const char *pszStyleString=NULL,
00255 GBool bNoMatching = FALSE);
00256
00257
00258
00259
00260 const char *InitFromFeature(OGRFeature *);
00261 GBool InitStyleString(const char *pszStyleString = NULL);
00262
00263 const char *GetStyleName(const char *pszStyleString= NULL);
00264 const char *GetStyleByName(const char *pszStyleName);
00265
00266 GBool AddStyle(const char *pszStyleName, const char *pszStyleString=NULL);
00267
00268 const char *GetStyleString(OGRFeature * = NULL);
00269
00270 GBool AddPart(OGRStyleTool *);
00271 GBool AddPart(const char *);
00272
00273 int GetPartCount(const char *pszStyleString = NULL);
00274 OGRStyleTool *GetPart(int hPartId, const char *pszStyleString = NULL);
00275
00276
00277
00278
00279 OGRStyleTable *GetDataSetStyleTable(){return m_poDataSetStyleTable;}
00280
00281 OGRStyleTool *CreateStyleToolFromStyleString(const char *pszStyleString);
00282
00283 };
00284
00285 class CPL_DLL OGRStyleTool
00286 {
00287 private:
00288 GBool m_bModified;
00289 GBool m_bParsed;
00290 double m_dfScale;
00291 OGRSTUnitId m_eUnit;
00292 OGRSTClassId m_eClassId;
00293 char *m_pszStyleString;
00294
00295 virtual GBool Parse() = 0;
00296
00297 protected:
00298 GBool Parse(OGRStyleParamId* pasStyle,
00299 OGRStyleValue* pasValue,
00300 int nCount);
00301
00302 public:
00303
00304 OGRStyleTool(){}
00305 OGRStyleTool(OGRSTClassId eClassId);
00306 virtual ~OGRStyleTool();
00307
00308 GBool GetRGBFromString(const char *pszColor, int &nRed, int &nGreen,
00309 int &nBlue, int &nTransparence);
00310 int GetSpecificId(const char *pszId, const char *pszWanted);
00311
00312 GBool IsStyleModified() {return m_bModified;}
00313 void StyleModified() {m_bModified = TRUE;}
00314
00315 GBool IsStyleParsed() {return m_bParsed;}
00316 void StyleParsed() {m_bParsed = TRUE;}
00317
00318 OGRSTClassId GetType();
00319
00320 void SetInternalInputUnitFromParam(char *pszString);
00321
00322 void SetUnit(OGRSTUnitId,double dfScale = 1.0);
00323
00324
00325 OGRSTUnitId GetUnit(){return m_eUnit;}
00326
00327
00328
00329
00330
00331 virtual const char *GetStyleString() = 0;
00332 void SetStyleString(const char *pszStyleString);
00333 const char *GetStyleString(OGRStyleParamId *pasStyleParam ,
00334 OGRStyleValue *pasStyleValue, int nSize);
00335
00336 const char *GetParamStr(OGRStyleParamId &sStyleParam ,
00337 OGRStyleValue &sStyleValue,
00338 GBool &bValueIsNull);
00339
00340 int GetParamNum(OGRStyleParamId &sStyleParam ,
00341 OGRStyleValue &sStyleValue,
00342 GBool &bValueIsNull);
00343
00344 double GetParamDbl(OGRStyleParamId &sStyleParam ,
00345 OGRStyleValue &sStyleValue,
00346 GBool &bValueIsNull);
00347
00348 void SetParamStr(OGRStyleParamId &sStyleParam ,
00349 OGRStyleValue &sStyleValue,
00350 const char *pszParamString);
00351
00352 void SetParamNum(OGRStyleParamId &sStyleParam ,
00353 OGRStyleValue &sStyleValue,
00354 int nParam);
00355
00356 void SetParamDbl(OGRStyleParamId &sStyleParam ,
00357 OGRStyleValue &sStyleValue,
00358 double dfParam);
00359
00360 double ComputeWithUnit(double, OGRSTUnitId);
00361 int ComputeWithUnit(int , OGRSTUnitId);
00362
00363 };
00364
00365 extern OGRStyleParamId CPL_DLL asStylePen[];
00366
00367 class CPL_DLL OGRStylePen : public OGRStyleTool
00368 {
00369 private:
00370
00371 OGRStyleValue *m_pasStyleValue;
00372
00373 GBool Parse();
00374
00375 public:
00376
00377 OGRStylePen();
00378 virtual ~OGRStylePen();
00379
00380
00381
00382
00383
00384 const char *Color(GBool &bDefault){return GetParamStr(OGRSTPenColor,bDefault);}
00385 void SetColor(const char *pszColor){SetParamStr(OGRSTPenColor,pszColor);}
00386 double Width(GBool &bDefault){return GetParamDbl(OGRSTPenWidth,bDefault);}
00387 void SetWidth(double dfWidth){SetParamDbl(OGRSTPenWidth,dfWidth);}
00388 const char *Pattern(GBool &bDefault){return (char *)GetParamStr(OGRSTPenPattern,bDefault);}
00389 void SetPattern(const char *pszPattern){SetParamStr(OGRSTPenPattern,pszPattern);}
00390 const char *Id(GBool &bDefault){return GetParamStr(OGRSTPenId,bDefault);}
00391 void SetId(const char *pszId){SetParamStr(OGRSTPenId,pszId);}
00392 double PerpendicularOffset(GBool &bDefault){return GetParamDbl(OGRSTPenPerOffset,bDefault);}
00393 void SetPerpendicularOffset(double dfPerp){SetParamDbl(OGRSTPenPerOffset,dfPerp);}
00394 const char *Cap(GBool &bDefault){return GetParamStr(OGRSTPenCap,bDefault);}
00395 void SetCap(const char *pszCap){SetParamStr(OGRSTPenCap,pszCap);}
00396 const char *Join(GBool &bDefault){return GetParamStr(OGRSTPenJoin,bDefault);}
00397 void SetJoin(const char *pszJoin){SetParamStr(OGRSTPenJoin,pszJoin);}
00398 int Priority(GBool &bDefault){return GetParamNum(OGRSTPenPriority,bDefault);}
00399 void SetPriority(int nPriority){SetParamNum(OGRSTPenPriority,nPriority);}
00400
00401
00402
00403 const char *GetParamStr(OGRSTPenParam eParam, GBool &bValueIsNull);
00404 int GetParamNum(OGRSTPenParam eParam,GBool &bValueIsNull);
00405 double GetParamDbl(OGRSTPenParam eParam,GBool &bValueIsNull);
00406 void SetParamStr(OGRSTPenParam eParam, const char *pszParamString);
00407 void SetParamNum(OGRSTPenParam eParam, int nParam);
00408 void SetParamDbl(OGRSTPenParam eParam, double dfParam);
00409 const char *GetStyleString();
00410 };
00411
00412 extern OGRStyleParamId CPL_DLL asStyleBrush[];
00413
00414 class CPL_DLL OGRStyleBrush : public OGRStyleTool
00415 {
00416 private:
00417
00418 OGRStyleValue *m_pasStyleValue;
00419
00420 GBool Parse();
00421
00422 public:
00423
00424 OGRStyleBrush();
00425 virtual ~OGRStyleBrush();
00426
00427
00428
00429 const char *ForeColor(GBool &bDefault){return GetParamStr(OGRSTBrushFColor,bDefault);}
00430 void SetForeColor(const char *pszColor){SetParamStr(OGRSTBrushFColor,pszColor);}
00431 const char *BackColor(GBool &bDefault){return GetParamStr(OGRSTBrushBColor,bDefault);}
00432 void SetBackColor(const char *pszColor){SetParamStr(OGRSTBrushBColor,pszColor);}
00433 const char *Id(GBool &bDefault){ return GetParamStr(OGRSTBrushId,bDefault);}
00434 void SetId(const char *pszId){SetParamStr(OGRSTBrushId,pszId);}
00435 double Angle(GBool &bDefault){return GetParamDbl(OGRSTBrushAngle,bDefault);}
00436 void SetAngle(double dfAngle){SetParamDbl(OGRSTBrushAngle,dfAngle );}
00437 double Size(GBool &bDefault){return GetParamDbl(OGRSTBrushSize,bDefault);}
00438 void SetSize(double dfSize){SetParamDbl(OGRSTBrushSize,dfSize );}
00439 double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTBrushDx,bDefault);}
00440 void SetSpacingX(double dfX){SetParamDbl(OGRSTBrushDx,dfX );}
00441 double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTBrushDy,bDefault);}
00442 void SetSpacingY(double dfY){SetParamDbl(OGRSTBrushDy,dfY );}
00443 int Priority(GBool &bDefault){ return GetParamNum(OGRSTBrushPriority,bDefault);}
00444 void SetPriority(int nPriority){ SetParamNum(OGRSTBrushPriority,nPriority);}
00445
00446
00447
00448
00449 const char *GetParamStr(OGRSTBrushParam eParam, GBool &bValueIsNull);
00450 int GetParamNum(OGRSTBrushParam eParam,GBool &bValueIsNull);
00451 double GetParamDbl(OGRSTBrushParam eParam,GBool &bValueIsNull);
00452 void SetParamStr(OGRSTBrushParam eParam, const char *pszParamString);
00453 void SetParamNum(OGRSTBrushParam eParam, int nParam);
00454 void SetParamDbl(OGRSTBrushParam eParam, double dfParam);
00455 const char *GetStyleString();
00456 };
00457
00458 extern OGRStyleParamId CPL_DLL asStyleSymbol[];
00459
00460 class CPL_DLL OGRStyleSymbol : public OGRStyleTool
00461 {
00462 private:
00463
00464 OGRStyleValue *m_pasStyleValue;
00465
00466 GBool Parse();
00467
00468 public:
00469
00470 OGRStyleSymbol();
00471 virtual ~OGRStyleSymbol();
00472
00473
00474
00475
00476
00477 const char *Id(GBool &bDefault){return GetParamStr(OGRSTSymbolId,bDefault);}
00478 void SetId(const char *pszId){ SetParamStr(OGRSTSymbolId,pszId);}
00479 double Angle(GBool &bDefault){ return GetParamDbl(OGRSTSymbolAngle,bDefault);}
00480 void SetAngle(double dfAngle){SetParamDbl(OGRSTSymbolAngle,dfAngle );}
00481 const char *Color(GBool &bDefault){return GetParamStr(OGRSTSymbolColor,bDefault);}
00482 void SetColor(const char *pszColor){SetParamStr(OGRSTSymbolColor,pszColor);}
00483 double Size(GBool &bDefault){ return GetParamDbl(OGRSTSymbolSize,bDefault);}
00484 void SetSize(double dfSize){ SetParamDbl(OGRSTSymbolSize,dfSize );}
00485 double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTSymbolDx,bDefault);}
00486 void SetSpacingX(double dfX){SetParamDbl(OGRSTSymbolDx,dfX );}
00487 double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTSymbolDy,bDefault);}
00488 void SetSpacingY(double dfY){SetParamDbl(OGRSTSymbolDy,dfY );}
00489 double Step(GBool &bDefault){return GetParamDbl(OGRSTSymbolStep,bDefault);}
00490 void SetStep(double dfStep){SetParamDbl(OGRSTSymbolStep,dfStep );}
00491 double Offset(GBool &bDefault){return GetParamDbl(OGRSTSymbolOffset,bDefault);}
00492 void SetOffset(double dfOffset){SetParamDbl(OGRSTSymbolOffset,dfOffset );}
00493 double Perp(GBool &bDefault){return GetParamDbl(OGRSTSymbolPerp,bDefault);}
00494 void SetPerp(double dfPerp){SetParamDbl(OGRSTSymbolPerp,dfPerp );}
00495 int Priority(GBool &bDefault){return GetParamNum(OGRSTSymbolPriority,bDefault);}
00496 void SetPriority(int nPriority){SetParamNum(OGRSTSymbolPriority,nPriority);}
00497 const char *FontName(GBool &bDefault)
00498 {return GetParamStr(OGRSTSymbolFontName,bDefault);}
00499 void SetFontName(const char *pszFontName)
00500 {SetParamStr(OGRSTSymbolFontName,pszFontName);}
00501
00502
00503
00504 const char *GetParamStr(OGRSTSymbolParam eParam, GBool &bValueIsNull);
00505 int GetParamNum(OGRSTSymbolParam eParam,GBool &bValueIsNull);
00506 double GetParamDbl(OGRSTSymbolParam eParam,GBool &bValueIsNull);
00507 void SetParamStr(OGRSTSymbolParam eParam, const char *pszParamString);
00508 void SetParamNum(OGRSTSymbolParam eParam, int nParam);
00509 void SetParamDbl(OGRSTSymbolParam eParam, double dfParam);
00510 const char *GetStyleString();
00511 };
00512
00513 extern OGRStyleParamId CPL_DLL asStyleLabel[];
00514
00515 class CPL_DLL OGRStyleLabel : public OGRStyleTool
00516 {
00517 private:
00518
00519 OGRStyleValue *m_pasStyleValue;
00520
00521 GBool Parse();
00522
00523 public:
00524
00525 OGRStyleLabel();
00526 virtual ~OGRStyleLabel();
00527
00528
00529
00530
00531
00532 const char *FontName(GBool &bDefault){return GetParamStr(OGRSTLabelFontName,bDefault);}
00533 void SetFontName(const char *pszFontName){SetParamStr(OGRSTLabelFontName,pszFontName);}
00534 double Size(GBool &bDefault){return GetParamDbl(OGRSTLabelSize,bDefault);}
00535 void SetSize(double dfSize){SetParamDbl(OGRSTLabelSize,dfSize);}
00536 const char *TextString(GBool &bDefault){return GetParamStr(OGRSTLabelTextString,bDefault);}
00537 void SetTextString(const char *pszTextString){SetParamStr(OGRSTLabelTextString,pszTextString);}
00538 double Angle(GBool &bDefault){return GetParamDbl(OGRSTLabelAngle,bDefault);}
00539 void SetAngle(double dfAngle){SetParamDbl(OGRSTLabelAngle,dfAngle);}
00540 const char *ForeColor(GBool &bDefault){return GetParamStr(OGRSTLabelFColor,bDefault);}
00541 void SetForColor(const char *pszForColor){SetParamStr(OGRSTLabelFColor,pszForColor);}
00542 const char *BackColor(GBool &bDefault){return GetParamStr(OGRSTLabelBColor,bDefault);}
00543 void SetBackColor(const char *pszBackColor){SetParamStr(OGRSTLabelBColor,pszBackColor);}
00544 const char *Placement(GBool &bDefault){return GetParamStr(OGRSTLabelPlacement,bDefault);}
00545 void SetPlacement(const char *pszPlacement){SetParamStr(OGRSTLabelPlacement,pszPlacement);}
00546 int Anchor(GBool &bDefault){return GetParamNum(OGRSTLabelAnchor,bDefault);}
00547 void SetAnchor(int nAnchor){SetParamNum(OGRSTLabelAnchor,nAnchor);}
00548 double SpacingX(GBool &bDefault){return GetParamDbl(OGRSTLabelDx,bDefault);}
00549 void SetSpacingX(double dfX){SetParamDbl(OGRSTLabelDx,dfX);}
00550 double SpacingY(GBool &bDefault){return GetParamDbl(OGRSTLabelDy,bDefault);}
00551 void SetSpacingY(double dfY){SetParamDbl(OGRSTLabelDy,dfY);}
00552 double Perp(GBool &bDefault){return GetParamDbl(OGRSTLabelPerp,bDefault);}
00553 void SetPerp(double dfPerp){SetParamDbl(OGRSTLabelPerp,dfPerp);}
00554 GBool Bold(GBool &bDefault){return GetParamNum(OGRSTLabelBold,bDefault);}
00555 void SetBold(GBool bBold){SetParamNum(OGRSTLabelBold,bBold);}
00556 GBool Italic(GBool &bDefault){return GetParamNum(OGRSTLabelItalic,bDefault);}
00557 void SetItalic(GBool bItalic){SetParamNum(OGRSTLabelItalic,bItalic);}
00558 GBool Underline(GBool &bDefault){return GetParamNum(OGRSTLabelUnderline,bDefault);}
00559 void SetUnderline(GBool bUnderline){SetParamNum(OGRSTLabelUnderline,bUnderline);}
00560 int Priority(GBool &bDefault){return GetParamNum(OGRSTLabelPriority,bDefault);}
00561 void SetPriority(int nPriority){SetParamNum(OGRSTLabelPriority,nPriority);}
00562 GBool Strikeout(GBool &bDefault){return GetParamNum(OGRSTLabelStrikeout,bDefault);}
00563 void SetStrikeout(GBool bStrikeout){SetParamNum(OGRSTLabelStrikeout,bStrikeout);}
00564 double Stretch(GBool &bDefault){return GetParamDbl(OGRSTLabelStretch,bDefault);}
00565 void SetStretch(double dfStretch){SetParamDbl(OGRSTLabelStretch,dfStretch);}
00566 const char *AdjustmentHor(GBool &bDefault){return GetParamStr(OGRSTLabelAdjHor,bDefault);}
00567 void SetAdjustmentHor(const char *pszAdjustmentHor){SetParamStr(OGRSTLabelAdjHor,pszAdjustmentHor);}
00568 const char *AdjustmentVert(GBool &bDefault){return GetParamStr(OGRSTLabelAdjVert,bDefault);}
00569 void SetAdjustmentVert(const char *pszAdjustmentVert){SetParamStr(OGRSTLabelAdjHor,pszAdjustmentVert);}
00570 const char *ShadowColor(GBool &bDefault){return GetParamStr(OGRSTLabelHColor,bDefault);}
00571 void SetShadowColor(const char *pszShadowColor){SetParamStr(OGRSTLabelHColor,pszShadowColor);}
00572
00573
00574
00575 const char *GetParamStr(OGRSTLabelParam eParam, GBool &bValueIsNull);
00576 int GetParamNum(OGRSTLabelParam eParam,GBool &bValueIsNull);
00577 double GetParamDbl(OGRSTLabelParam eParam,GBool &bValueIsNull);
00578 void SetParamStr(OGRSTLabelParam eParam, const char *pszParamString);
00579 void SetParamNum(OGRSTLabelParam eParam, int nParam);
00580 void SetParamDbl(OGRSTLabelParam eParam, double dfParam);
00581 const char *GetStyleString();
00582 };
00583
00584 extern OGRStyleParamId CPL_DLL asStyleVector[];
00585
00586 class CPL_DLL OGRStyleVector : public OGRStyleTool
00587 {
00588 private:
00589
00590 OGRStyleValue *m_pasStyleValue;
00591
00592 GBool Parse();
00593
00594 public:
00595
00596 OGRStyleVector();
00597 virtual ~OGRStyleVector();
00598
00599
00600
00601
00602
00603 const char *Id(GBool &bDefault){return GetParamStr(OGRSTVectorId,bDefault);}
00604 void SetId(const char *pszId){ SetParamStr(OGRSTVectorId,pszId);}
00605 int Priority(GBool &bDefault){return GetParamNum(OGRSTVectorPriority,bDefault);}
00606 void SetPriority(int nPriority){SetParamNum(OGRSTVectorPriority,nPriority);}
00607
00608
00609 GBool NoCompress(GBool &bDefault){return GetParamNum(OGRSTVectorNoCompress,bDefault);}
00610 void SetNoCompress(GBool bNoCompress){SetParamNum(OGRSTVectorNoCompress,bNoCompress);}
00611 GBool Sprain(GBool &bDefault){return GetParamNum(OGRSTVectorSprain,bDefault);}
00612 void SetSprain(GBool bSprain){SetParamNum(OGRSTVectorSprain,bSprain);}
00613 GBool NoSlope(GBool &bDefault){return GetParamNum(OGRSTVectorNoSlope,bDefault);}
00614 void SetNoSlope(GBool bNoSlope){SetParamNum(OGRSTVectorNoSlope,bNoSlope);}
00615 GBool Mirroring(GBool &bDefault){return GetParamNum(OGRSTVectorMirroring,bDefault);}
00616 void SetMirroring(GBool bMirroring){SetParamNum(OGRSTVectorMirroring,bMirroring);}
00617 GBool Centering(GBool &bDefault){return GetParamNum(OGRSTVectorCentering,bDefault);}
00618 void SetCentering(GBool bCentering){SetParamNum(OGRSTVectorCentering,bCentering);}
00619
00620
00621
00622 const char *GetParamStr(OGRSTVectorParam eParam, GBool &bValueIsNull);
00623 int GetParamNum(OGRSTVectorParam eParam,GBool &bValueIsNull);
00624 double GetParamDbl(OGRSTVectorParam eParam,GBool &bValueIsNull);
00625 void SetParamStr(OGRSTVectorParam eParam, const char *pszParamString);
00626 void SetParamNum(OGRSTVectorParam eParam, int nParam);
00627 void SetParamDbl(OGRSTVectorParam eParam, double dfParam);
00628 const char *GetStyleString();
00629 };
00630
00631 #endif