int TABLESPACE::MakeStatJson(time_t a_tCur) { char szBuff[DEF_MEM_BUF_128]; map<string, RESOURCE_ATTR *>::iterator it; RESOURCE_ATTR *pstRsc = NULL; DB_VALUE *pstData = NULL; CStmResRspApi encApi; CStmResRspApi decApi; std::string strData; encApi.Init(1, CStmResApi::RESAPI_RESULT_CODE_SUCCESS); for(it = m_pmapRsc->begin(); it != m_pmapRsc->end() ; it++) { pstRsc = it->second; pstData = (DB_VALUE*)it->second->pData; for(int i = 0; i < MAX_DB_IDX ; i++) { sprintf(szBuff, "%d", i+1); encApi[pstRsc->szID][szBuff].Init(a_tCur, m_pclsMain->GetNodeID(), Rounding(pstData->vecAvgValue[i], 2)); } } encApi.EncodeMessage(strData); m_pGroupRsc->strStatJson.assign(strData); return 0; }
USDCurrency() { static boost::shared_ptr<Data> usdData( new Data("U.S. dollar", "USD", 840, "$", "\xA2", 100, Rounding(), "%3% %1$.2f")); data_ = usdData; }
/* The ISO three-letter code is CZK; the numeric code is 203. It is divided in 100 haleru. */ CZKCurrency::CZKCurrency() { static boost::shared_ptr<Data> czkData( new Data("Czech koruna", "CZK", 203, "Kc", "", 100, Rounding(), "%1$.2f %3%")); data_ = czkData; }
/* The ISO three-letter code is MTL; the numeric code is 470. It is divided in 100 cents. */ MTLCurrency::MTLCurrency() { static boost::shared_ptr<Data> mtlData( new Data("Maltese lira", "MTL", 470, "Lm", "", 100, Rounding(), "%3% %1$.2f")); data_ = mtlData; }
/* The ISO three-letter code is CHF; the numeric code is 756. It is divided into 100 cents. */ CHFCurrency::CHFCurrency() { static boost::shared_ptr<Data> chfData( new Data("Swiss franc", "CHF", 756, "SwF", "", 100, Rounding(), "%3% %1$.2f")); data_ = chfData; }
/* The ISO three-letter code was TRL; the numeric code was 792. It was divided in 100 kurus. */ TRLCurrency::TRLCurrency() { static boost::shared_ptr<Data> trlData( new Data("Turkish lira", "TRL", 792, "TL", "", 100, Rounding(), "%1$.0f %3%")); data_ = trlData; }
/* The ISO three-letter code is BGL; the numeric code is 100. It is divided in 100 stotinki. */ BGLCurrency::BGLCurrency() { static boost::shared_ptr<Data> bglData( new Data("Bulgarian lev", "BGL", 100, "lv", "", 100, Rounding(), "%1$.2f %3%")); data_ = bglData; }
/* The ISO three-letter code is EEK; the numeric code is 233. It is divided in 100 senti. */ EEKCurrency::EEKCurrency() { static boost::shared_ptr<Data> eekData( new Data("Estonian kroon", "EEK", 233, "KR", "", 100, Rounding(), "%1$.2f %2%")); data_ = eekData; }
/* The ISO three-letter code is GBP; the numeric code is 826. It is divided into 100 pence. */ GBPCurrency::GBPCurrency() { static boost::shared_ptr<Data> gbpData( new Data("British pound sterling", "GBP", 826, "\xA3", "p", 100, Rounding(), "%3% %1$.2f")); data_ = gbpData; }
CADCurrency() { static boost::shared_ptr<Data> cadData( new Data("Canadian dollar", "CAD", 124, "Can$", "", 100, Rounding(), "%3% %1$.2f")); data_ = cadData; }
CLPCurrency() { static boost::shared_ptr<Data> clpData( new Data("Chilean peso", "CLP", 152, "Ch$", "", 100, Rounding(), "%3% %1$.0f")); data_ = clpData; }
BRLCurrency() { static boost::shared_ptr<Data> brlData( new Data("Brazilian real", "BRL", 986, "R$", "", 100, Rounding(), "%3% %1$.2f")); data_ = brlData; }
ARSCurrency() { static boost::shared_ptr<Data> arsData( new Data("Argentinian peso", "ARS", 32, "", "", 100, Rounding(), "%2% %1$.2f")); data_ = arsData; }
VEBCurrency() { static boost::shared_ptr<Data> vebData( new Data("Venezuelan bolivar", "VEB", 862, "Bs", "", 100, Rounding(), "%3% %1$.2f")); data_ = vebData; }
/* The ISO three-letter code is SEK; the numeric code is 752. It is divided in 100 öre. */ SEKCurrency::SEKCurrency() { static boost::shared_ptr<Data> sekData( new Data("Swedish krona", "SEK", 752, "kr", "", 100, Rounding(), "%1$.2f %3%")); data_ = sekData; }
/* The ISO three-letter code is HUF; the numeric code is 348. It has no subdivisions. */ HUFCurrency::HUFCurrency() { static boost::shared_ptr<Data> hufData( new Data("Hungarian forint", "HUF", 348, "Ft", "", 1, Rounding(), "%1$.0f %3%")); data_ = hufData; }
/* The ISO three-letter code is SIT; the numeric code is 705. It is divided in 100 stotinov. */ SITCurrency::SITCurrency() { static boost::shared_ptr<Data> sitData( new Data("Slovenian tolar", "SIT", 705, "SlT", "", 100, Rounding(), "%1$.2f %3%")); data_ = sitData; }
/* The ISO three-letter code is ISK; the numeric code is 352. It is divided in 100 aurar. */ ISKCurrency::ISKCurrency() { static boost::shared_ptr<Data> iskData( new Data("Iceland krona", "ISK", 352, "IKr", "", 100, Rounding(), "%1$.2f %3%")); data_ = iskData; }
/* The ISO three-letter code is TRY; the numeric code is 949. It is divided in 100 new kurus. */ TRYCurrency::TRYCurrency() { static boost::shared_ptr<Data> tryData( new Data("New Turkish lira", "TRY", 949, "YTL", "", 100, Rounding(), "%1$.2f %3%")); data_ = tryData; }
/* The ISO three-letter code is LTL; the numeric code is 440. It is divided in 100 centu. */ LTLCurrency::LTLCurrency() { static boost::shared_ptr<Data> ltlData( new Data("Lithuanian litas", "LTL", 440, "Lt", "", 100, Rounding(), "%1$.2f %3%")); data_ = ltlData; }
/* The ISO three-letter code is BYR; the numeric code is 974. It has no subdivisions. */ BYRCurrency::BYRCurrency() { static boost::shared_ptr<Data> byrData( new Data("Belarussian ruble", "BYR", 974, "BR", "", 1, Rounding(), "%2% %1$.0f")); data_ = byrData; }
/* The ISO three-letter code is LVL; the numeric code is 428. It is divided in 100 santims. */ LVLCurrency::LVLCurrency() { static boost::shared_ptr<Data> lvlData( new Data("Latvian lat", "LVL", 428, "Ls", "", 100, Rounding(), "%3% %1$.2f")); data_ = lvlData; }
/* The ISO three-letter code is SKK; the numeric code is 703. It is divided in 100 halierov. */ SKKCurrency::SKKCurrency() { static boost::shared_ptr<Data> skkData( new Data("Slovak koruna", "SKK", 703, "Sk", "", 100, Rounding(), "%1$.2f %3%")); data_ = skkData; }
/* The ISO three-letter code is NOK; the numeric code is 578. It is divided in 100 øre. */ NOKCurrency::NOKCurrency() { static boost::shared_ptr<Data> nokData( new Data("Norwegian krone", "NOK", 578, "NKr", "", 100, Rounding(), "%3% %1$.2f")); data_ = nokData; }
/* The ISO three-letter code is CYP; the numeric code is 196. It is divided in 100 cents. */ CYPCurrency::CYPCurrency() { static boost::shared_ptr<Data> cypData( new Data("Cyprus pound", "CYP", 196, "\xA3" "C", "", 100, Rounding(), "%3% %1$.2f")); data_ = cypData; }
/* The ISO three-letter code is PLN; the numeric code is 985. It is divided in 100 groszy. */ PLNCurrency::PLNCurrency() { static boost::shared_ptr<Data> plnData( new Data("Polish zloty", "PLN", 985, "zl", "", 100, Rounding(), "%1$.2f %3%")); data_ = plnData; }
/* The ISO three-letter code is DKK; the numeric code is 208. It is divided in 100 øre. */ DKKCurrency::DKKCurrency() { static boost::shared_ptr<Data> dkkData( new Data("Danish krone", "DKK", 208, "Dkr", "", 100, Rounding(), "%3% %1$.2f")); data_ = dkkData; }
/* The ISO three-letter code was ROL; the numeric code was 642. It was divided in 100 bani. */ ROLCurrency::ROLCurrency() { static boost::shared_ptr<Data> rolData( new Data("Romanian leu", "ROL", 642, "L", "", 100, Rounding(), "%1$.2f %3%")); data_ = rolData; }
/* The ISO three-letter code is ZAR; the numeric code is 710. It is divided into 100 cents. */ ZARCurrency::ZARCurrency() { static boost::shared_ptr<Data> zarData( new Data("South-African rand", "ZAR", 710, "R", "", 100, Rounding(), "%3% %1$.2f")); data_ = zarData; }
TTDCurrency() { static boost::shared_ptr<Data> ttdData( new Data("Trinidad & Tobago dollar", "TTD", 780, "TT$", "", 100, Rounding(), "%3% %1$.2f")); data_ = ttdData; }