#include <ogr_featurestyle.h>
Public Member Functions | |
| OGRStyleMgr (OGRStyleTable *poDataSetStyleTable=NULL) | |
| Constructor. | |
| ~OGRStyleMgr () | |
| Destructor. | |
| GBool | SetFeatureStyleString (OGRFeature *, const char *pszStyleString=NULL, GBool bNoMatching=FALSE) |
| Set a style in a feature. | |
| const char * | InitFromFeature (OGRFeature *) |
| Initialize style manager from the style string of a feature. | |
| GBool | InitStyleString (const char *pszStyleString=NULL) |
| Initialize style manager from the style string. | |
| const char * | GetStyleName (const char *pszStyleString=NULL) |
| Get the name of a style from the style table. | |
| GBool | AddPart (OGRStyleTool *) |
| Add a part (style tool) to the current style. | |
| int | GetPartCount (const char *pszStyleString=NULL) |
| Get the number of parts in a style. | |
| OGRStyleTool * | GetPart (int hPartId, const char *pszStyleString=NULL) |
| Fetch a part (style tool) from the current style. | |
| OGRStyleMgr::OGRStyleMgr | ( | OGRStyleTable * | poDataSetStyleTable = NULL |
) |
Constructor.
This method is the same as the C function OGR_SM_Create()
| poDataSetStyleTable | (currently unused, reserved for future use), pointer to OGRStyleTable. Pass NULL for now. |
| OGRStyleMgr::~OGRStyleMgr | ( | ) |
Destructor.
This method is the same as the C function OGR_SM_Destroy()
| GBool OGRStyleMgr::AddPart | ( | OGRStyleTool * | poStyleTool | ) |
Add a part (style tool) to the current style.
This method is the same as the C function OGR_SM_AddPart().
| poStyleTool | the style tool defining the part to add. |
References OGRStyleTool::GetStyleString().
| OGRStyleTool * OGRStyleMgr::GetPart | ( | int | nPartId, | |
| const char * | pszStyleString = NULL | |||
| ) |
Fetch a part (style tool) from the current style.
This method is the same as the C function OGR_SM_GetPart().
| nPartId | the part number (0-based index). | |
| pszStyleString | (optional) the style string on which to operate. If NULL then the current style string stored in the style manager is used. |
References OGRStyleTool::SetStyleString().
| int OGRStyleMgr::GetPartCount | ( | const char * | pszStyleString = NULL |
) |
Get the number of parts in a style.
This method is the same as the C function OGR_SM_GetPartCount().
| pszStyleString | (optional) the style string on which to operate. If NULL then the current style string stored in the style manager is used. |
| const char * OGRStyleMgr::GetStyleName | ( | const char * | pszStyleString = NULL |
) |
Get the name of a style from the style table.
| pszStyleString | the style to search for, or NULL to use the style currently stored in the manager. |
References OGRStyleTable::GetStyleName().
Referenced by SetFeatureStyleString().
| const char * OGRStyleMgr::InitFromFeature | ( | OGRFeature * | poFeature | ) |
Initialize style manager from the style string of a feature.
This method is the same as the C function OGR_SM_InitFromFeature().
| poFeature | feature object from which to read the style. |
References OGRFeature::GetStyleString(), and InitStyleString().
| GBool OGRStyleMgr::InitStyleString | ( | const char * | pszStyleString = NULL |
) |
Initialize style manager from the style string.
This method is the same as the C function OGR_SM_InitStyleString().
| pszStyleString | the style string to use (can be NULL). |
Referenced by InitFromFeature().
| GBool OGRStyleMgr::SetFeatureStyleString | ( | OGRFeature * | poFeature, | |
| const char * | pszStyleString = NULL, |
|||
| GBool | bNoMatching = FALSE | |||
| ) |
Set a style in a feature.
| poFeature | the feature object to store the style in | |
| pszStyleString | the style to store | |
| bNoMatching | TRUE to lookup the style in the style table and add the name to the feature |
References GetStyleName(), and OGRFeature::SetStyleString().
1.5.7.1.