#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ae/dataset.h" #include #include #include #include #include #include #include #include "schmgt/schmgt_bridge_itk.h" #include #include "cfm/cfm.h" #include "schmgt/schmgt_bridge_itk.h" #include #include "metaframework/BusinessObjectRef.hxx" #include "tccore/ItemRevision.hxx" #include "ps/ps.h" #include "sstream" #include #include #include #include #include "epm/EPMTask.hxx" #include "bom/bom.h" #include #include "spdlog/spdlog.h" #include "spdlog/sinks/basic_file_sink.h" #include "tccore/Item.hxx" // #include "excelreader.h" #include "libxl.h" using namespace std; using namespace libxl; using namespace spdlog; // using namespace excelreader; extern "C" int POM_AM__set_application_bypass(logical bypass); const char* newGUID(); bool isTypeOf(tag_t objtag, const char * type_name); void split(std::string s, const char* delim, std::vector* ret); void vecToArray(vector &vec, char ***arr); string WStringToString(const wstring& ws); wstring StringToWString(const string s); string getTime(); char* U2G(const char* utf8); char* G2U(const char* gb2312); std::string string_To_UTF8(const std::string str); string getTime2(); double stringToNum(string str); void getLatest(tag_t item, tag_t *rev); string get_excel_data(libxl::Book *book, libxl::Sheet *sheet, int row, int col); void trim(string &s); void log(const char* format, ...); void log2(string msg); #define SAFECALL( argument ) \ { \ int retcode = argument; \ if ( retcode != ITK_ok ) { \ const char* *err; \ const int *e1,*e2; \ int e; \ EMH_ask_errors(&e,&e1,&e2,&err); \ stringstream err_ss;\ for(auto e_i=0;e_i