30 #ifndef OGR_FEATURESTYLE_INCLUDE
31 #define OGR_FEATURESTYLE_INCLUDE
59 typedef struct ogr_style_param
67 typedef struct ogr_style_value
86 char **m_papszStyleTable;
94 GBool AddStyle(
const char *pszName,
const char *pszStyleString);
95 GBool RemoveStyle(
const char *pszName);
96 GBool ModifyStyle(
const char *pszName,
const char *pszStyleString);
98 GBool SaveStyleTable(
const char *pszFilename);
99 GBool LoadStyleTable(
const char *pszFilename);
100 const char *Find(
const char *pszStyleString);
101 GBool IsExist(
const char *pszName);
102 const char *GetStyleName(
const char *pszName);
103 void Print(FILE *fpOut);
106 void ResetStyleStringReading();
107 const char *GetNextStyle();
108 const char *GetLastStyleName();
120 char *m_pszStyleString;
126 GBool SetFeatureStyleString(
OGRFeature *,
const char *pszStyleString=NULL,
127 GBool bNoMatching = FALSE);
133 GBool InitStyleString(
const char *pszStyleString = NULL);
135 const char *GetStyleName(
const char *pszStyleString= NULL);
136 const char *GetStyleByName(
const char *pszStyleName);
138 GBool AddStyle(
const char *pszStyleName,
const char *pszStyleString=NULL);
140 const char *GetStyleString(
OGRFeature * = NULL);
143 GBool AddPart(
const char *);
145 int GetPartCount(
const char *pszStyleString = NULL);
146 OGRStyleTool *GetPart(
int hPartId,
const char *pszStyleString = NULL);
151 OGRStyleTable *GetDataSetStyleTable(){
return m_poDataSetStyleTable;}
153 OGRStyleTool *CreateStyleToolFromStyleString(
const char *pszStyleString);
168 char *m_pszStyleString;
170 virtual GBool Parse() = 0;
174 GBool Parse(
const OGRStyleParamId* pasStyle,
175 OGRStyleValue* pasValue,
187 m_pszStyleString(NULL)
192 static GBool GetRGBFromString(
const char *pszColor,
int &nRed,
int &nGreen,
193 int &nBlue,
int &nTransparence);
194 static int GetSpecificId(
const char *pszId,
const char *pszWanted);
197 GBool IsStyleModified() {
return m_bModified;}
198 void StyleModified() {m_bModified = TRUE;}
200 GBool IsStyleParsed() {
return m_bParsed;}
201 void StyleParsed() {m_bParsed = TRUE;}
207 void SetInternalInputUnitFromParam(
char *pszString);
219 virtual const char *GetStyleString() = 0;
220 void SetStyleString(
const char *pszStyleString);
221 const char *GetStyleString(
const OGRStyleParamId *pasStyleParam ,
222 OGRStyleValue *pasStyleValue,
int nSize);
224 const char *GetParamStr(
const OGRStyleParamId &sStyleParam ,
225 OGRStyleValue &sStyleValue,
226 GBool &bValueIsNull);
228 int GetParamNum(
const OGRStyleParamId &sStyleParam ,
229 OGRStyleValue &sStyleValue,
230 GBool &bValueIsNull);
232 double GetParamDbl(
const OGRStyleParamId &sStyleParam ,
233 OGRStyleValue &sStyleValue,
234 GBool &bValueIsNull);
236 void SetParamStr(
const OGRStyleParamId &sStyleParam ,
237 OGRStyleValue &sStyleValue,
238 const char *pszParamString);
240 void SetParamNum(
const OGRStyleParamId &sStyleParam ,
241 OGRStyleValue &sStyleValue,
244 void SetParamDbl(
const OGRStyleParamId &sStyleParam ,
245 OGRStyleValue &sStyleValue,
262 OGRStyleValue *m_pasStyleValue;
269 virtual ~OGRStylePen();
310 OGRStyleValue *m_pasStyleValue;
317 virtual ~OGRStyleBrush();
352 class CPL_DLL OGRStyleSymbol : public OGRStyleTool
356 OGRStyleValue *m_pasStyleValue;
363 virtual ~OGRStyleSymbol();
389 const char *FontName(
GBool &bDefault)
391 void SetFontName(
const char *pszFontName)
410 class CPL_DLL OGRStyleLabel : public OGRStyleTool
414 OGRStyleValue *m_pasStyleValue;
421 virtual ~OGRStyleLabel();
Definition: ogr_core.h:841
Definition: ogr_core.h:878
Definition: ogr_core.h:836
Definition: ogr_core.h:822
Definition: ogr_core.h:858
enum ogr_style_tool_param_symbol_id OGRSTSymbolParam
Definition: ogr_core.h:877
Definition: ogr_core.h:817
Definition: ogr_core.h:799
Definition: ogr_core.h:818
int GBool
Definition: cpl_port.h:215
Definition: ogr_core.h:865
#define CPL_OVERRIDE
Definition: cpl_port.h:1055
Definition: ogr_core.h:839
Definition: ogr_core.h:824
Definition: ogr_core.h:844
Definition: ogr_core.h:861
Definition: ogr_core.h:805
Definition: ogr_core.h:838
Definition: ogr_core.h:871
enum ogr_style_tool_param_brush_id OGRSTBrushParam
Definition: ogr_core.h:876
Definition: ogr_core.h:823
enum ogr_style_tool_param_label_id OGRSTLabelParam
Definition: ogr_core.h:869
Definition: ogr_core.h:786
Definition: ogr_core.h:819
Definition: ogr_core.h:804
Definition: ogr_core.h:843
Convenient string class based on std::string.
Definition: cpl_string.h:338
Definition: ogr_core.h:803
Definition: ogr_core.h:866
Definition: ogr_featurestyle.h:116
Definition: ogr_core.h:820
Definition: ogr_core.h:859
enum ogr_style_tool_class_id OGRSTClassId
Definition: ogr_core.h:847
Definition: ogr_core.h:802
enum ogr_style_tool_param_pen_id OGRSTPenParam
enum ogr_style_tool_units_id OGRSTUnitId
Definition: ogr_core.h:842
Definition: ogr_core.h:845
Definition: ogr_core.h:821
Definition: ogr_core.h:801
Definition: ogr_core.h:806
Definition: ogr_core.h:875
Definition: ogr_core.h:873
Definition: ogr_core.h:874
Definition: ogr_core.h:864
Definition: ogr_core.h:860
Definition: ogr_core.h:862
Definition: ogr_core.h:840
Definition: ogr_core.h:868
Definition: ogr_core.h:870
Definition: ogr_core.h:800
Definition: ogr_core.h:837
Definition: ogr_feature.h:279
Definition: ogr_featurestyle.h:83
Definition: ogr_core.h:863
Definition: ogr_core.h:846
Definition: ogr_core.h:773
Definition: ogr_core.h:867
ogr_style_type
Definition: ogr_featurestyle.h:50
enum ogr_style_type OGRSType
Definition: ogr_core.h:872