clsPtree.h 1.6 KB
/**************************************************************************
* file:              clsPtree.h

* Author:            qingxiongf
* Date:              2021-12-29 16:52:09
* Email:             qingxiongf@chinadci.com
* copyright:         广州城市信息研究所有限公司
***************************************************************************/

#ifndef __clsPtree_h__
#define __clsPtree_h__

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
using namespace std;
namespace DmapCore_30
{
	class Renderer;
    class clsPtree
	{
	    public:
        static void ParseEnum(const char* name, boost::property_tree::ptree& pt,int, string a1 = "", string a2 = "", string a3 = "", string a4 = "", string a5 = "", string a6 = "", string a7 = "", string a8 = "", string a9 = "", string a10 = "", string a11 = "", string a12 = "", string a13 = "", string a14 = "", string a15 = "", string a16 = "");
        static void PtreeAttrParse(const char* name, boost::property_tree::ptree& pt, string &v);
        static void PtreeAttrParse(const char* name, boost::property_tree::ptree& pt, bool &v);
        static void PtreeAttrParse(const char* name, boost::property_tree::ptree& pt, double &v);
        static void PtreeAttrParse(const char* name, boost::property_tree::ptree& pt, int &v);
        static void PtreeAttrParse(const char* name, boost::property_tree::ptree& pt, long &v);
       // static void JsonAttrEnd(char* resultbuff);

        static void PtreeAttrParseColor(const char* name,const char*name2, boost::property_tree::ptree& pt, unsigned int&value);
    };
}

#endif // __clsPtree_h__