[Gdal-dev] Quick Question Regarding Style String Management

L Pool marisap at telkomsa.net
Sat May 15 12:52:15 EDT 2004


Hi Frank,

I've got a quick question for you - regarding the code below: which of these
objects should I delete when I'm finished with it - the Style Manager and
the Style Tool or just the Style Manager?

      OGRStyleTable oStyleTable;
      OGRStyleTool* poStyleTool;
      OGRStyleMgr*  poStyleMgr = new OGRStyleMgr(&oStyleTable);

      poStyleMgr->GetStyleString(poFeature);
      for (int k=0; k < poStyleMgr->GetPartCount(); k++)
      {
         poStyleTool = poStyleMgr->GetPart(k);
         switch(poStyleTool->GetType())
         {
           case OGRSTCNone: cout << "Tool Type: None" << endl;
            break;
           case OGRSTCPen: cout << "Tool Type: Pen" << endl;
            break;
           case OGRSTCBrush: cout << "Tool Type: Brush" << endl;
            break;
           case OGRSTCSymbol: cout << "Tool Type: Symbol" << endl;
            break;
           case OGRSTCLabel: cout << "Tool Type: Label" << endl;
            break;
         }
      }

Thanks in advance,

Louis Pool.

BTW: Everything seems to be working super now with the new OpenEV_FW
binaries.




More information about the Gdal-dev mailing list