ValueMapRenderer.h 1.7 KB
#pragma once
#ifndef _ValueMapRenderer_H_
#define _ValueMapRenderer_H_
#include<map>
using namespace std;
#include"Renderer.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
namespace DmapCore_30
{
	class ValueMapRendererComponent;
	class DataCollection;
	class clsCrSurf;
	class CORE_EXPORT ValueMapRenderer :public Renderer
	{
	public:
		ValueMapRenderer();
		~ValueMapRenderer();
		static ValueMapRenderer* CreateNew();
		virtual int RendererType();
		virtual bool Parse(boost::property_tree::ptree &pt, AppendBuffer *f);
		virtual bool DrawData(clsCrSurf* pClsCS, DataCollection* data, bool drawSimpleData, char* pFlag = NULL);
		virtual bool DrawData(clsCrSurf* pClsCS, DataCollection* data, int dataIndex, char* pFlag = NULL);
		virtual bool DrawLegend(clsCrSurf* pClsCS, shared_ptr<legendParamater> pLegendParamater,int layerType, char* pFlag = NULL);
		virtual void ToJson(AppendBuffer *ab);
		virtual bool ParsePtree( boost::property_tree::ptree &pt);
		const char* GetTag();
		bool SetTag(const char* sTag);
		Renderer* GetDefaultSymbol();
		bool SetDefaultSymbol(Renderer* defaultSymbol);
		const char* GetField();
		bool SetField(const char* sField);
		int GetComponentCount();
		ValueMapRendererComponent* GetComponent(int index);
		bool SetComponent(int index, ValueMapRendererComponent* component);
		bool AddComponent(ValueMapRendererComponent* component);
		bool RemoveComponent(int index);
		bool ClearComponents();


		void TryAddField(vector<string>&pvField);
		bool TryFindHeatRenderer(){ return false; }


		string m_sTag;
		Renderer* m_pDefaultSymbol;
		string m_sField;
		vector<ValueMapRendererComponent*> m_vComponents;
	};

}

#endif