dmprenderer.h 1.2 KB
/**************************************************************************
* file:              dmprenderer.h

* Author:            wanzhongping
* Date:              2021-07-02 17:59:05
* Email:             zhongpingw@chinadci.com
* copyright:         广州城市信息研究所有限公司
***************************************************************************/

#ifndef __dmprenderer_h__
#define __dmprenderer_h__

#include "dmap_core.h"
#include "dmprendercontext.h"
#include "dmpsymbol.h"
#include "dmpwkbtypes.h"
#include <string>

class DmpFeature;

//渲染器基类
class CORE_EXPORT DmpFeatureRenderer
{
  public:
    static DmpFeatureRenderer *DefaultRenderer(DmpWkbTypes::GeometryType geomType);
    virtual ~DmpFeatureRenderer();
    virtual bool RenderFeature(const DmpFeature &feature, DmpRenderContext &context, int layer = -1);
    virtual DmpSymbol *SymbolForFeature( const DmpFeature &feature, DmpRenderContext &context ) const = 0;
    virtual void StartRender(DmpRenderContext &context);
    virtual void StopRender(DmpRenderContext &context);

  protected:
    DmpFeatureRenderer(const std::string &type);
    std::string type_;

};


#endif //__dmprenderer_h__