30 #ifndef OGR_FEATURESTYLE_INCLUDE 31 #define OGR_FEATURESTYLE_INCLUDE 60 typedef struct ogr_style_param
68 typedef struct ogr_style_value
87 char **m_papszStyleTable;
95 GBool AddStyle(
const char *pszName,
const char *pszStyleString);
96 GBool RemoveStyle(
const char *pszName);
97 GBool ModifyStyle(
const char *pszName,
const char *pszStyleString);
99 GBool SaveStyleTable(
const char *pszFilename);
100 GBool LoadStyleTable(
const char *pszFilename);
101 const char *Find(
const char *pszStyleString);
102 GBool IsExist(
const char *pszName);
103 const char *GetStyleName(
const char *pszName);
104 void Print(FILE *fpOut);
107 void ResetStyleStringReading();
108 const char *GetNextStyle();
109 const char *GetLastStyleName();
121 char *m_pszStyleString;
127 GBool SetFeatureStyleString(
OGRFeature *,
const char *pszStyleString=
nullptr,
128 GBool bNoMatching = FALSE);
134 GBool InitStyleString(
const char *pszStyleString =
nullptr);
136 const char *GetStyleName(
const char *pszStyleString=
nullptr);
137 const char *GetStyleByName(
const char *pszStyleName);
139 GBool AddStyle(
const char *pszStyleName,
const char *pszStyleString=
nullptr);
141 const char *GetStyleString(
OGRFeature * =
nullptr);
144 GBool AddPart(
const char *);
146 int GetPartCount(
const char *pszStyleString =
nullptr);
147 OGRStyleTool *GetPart(
int hPartId,
const char *pszStyleString =
nullptr);
152 OGRStyleTable *GetDataSetStyleTable(){
return m_poDataSetStyleTable;}
154 OGRStyleTool *CreateStyleToolFromStyleString(
const char *pszStyleString);
169 char *m_pszStyleString;
171 virtual GBool Parse() = 0;
175 GBool Parse(
const OGRStyleParamId* pasStyle,
176 OGRStyleValue* pasValue,
188 m_pszStyleString(
nullptr)
193 static GBool GetRGBFromString(
const char *pszColor,
int &nRed,
int &nGreen,
194 int &nBlue,
int &nTransparence);
195 static int GetSpecificId(
const char *pszId,
const char *pszWanted);
198 GBool IsStyleModified() {
return m_bModified;}
199 void StyleModified() {m_bModified = TRUE;}
201 GBool IsStyleParsed() {
return m_bParsed;}
202 void StyleParsed() {m_bParsed = TRUE;}
208 void SetInternalInputUnitFromParam(
char *pszString);
220 virtual const char *GetStyleString() = 0;
221 void SetStyleString(
const char *pszStyleString);
222 const char *GetStyleString(
const OGRStyleParamId *pasStyleParam ,
223 OGRStyleValue *pasStyleValue,
int nSize);
225 const char *GetParamStr(
const OGRStyleParamId &sStyleParam ,
226 OGRStyleValue &sStyleValue,
227 GBool &bValueIsNull);
229 int GetParamNum(
const OGRStyleParamId &sStyleParam ,
230 OGRStyleValue &sStyleValue,
231 GBool &bValueIsNull);
233 double GetParamDbl(
const OGRStyleParamId &sStyleParam ,
234 OGRStyleValue &sStyleValue,
235 GBool &bValueIsNull);
237 void SetParamStr(
const OGRStyleParamId &sStyleParam ,
238 OGRStyleValue &sStyleValue,
239 const char *pszParamString);
241 void SetParamNum(
const OGRStyleParamId &sStyleParam ,
242 OGRStyleValue &sStyleValue,
245 void SetParamDbl(
const OGRStyleParamId &sStyleParam ,
246 OGRStyleValue &sStyleValue,
263 OGRStyleValue *m_pasStyleValue;
265 GBool Parse()
override;
270 ~OGRStylePen()
override;
311 OGRStyleValue *m_pasStyleValue;
313 GBool Parse()
override;
318 ~OGRStyleBrush()
override;
357 OGRStyleValue *m_pasStyleValue;
359 GBool Parse()
override;
364 ~OGRStyleSymbol()
override;
411 OGRStyleValue *m_pasStyleValue;
413 GBool Parse()
override;
418 ~OGRStyleLabel()
override;
Definition: ogr_core.h:867
Definition: ogr_core.h:904
Definition: ogr_core.h:862
Definition: ogr_core.h:848
Definition: ogr_core.h:884
enum ogr_style_tool_param_symbol_id OGRSTSymbolParam
Definition: ogr_core.h:903
Definition: ogr_core.h:843
Definition: ogr_core.h:825
Definition: ogr_core.h:844
int GBool
Definition: cpl_port.h:221
Definition: ogr_core.h:891
Definition: ogr_core.h:865
Definition: ogr_core.h:850
Definition: ogr_core.h:870
Definition: ogr_core.h:887
Definition: ogr_core.h:831
Definition: ogr_core.h:864
Definition: ogr_core.h:897
enum ogr_style_tool_param_brush_id OGRSTBrushParam
Definition: ogr_core.h:849
enum ogr_style_tool_param_label_id OGRSTLabelParam
Definition: ogr_core.h:895
Definition: ogr_core.h:812
Definition: ogr_core.h:845
Definition: ogr_core.h:830
Definition: ogr_core.h:869
Convenient string class based on std::string.
Definition: cpl_string.h:336
Definition: ogr_core.h:829
Definition: ogr_core.h:892
Definition: ogr_featurestyle.h:117
Definition: ogr_core.h:846
Definition: ogr_core.h:885
enum ogr_style_tool_class_id OGRSTClassId
Definition: ogr_core.h:873
Definition: ogr_core.h:828
enum ogr_style_tool_param_pen_id OGRSTPenParam
enum ogr_style_tool_units_id OGRSTUnitId
Definition: ogr_core.h:868
Definition: ogr_core.h:871
Definition: ogr_core.h:847
Definition: ogr_core.h:827
Definition: ogr_core.h:832
Definition: ogr_core.h:899
Definition: ogr_core.h:900
Definition: ogr_core.h:890
Definition: ogr_core.h:886
Definition: ogr_core.h:888
Definition: ogr_core.h:866
Definition: ogr_core.h:894
Definition: ogr_core.h:896
Definition: ogr_core.h:826
Definition: ogr_core.h:863
Definition: ogr_feature.h:353
Definition: ogr_featurestyle.h:84
Definition: ogr_core.h:889
Definition: ogr_core.h:799
Definition: ogr_core.h:893
ogr_style_type
Definition: ogr_featurestyle.h:50
enum ogr_style_type OGRSType
Definition: ogr_core.h:898