#include <ogr_featurestyle.h>
Public Member Functions | |
GBool | AddStyle (const char *pszName, const char *pszStyleString) |
Add a new style in the table. No comparison will be done on the Style string, only on the name. | |
GBool | RemoveStyle (const char *pszName) |
Remove a style in the table by its name. | |
GBool | ModifyStyle (const char *pszName, const char *pszStyleString) |
Modify a style in the table by its name If the style does not exist, it will be added. | |
GBool | SaveStyleTable (const char *pszFilename) |
Save a style table to a file. | |
GBool | LoadStyleTable (const char *pszFilename) |
Load a style table from a file. | |
const char * | Find (const char *pszStyleString) |
Get a style string by name. | |
GBool | IsExist (const char *pszName) |
Get the index of a style in the table by its name. | |
const char * | GetStyleName (const char *pszName) |
Get style name by style string. | |
void | Print (FILE *fpOut) |
Print a style table to a FILE pointer. | |
void | Clear () |
Clear a style table. | |
OGRStyleTable * | Clone () |
Duplicate style table. |
GBool OGRStyleTable::AddStyle | ( | const char * | pszName, | |
const char * | pszStyleString | |||
) |
Add a new style in the table. No comparison will be done on the Style string, only on the name.
pszName | the name the style to add. | |
pszStyleString | the style string to add. |
References IsExist().
Referenced by ModifyStyle().
OGRStyleTable * OGRStyleTable::Clone | ( | ) |
Duplicate style table.
The newly created style table is owned by the caller, and will have it's own reference to the OGRStyleTable.
References m_papszStyleTable.
Referenced by OGRDataSource::SetStyleTable(), and OGRLayer::SetStyleTable().
const char * OGRStyleTable::Find | ( | const char * | pszName | ) |
Get a style string by name.
pszName | the name of the style string to find. |
References IsExist().
const char * OGRStyleTable::GetStyleName | ( | const char * | pszStyleString | ) |
Get style name by style string.
pszStyleString | the style string to look up. |
Referenced by OGRStyleMgr::GetStyleName().
int OGRStyleTable::IsExist | ( | const char * | pszName | ) |
Get the index of a style in the table by its name.
pszName | the name to look for. |
Referenced by AddStyle(), Find(), and RemoveStyle().
GBool OGRStyleTable::LoadStyleTable | ( | const char * | pszFilename | ) |
Load a style table from a file.
pszFilename | the name of the file to load from. |
GBool OGRStyleTable::ModifyStyle | ( | const char * | pszName, | |
const char * | pszStyleString | |||
) |
Modify a style in the table by its name If the style does not exist, it will be added.
pszName | the name of the style to modify. | |
pszStyleString | the style string. |
References AddStyle(), and RemoveStyle().
void OGRStyleTable::Print | ( | FILE * | fpOut | ) |
Print a style table to a FILE pointer.
fpOut | the FILE pointer to print to. |
GBool OGRStyleTable::RemoveStyle | ( | const char * | pszName | ) |
Remove a style in the table by its name.
pszName | the name of the style to remove. |
References IsExist().
Referenced by ModifyStyle().
GBool OGRStyleTable::SaveStyleTable | ( | const char * | pszFilename | ) |
Save a style table to a file.
pszFilename | the name of the file to save to. |