OGR
Public Member Functions | Static Public Member Functions | List of all members
OGRStyleTool Class Referenceabstract

#include <ogr_featurestyle.h>

Public Member Functions

 OGRStyleTool (OGRSTClassId eClassId)
 
OGRSTClassId GetType ()
 Determine type of Style Tool. More...
 
void SetUnit (OGRSTUnitId, double dfScale=1.0)
 Set Style Tool units. More...
 
OGRSTUnitId GetUnit ()
 Get Style Tool units. More...
 
virtual const char * GetStyleString ()=0
 Get the style string for this Style Tool. More...
 
void SetStyleString (const char *pszStyleString)
 
const char * GetStyleString (const OGRStyleParamId *pasStyleParam, OGRStyleValue *pasStyleValue, int nSize)
 
const char * GetParamStr (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, GBool &bValueIsNull)
 
int GetParamNum (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, GBool &bValueIsNull)
 
double GetParamDbl (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, GBool &bValueIsNull)
 
void SetParamStr (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, const char *pszParamString)
 
void SetParamNum (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, int nParam)
 
void SetParamDbl (const OGRStyleParamId &sStyleParam, OGRStyleValue &sStyleValue, double dfParam)
 

Static Public Member Functions

static GBool GetRGBFromString (const char *pszColor, int &nRed, int &nGreen, int &nBlue, int &nTransparence)
 Return the r,g,b,a components of a color encoded in #RRGGBB[AA] format. More...
 
static int GetSpecificId (const char *pszId, const char *pszWanted)
 

Detailed Description

This class represents a style tool

Constructor & Destructor Documentation

◆ OGRStyleTool()

OGRStyleTool::OGRStyleTool ( OGRSTClassId  eClassId)
explicit

Constructor

Member Function Documentation

◆ GetParamDbl()

double OGRStyleTool::GetParamDbl ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
GBool bValueIsNull 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
bValueIsNullundocumented.
Returns
Undocumented.

Referenced by GetParamNum().

◆ GetParamNum()

int OGRStyleTool::GetParamNum ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
GBool bValueIsNull 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
bValueIsNullundocumented.
Returns
Undocumented.

References GetParamDbl().

◆ GetParamStr()

const char * OGRStyleTool::GetParamStr ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
GBool bValueIsNull 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
bValueIsNullundocumented.
Returns
Undocumented.

◆ GetRGBFromString()

GBool OGRStyleTool::GetRGBFromString ( const char *  pszColor,
int &  nRed,
int &  nGreen,
int &  nBlue,
int &  nTransparance 
)
static

Return the r,g,b,a components of a color encoded in #RRGGBB[AA] format.

Maps to OGRStyleTool::GetRGBFromString().

Parameters
pszColorthe color to parse
nRedreference to an int in which the red value will be returned.
nGreenreference to an int in which the green value will be returned.
nBluereference to an int in which the blue value will be returned.
nTransparancereference to an int in which the (optional) alpha value will be returned.
Returns
TRUE if the color could be successfully parsed, or FALSE in case of errors.

◆ GetSpecificId()

int OGRStyleTool::GetSpecificId ( const char *  pszId,
const char *  pszWanted 
)
static

Undocumented

Parameters
pszIdUndocumented
pszWantedUndocumented
Returns
Undocumented

◆ GetStyleString() [1/2]

OGRStyleTool::GetStyleString ( )
pure virtual

Get the style string for this Style Tool.

Maps to the OGRStyleTool subclasses' GetStyleString() methods.

Returns
the style string for this style tool or "" if the hST is invalid.

Referenced by OGRStyleMgr::AddPart().

◆ GetStyleString() [2/2]

const char * OGRStyleTool::GetStyleString ( const OGRStyleParamId *  pasStyleParam,
OGRStyleValue *  pasStyleValue,
int  nSize 
)

Undocumented

Parameters
pasStyleParamundocumented.
pasStyleValueundocumented.
nSizeundocumented.
Returns
undocumented.

References CPLFree, GetType(), OGRSTCBrush, OGRSTCLabel, OGRSTCPen, and OGRSTCSymbol.

◆ GetType()

OGRSTClassId OGRStyleTool::GetType ( )

Determine type of Style Tool.

Returns
the style tool type, one of OGRSTCPen (1), OGRSTCBrush (2), OGRSTCSymbol (3) or OGRSTCLabel (4). Returns OGRSTCNone (0) if the OGRStyleToolH is invalid.

Referenced by GetStyleString().

◆ GetUnit()

OGRStyleTool::GetUnit ( )
inline

Get Style Tool units.

Returns
the style tool units.

Referenced by SetParamDbl(), SetParamNum(), and SetParamStr().

◆ SetParamDbl()

void OGRStyleTool::SetParamDbl ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
double  dfParam 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
dfParamundocumented.

References GetUnit().

◆ SetParamNum()

void OGRStyleTool::SetParamNum ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
int  nParam 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
nParamundocumented.

References GetUnit().

◆ SetParamStr()

void OGRStyleTool::SetParamStr ( const OGRStyleParamId &  sStyleParam,
OGRStyleValue &  sStyleValue,
const char *  pszParamString 
)

Undocumented

Parameters
sStyleParamundocumented.
sStyleValueundocumented.
pszParamStringundocumented.

References GetUnit().

◆ SetStyleString()

void OGRStyleTool::SetStyleString ( const char *  pszStyleString)

Undocumented

Parameters
pszStyleStringundocumented.

References CPLStrdup().

Referenced by OGRStyleMgr::GetPart().

◆ SetUnit()

void OGRStyleTool::SetUnit ( OGRSTUnitId  eUnit,
double  dfGroundPaperScale = 1.0 
)

Set Style Tool units.

Parameters
eUnitthe new unit.
dfGroundPaperScaleground to paper scale factor.

The documentation for this class was generated from the following files:

Generated for GDAL by doxygen 1.8.14.