commit a8a1bf7814e73e70f88d18ff644cc8fe37eac2bf Author: lijh Date: Tue Mar 10 13:53:28 2026 +0800 first commit diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..e257ff9 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "无配置" +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..9ab8b08 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,9 @@ +{ + "ExpandedNodes": [ + "", + "\\jf_erp_check_project", + "\\jf_itk" + ], + "SelectedNode": "\\jf_itk\\yb_send_to_erp.cpp", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/YBPLM_itk/v16/.suo b/.vs/YBPLM_itk/v16/.suo new file mode 100644 index 0000000..cb153fa Binary files /dev/null and b/.vs/YBPLM_itk/v16/.suo differ diff --git a/.vs/YBPLM_itk/v16/Browse.VC.db b/.vs/YBPLM_itk/v16/Browse.VC.db new file mode 100644 index 0000000..915333c Binary files /dev/null and b/.vs/YBPLM_itk/v16/Browse.VC.db differ diff --git a/.vs/YB_ERP_ITK/v16/.suo b/.vs/YB_ERP_ITK/v16/.suo new file mode 100644 index 0000000..474ef05 Binary files /dev/null and b/.vs/YB_ERP_ITK/v16/.suo differ diff --git a/.vs/YB_ERP_ITK/v16/Browse.VC.db b/.vs/YB_ERP_ITK/v16/Browse.VC.db new file mode 100644 index 0000000..e90de2b Binary files /dev/null and b/.vs/YB_ERP_ITK/v16/Browse.VC.db differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..c59e1d2 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/DFLPLM_itk.VC.db b/DFLPLM_itk.VC.db new file mode 100644 index 0000000..822900b Binary files /dev/null and b/DFLPLM_itk.VC.db differ diff --git a/DFLPLM_itk.sdf b/DFLPLM_itk.sdf new file mode 100644 index 0000000..65f4db0 Binary files /dev/null and b/DFLPLM_itk.sdf differ diff --git a/DFLPLM_itk.suo b/DFLPLM_itk.suo new file mode 100644 index 0000000..e85e19f Binary files /dev/null and b/DFLPLM_itk.suo differ diff --git a/DFLPLM_itk.v11.suo b/DFLPLM_itk.v11.suo new file mode 100644 index 0000000..a50923f Binary files /dev/null and b/DFLPLM_itk.v11.suo differ diff --git a/WFPLM_itk.suo b/WFPLM_itk.suo new file mode 100644 index 0000000..1b1c66d Binary files /dev/null and b/WFPLM_itk.suo differ diff --git a/YBPLM_itk.sdf b/YBPLM_itk.sdf new file mode 100644 index 0000000..0ad1135 Binary files /dev/null and b/YBPLM_itk.sdf differ diff --git a/YBPLM_itk.sln b/YBPLM_itk.sln new file mode 100644 index 0000000..3a65d5a --- /dev/null +++ b/YBPLM_itk.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JK_itk", "jf_itk\jf_itk.vcxproj", "{AEABC483-FCBD-45F5-9884-8FA4C5A9892D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Debug|Win32.ActiveCfg = Debug|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Debug|Win32.Build.0 = Debug|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Debug|x64.ActiveCfg = Debug|x64 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Debug|x64.Build.0 = Debug|x64 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Release|Itanium.ActiveCfg = Release|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Release|Win32.ActiveCfg = Release|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Release|Win32.Build.0 = Release|Win32 + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D}.Release|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/YB_ERP_ITK.zip b/YB_ERP_ITK.zip new file mode 100644 index 0000000..285dfff Binary files /dev/null and b/YB_ERP_ITK.zip differ diff --git a/hz_itk.opensdf b/hz_itk.opensdf new file mode 100644 index 0000000..738a347 Binary files /dev/null and b/hz_itk.opensdf differ diff --git a/jf_erp_check_project/Release/CL.read.1.tlog b/jf_erp_check_project/Release/CL.read.1.tlog new file mode 100644 index 0000000..7cd59ed Binary files /dev/null and b/jf_erp_check_project/Release/CL.read.1.tlog differ diff --git a/jf_erp_check_project/Release/CL.write.1.tlog b/jf_erp_check_project/Release/CL.write.1.tlog new file mode 100644 index 0000000..b0408b5 Binary files /dev/null and b/jf_erp_check_project/Release/CL.write.1.tlog differ diff --git a/jf_erp_check_project/Release/cl.command.1.tlog b/jf_erp_check_project/Release/cl.command.1.tlog new file mode 100644 index 0000000..f9b3c2f Binary files /dev/null and b/jf_erp_check_project/Release/cl.command.1.tlog differ diff --git a/jf_erp_check_project/Release/common_itk_util.obj b/jf_erp_check_project/Release/common_itk_util.obj new file mode 100644 index 0000000..daf8fc3 Binary files /dev/null and b/jf_erp_check_project/Release/common_itk_util.obj differ diff --git a/jf_erp_check_project/Release/jf3_main.obj b/jf_erp_check_project/Release/jf3_main.obj new file mode 100644 index 0000000..9acd057 Binary files /dev/null and b/jf_erp_check_project/Release/jf3_main.obj differ diff --git a/jf_erp_check_project/Release/jf_erp_check_project.lastbuildstate b/jf_erp_check_project/Release/jf_erp_check_project.lastbuildstate new file mode 100644 index 0000000..85a14fb --- /dev/null +++ b/jf_erp_check_project/Release/jf_erp_check_project.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|F:\Connor(项目管理)\继峰项目\签名\jf_itk\| diff --git a/jf_erp_check_project/Release/jf_erp_check_project.log b/jf_erp_check_project/Release/jf_erp_check_project.log new file mode 100644 index 0000000..76f11ac --- /dev/null +++ b/jf_erp_check_project/Release/jf_erp_check_project.log @@ -0,0 +1,44 @@ +生成启动时间为 2015/9/17 16:50:45。 + 1>项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_check_project\jf_erp_check_project.vcxproj”在节点 2 上(build 个目标)。 + 1>InitializeBuildStatus: + 正在对“Release\jf_erp_check_project.unsuccessfulbuild”执行 Touch 任务。 + ClCompile: + 所有输出均为最新。 + 所有输出均为最新。 + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_check_project.dll" /INCREMENTAL:NO /NOLOGO "F:\Teamcenter10.1.0Env\tcbin\lib\*.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\jf_erp_check_project.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_check_project.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_check_project.lib" /MACHINE:X86 /DLL Release\common_itk_util.obj + Release\jf3_main.obj + Release\ocilib.obj + Release\string_helper.obj + Release\string_utils.obj + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__MEM_alloc + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__MEM_free + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__TC_write_syslog + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__POM_ask_session + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__ITK__convert_tag_to_uid + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 _AM__set_application_bypass + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtPrepare + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCILogon + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIHandleFree + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIBindByPos + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIEnvCreate + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIBindByName + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIErrorGet + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCILogoff + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIDefineByPos + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIHandleAlloc + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIAttrGet + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtFetch2 + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtExecute + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strncpy + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strcat + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__STRNG_replace_str + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strstr + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strcpy + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strlen + 1>F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_check_project.dll : fatal error LNK1120: 25 个无法解析的外部命令 + 1>已完成生成项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_check_project\jf_erp_check_project.vcxproj”(build 个目标)的操作 - 失败。 + +生成失败。 + +已用时间 00:00:00.48 diff --git a/jf_erp_check_project/Release/jf_erp_check_project.unsuccessfulbuild b/jf_erp_check_project/Release/jf_erp_check_project.unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_check_project/Release/jf_erp_check_project.write.1.tlog b/jf_erp_check_project/Release/jf_erp_check_project.write.1.tlog new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_check_project/Release/link.command.1.tlog b/jf_erp_check_project/Release/link.command.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_check_project/Release/link.command.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_check_project/Release/link.read.1.tlog b/jf_erp_check_project/Release/link.read.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_check_project/Release/link.read.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_check_project/Release/link.write.1.tlog b/jf_erp_check_project/Release/link.write.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_check_project/Release/link.write.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_check_project/Release/ocilib.obj b/jf_erp_check_project/Release/ocilib.obj new file mode 100644 index 0000000..a42cfcd Binary files /dev/null and b/jf_erp_check_project/Release/ocilib.obj differ diff --git a/jf_erp_check_project/Release/string_helper.obj b/jf_erp_check_project/Release/string_helper.obj new file mode 100644 index 0000000..d01637c Binary files /dev/null and b/jf_erp_check_project/Release/string_helper.obj differ diff --git a/jf_erp_check_project/Release/string_utils.obj b/jf_erp_check_project/Release/string_utils.obj new file mode 100644 index 0000000..f815e15 Binary files /dev/null and b/jf_erp_check_project/Release/string_utils.obj differ diff --git a/jf_erp_check_project/Release/vc100.pdb b/jf_erp_check_project/Release/vc100.pdb new file mode 100644 index 0000000..2167f78 Binary files /dev/null and b/jf_erp_check_project/Release/vc100.pdb differ diff --git a/jf_erp_check_project/common_itk_util.c b/jf_erp_check_project/common_itk_util.c new file mode 100644 index 0000000..730d9c4 --- /dev/null +++ b/jf_erp_check_project/common_itk_util.c @@ -0,0 +1,290 @@ +/** +* @file common_itk_util.cpp +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 18-July-2008 James +*/ + +#pragma warning (disable: 4996) +#pragma warning (disable: 4819) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include +//#include +//#include + +#include +//#include +#include +#include +//#include +//#include +#include "error_handling.h" +#include "common_itk_util.h" + +#ifdef WIN32 +#include +#include +#else +#include +#endif + + +#define ARGS_LENGTH 200 +#define ARGS_NAME_DEBUG "-debug" +#define DEBUG "-debug=" +#define MAX_PRINTLINE_LENGTH 2000 +#define MAX_PATH_LENGTH 2000 +#define MAX_ARGUMENT_LENGTH 400 +#define MAX_PARAMNAME_LENGTH 50 +#define MAX_FILE_EXT_LENGTH 10 +#define TRUE_FLAG 1 +#define FALSE_FLAG 0 +#define DETAILLOG 1 + +extern "C" int AM__set_application_bypass(logical bypass); + +void ECHO(char *format, ...) +{ + //if( !YFJC_OPT_DEBUG ) + // return; + + char msg[1024]; + va_list args; + + va_start( args, format ); + vsprintf( msg, format, args ); + va_end( args ); + + printf( msg ); + TC_write_syslog( msg ); +} + +FILE* logFile = NULL; + +void set_bypass(logical bypass) +{ + AM__set_application_bypass(bypass); +} +/*=============================================================================* + * FUNCTION: current_time + * PURPOSE : get the current datetime + * INPUT: + * date_t* date_tag // current date time tag + * + * RETURN: + * void + *============================================================================*/ +void current_time( date_t * date_tag ) +{ + time_t ltime; + struct tm *today ; + + // Set time zone from TZ environment variable. If TZ is not set, + // the operating system is queried to obtain the default value + // for the variable. + // + //_tzset(); + + // Get UNIX-style time and display as number and string. + time( <ime ); + + today = localtime( <ime ); + date_tag->year = today->tm_year + 1900 ; + date_tag->month = today->tm_mon ; + date_tag->day = today->tm_mday ; + date_tag->hour = today->tm_hour ; + date_tag->minute = today->tm_min ; + date_tag->second = today->tm_sec ; +} +/*=============================================================================* + * FUNCTION: CreateLogFile + * PURPOSE : create log file + * INPUT: + * char* FunctionName // the funtion which need to create log file + * FILE** logFile // out: the log file pointer + * + * RETURN: + * void + *============================================================================*/ +void CreateLogFile(char* FunctionName, char **fullname) +{ + int i=0, ifail = ITK_ok; + //date_t status_now; + //char* date_string = NULL; + char date_string[MAX_PATH_LENGTH]; + char logFileDir[MAX_PATH_LENGTH]; + char logFileName[MAX_PATH_LENGTH]; + + char* session_uid = NULL; + tag_t session_tag = NULLTAG; + time_t now; + struct tm *p; + + time(&now); + + logFile = NULL; + //current_time(&status_now); + p=localtime(&now); + + memset(date_string, 0, sizeof(date_string)); + sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec ); + //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok ) + //ifail = ITK_date_to_string (status_now, &date_string ); + //if (ifail) + //{ + // printf("!*ERROR*!: Failed to get current date time\n"); + // goto CLEANUP; + //} + + memset(logFileDir, 0, sizeof(logFileDir)); + memset(logFileName, 0, sizeof(logFileName)); + //get log dir + sprintf(logFileDir, "%s", getenv("TEMP")); + printf("\n log file dir: %s\n", logFileDir); + //try to change dir to TC_USER_LOG_DIR + if(chdir(logFileDir)!=ITK_ok) + { + //not set TC_USER_LOG_DIR + //log in to default TC_LOG + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TC_LOG")); + printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir); + if(chdir(logFileDir)!=ITK_ok) + { + //still can not change to log dir + printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n"); + goto CLEANUP; + } + } + + //get session_uid to make sure the log file name unique + POM_ask_session(&session_tag); + ITK__convert_tag_to_uid(session_tag, &session_uid); + + + //get logFileName + sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string); + printf("log file name: %s\n", logFileName); + + *fullname = (char *)MEM_alloc(sizeof(char)*512); + sprintf(*fullname,"%s\\%s",logFileDir,logFileName); + + //for(i = 0; _access((char *)logFileName, 4) == 0; i++) + /*{ + memset(logFileName, 0, sizeof(logFileName)); + sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i); + } + printf("final log file name: %s\n", logFileName);*/ + + //create log file + logFile = fopen(logFileName, "w"); + +CLEANUP: + //DOFREE(date_string); + DOFREE(session_uid); +} + + +/*=============================================================================* + * FUNCTION: WriteLog + * PURPOSE : write log, if debug log File not null, write log message to log File + * INPUT: + * const char* format // debug message string + * + * RETURN: + * void + *============================================================================*/ +void WriteLog(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + + if(logFile) + { + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + + //----------print to command window for trace--------// + printf("%s\n", tmp); + + //print message to log file + fprintf(logFile, "%s\n", tmp); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} + +void CloseLog(void) +{ + if(logFile) + { + fclose(logFile); + logFile = NULL; + } +} + +//void getTypeinfo(char *type) +//{ +// int ulen = 0,i=0,tempcount=0,asd=0; +// +// char temp[128]=""; +// ulen = strlen(type); +// asd = ulen-1; +// for(i=0;i < ulen;i++) +// { +// if(type[i] == ';') +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// strcpy(temp,""); +// tempcount = 0; +// typecount = typecount + 1; +// } +// else +// { +// +// temp[tempcount] = type[i]; +// tempcount = tempcount + 1; +// if(i==asd) +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// typecount = typecount + 1; +// } +// +// } +// +// } +//} \ No newline at end of file diff --git a/jf_erp_check_project/common_itk_util.h b/jf_erp_check_project/common_itk_util.h new file mode 100644 index 0000000..b08db85 --- /dev/null +++ b/jf_erp_check_project/common_itk_util.h @@ -0,0 +1,42 @@ +/** +* @file common_itk_util.h +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef COMMON_ITK_UTIL +#define COMMON_ITK_UTIL + +#ifdef __cplusplus + + +extern "C" { +#endif + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} +void ECHO(char *format, ...); +void CreateLogFile(char* FunctionName, char **fullname); +void WriteLog(const char* format, ...); +void CloseLog(void); +void set_bypass(logical bypass); +//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] ); +//int CompareDate( date_t date1, date_t date2 ); +//int GetRandomTempFile( char tempFile[256] ); +//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] ); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/jf_erp_check_project/error_handling.h b/jf_erp_check_project/error_handling.h new file mode 100644 index 0000000..b6b8099 --- /dev/null +++ b/jf_erp_check_project/error_handling.h @@ -0,0 +1,160 @@ +/*! +* @addtogroup common +* \file error_handling.h +* \brief +* \date 2008/6/10 +* \author Ray Li +*/ + +#ifndef SIMPLE_ERR_H_INCLUDED +#define SIMPLE_ERR_H_INCLUDED + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define BUFSIZE 512 + + +// +//#define HANDLER_ARGUMENT_ERROR EMH_USER_error_base + 1 +//#define WORKFLOW_NODE_IS_NOT_VALID EMH_USER_error_base + 2 +//#define HANDLER_PLACED_INVALID EMH_USER_error_base + 3 +// +////user errors define +////վļȱ %1$ ã +//#define ERROR_PREFERENCE_NOT_FOUND (EMH_USER_error_base + 100) + + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + + + +//#define ECHO(X) printf X; +#define SYS_LOG(X) IMAN_write_syslog X; +#define LOG_ECHO(X) printf X; IMAN_write_syslog X; + + + +/*! +* \def CALL(x) +* ӡϢ +*/ +#define CALL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + LOG_ECHO( ("ERROR: %d ERROR MSG: %s.\n",stat, err_string) ) \ + LOG_ECHO( ("Function: %s FILE: %s LINE: %d\n", #x, __FILE__, __LINE__ ) ) \ + MEM_free (err_string); \ + return (stat); \ + } \ +} + +/*! +* \def DO(x) +* ӡϢ +*/ +#define DO(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != POM_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + } \ +} + +/*! +* \def CALLRNULL(x) +* ӡϢ +*/ +#define CALLRNULL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + return ((char *)NULL); \ + } \ +} + +/*! +* \def CALL2(x) +* ӡϢ +*/ +#define CALL2(x) { \ + int stat, n_ifails, *serverities, *ifails, err_count; \ + char *err_string, **texts; \ + if( (stat = (x)) != ITK_ok) \ + { \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + EMH_ask_errors( &n_ifails, (const int**)(&serverities), (const int**)(&ifails), (const char***)(&texts) );\ + for( err_count=0; err_count + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {5B00E072-1EDF-4670-81F0-555DB0C78516} + Win32Proj + jf_erp_check_project + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + false + false + + + false + false + + + false + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + IPLIB=none;WIN32;NDEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + IPLIB=none;WIN32;NDEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + IPLIB=none;WIN32;NDEBUG;_WINDOWS;_USRDLL;JF_ERP_CHECK_PROJECT_EXPORTS;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jf_erp_check_project/jf_erp_check_project.vcxproj.filters b/jf_erp_check_project/jf_erp_check_project.vcxproj.filters new file mode 100644 index 0000000..1717db4 --- /dev/null +++ b/jf_erp_check_project/jf_erp_check_project.vcxproj.filters @@ -0,0 +1,57 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {65de63f5-1c56-4dd5-8613-cf9edb74ee2c} + + + + + 源文件 + + + common + + + common + + + common + + + common + + + + + 头文件 + + + common + + + common + + + common + + + common + + + common + + + \ No newline at end of file diff --git a/jf_erp_check_project/jf_erp_check_project.vcxproj.user b/jf_erp_check_project/jf_erp_check_project.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/jf_erp_check_project/jf_erp_check_project.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/jf_erp_check_project/ocilib.cxx b/jf_erp_check_project/ocilib.cxx new file mode 100644 index 0000000..30151e3 --- /dev/null +++ b/jf_erp_check_project/ocilib.cxx @@ -0,0 +1,440 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.cxx + Module : OCI + + This file describes OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include "ocilib.h" +#include + +#define NUM 100 +#define USERNAME "infodba" +#define PASSWORD "infodba" +#define DBNAME "tc" + + +// ṹ +typedef struct{ + OCIEnv *p_env; //OCI environment handle + OCIError *p_err; //OCI error handle + OCISvcCtx *p_svc; //OCI service context handel ľ + OCIServer *p_ser; //OCI server handle + OCISession *p_usr; //OCI user session handle ûỰ + OCIStmt *p_sql; //OCI statement handle + OCIDefine *p_dfn; //OCI define handle + OCIBind *p_bnd; //OCI bind handle 󶨾 +}OCIHandleInfo; + + +// ṹ +typedef struct{ + OCIEnv *p_env; + OCIError *p_err; + OCISvcCtx *p_svc; + OCIStmt *p_sql; + OCIDefine *p_dfn; + OCIBind *p_bnd; +}OCIDATA; + + +// ִʱ +typedef struct{ + char value[NUM][NUM]; + char type[NUM][NUM]; +}SqlField; + + +// ѯʱ, +typedef struct{ + int naIntValue[NUM]; + int nIntNum; + char caCharValue[500][500]; + int nCharNum; +}SqlSelField; + +OCIHandleInfo *ociHandle = NULL; +OCIHandleInfo ociHand; + +int InitHandle(); +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount); +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField); +int GetDataFromQuery(int *pRc, SqlSelField *pOutField); +void QuitFreeHandle(); + + + + +/**************************************************************************************************************************************** +ƣ +ܣ +ڲ +ڲ + ע +*****************************************************************************************************************************************/ + + +// ʼHandler +int InitHandle() +{ + int swResult; + + ociHandle = &ociHand; + + + /*create OCI environment*/ + if(swResult = OCIEnvCreate(&ociHandle->p_env,OCI_DEFAULT,NULL,NULL,NULL,NULL,0,NULL)) // + { + printf("environment create error!\n\n"); + return -1; + } + else + { + printf("environment create success!\n\n"); + //return 0; + } + + /*init handle*/ + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_ser,OCI_HTYPE_SERVER,0,NULL)) // + { + printf("init server handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_err,OCI_HTYPE_ERROR,0,NULL)) // + { + printf("init error handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_usr,OCI_HTYPE_SESSION,0,NULL)) // + { + printf("init session handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_svc,OCI_HTYPE_SVCCTX,0,NULL)) //ľ + { + printf("init service context handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_sql,OCI_HTYPE_STMT,0,NULL)) //SQL + { + printf("init statement handle error!\n\n"); + return -1; + } + + printf("init handle success!\n\n"); + + return 0; +} + + + +// ݿ +int ConnServer(char *username,char *password,char *dbname) +{ + int swResult; + char errbuf[100]={0}; + int errcode; + + if(InitHandle() == -1)//ʼ + return -1; + + if(swResult = OCILogon(ociHandle->p_env,ociHandle->p_err,&ociHandle->p_svc,(text *)username,strlen(username),(text *)password,strlen(password),(text *)dbname,strlen(dbname))) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Error - %.*s/n", 512, errbuf); + return -1; + } + else + printf("ݿӳɹ!\n\n"); + return 0; +} + + + +// SQLij(ִSQL) +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount) +{ + int swResult,i; + int errcode; + + //ð󶨱 + OCIBind *p_bndp[100]; + + //׼SQL + if(swResult = OCIStmtPrepare(ociHandle->p_sql,ociHandle->p_err,(text *)SQL,strlen(SQL),OCI_NTV_SYNTAX,OCI_DEFAULT)) + { + printf("prepare SQL statements error!\n\n"); + } + else + { + printf("prepare SQL statements success!\n\n"); + } + + + // + for(i=0;ip_sql,&p_bndp[i],ociHandle->p_err,i+1,(dvoid *)inputValue[i],(sb4)strlen(inputValue[i])+1,SQLT_STR, (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Bind Error - %.*s/n", 512, errbuf); + return -1; + } + } + + //ִSQL statements + if(swResult = OCIStmtExecute(ociHandle->p_svc,ociHandle->p_sql,ociHandle->p_err,1,0,NULL,NULL,OCI_DEFAULT)) + { + char errbuf[100]={0}; + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL statement Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL statement success!\n\n"); + } + return 0; +} + + + + +// ѯSQL +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField ) +{ + sword status; + int rc= 0,ret=0; + char errbuf[100]={0}; + int maxNum = 2048; + char chTag[8]; + int iIndex = 0; + int outputColumn = 0; + int errcode=0; + char nullValue = '\0'; // + sb2 sb2aInd[30] = {'\0'}; + + // ׼SQL + status = OCIStmtPrepare(ociHandle->p_sql, ociHandle->p_err, (text *)SQL,(ub4)strlen(SQL), (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT); + + if (status != OCI_SUCCESS) + { + printf("SQL Preparing failed/n"); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + memset(chTag, 0, 8); + sprintf(chTag, ":%d", iIndex+1); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->naIntValue[iIndex], sizeof(int), SQLT_INT,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + // char *͵, SQLʱ :3,:4, + for (iIndex=0; iIndexnCharNum; iIndex++) + { + int n=0; + memset(chTag, 0, 8); + n = pSelField->nIntNum + iIndex +1; + sprintf(chTag, ":%d", n); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->caCharValue[iIndex], NUM, SQLT_STR,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // ִSQL + if (rc = OCIStmtExecute(ociHandle->p_svc, ociHandle->p_sql, ociHandle->p_err, (ub4) 0, (ub4) 0,(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_STMT_SCROLLABLE_READONLY)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL success!\n\n"); + } + + + if (ret = OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) &outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Get OCIAttr Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + if(rc = OCIDefineByPos(ociHandle->p_sql, &ociHandle->p_dfn, ociHandle->p_err, iIndex+1, (dvoid *)&pOutField->naIntValue[iIndex], sizeof(int), SQLT_INT, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // char *͵, SQLʱ :1,:2, + for (iIndex=0; iIndexp_sql, &ociHandle->p_dfn, ociHandle->p_err, n, (dvoid *)&pOutField->caCharValue[iIndex], 1000*sizeof(char), SQLT_STR, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + return 0; + +} + + + +// ͷHandler +void QuitFreeHandle() +{ + // ˳ + OCILogoff(ociHandle->p_svc,ociHandle->p_err); + printf("Quit success!\n"); + + // ͷž + OCIHandleFree(ociHandle->p_ser,OCI_HTYPE_SERVER); //ͷŷ + OCIHandleFree(ociHandle->p_err,OCI_HTYPE_ERROR); //ͷŴ + OCIHandleFree(ociHandle->p_usr,OCI_HTYPE_SESSION); //ͷ + OCIHandleFree(ociHandle->p_svc,OCI_HTYPE_SVCCTX); //ͷľ + OCIHandleFree(ociHandle->p_sql,OCI_HTYPE_STMT); //ͷSQL +} + + +// ִ +int ExecuteSQL(char *SQL,int valueCount,char **value) +{ + int i=0; + + if(i=_ExeSQL(SQL,value,valueCount)) + { + QuitFreeHandle(); + return -1; + } + + return 0; +} + + +// IJѯ +int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + int i = 0, j=0 ,ret =0; + + int times = 0, temp=0; + + SqlSelField infield; + SqlSelField outField; + + // ʼṹ + infield.nCharNum = inputValueCount; + infield.nIntNum = 0; + outField.nCharNum = 0; + outField.nIntNum = 0; + + * outputColumn = 0; + * outputValueCount = 0; + + for(i=0;ip_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err); + + // ȡһ,ȥ + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_LAST,0, OCI_DEFAULT); + // ȡ + ret= OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputValueCount, (ub4 *) 0, (ub4)OCI_ATTR_ROW_COUNT, ociHandle->p_err); + + if(*outputValueCount == 0) + return 0; + + + // ʼڴ沢Ҵ洢 + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_FIRST,0, OCI_DEFAULT); + *outputValue = (char ***) calloc ((*outputValueCount)+1,sizeof(char**)); + do + { + (*outputValue)[i] = (char **) calloc ((*outputColumn)+1,sizeof(char *)); + for(j=0;j<(*outputColumn);j++) + { + (*outputValue)[i][j] = (char *) calloc (1000,sizeof(char)); + strcpy((*outputValue)[i][j],outField.caCharValue[j]); + //printf("outValue[%d][%d] = %s , ַ=%d, ַָ= %d\n ",i,j,(*outputValue)[i][j],&(*outputValue)[i][j],(*outputValue)[i][j]); + } + i++; + } + while((ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_NEXT, 1, OCI_DEFAULT)!= OCI_NO_DATA)); + + return 0; +} + + +// IJѯ +int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + return QuerySQL(SQL,0,NULL,outputColumn,outputValueCount,outputValue); +} + +// ޲ +int ExecuteSQLNoInputParam(char *SQL) +{ + return ExecuteSQL(SQL,0,NULL); +} + +// Ͽ +void DisConnServer() +{ + if(ociHandle != NULL) + QuitFreeHandle(); +} + diff --git a/jf_erp_check_project/ocilib.h b/jf_erp_check_project/ocilib.h new file mode 100644 index 0000000..0a4e752 --- /dev/null +++ b/jf_erp_check_project/ocilib.h @@ -0,0 +1,98 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.h + Module : OCI + + This Header file of OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include +#include +#include +#include +#include +//#include + +#define OCI_FAIL 1 +#define OCI_OK 0 + +#ifdef __cplusplus +extern "C" +{ +#endif + /** + * ݿ. + * @param username - û + * @param password - + * @param dbname - ݿSID + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ConnServer(char *username,char *password,char *dbname); + + + /** + * ִSQL. + * @param SQL - SQL + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQLNoInputParam(char *SQL); + + /** + * ִSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQL(char *SQL,int inputValueCount,char **inputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * Ͽݿ. + * + * ORACLE ݿװ + */ + extern void DisConnServer(); + +#ifdef __cplusplus +} +#endif diff --git a/jf_erp_check_project/string_helper.cpp b/jf_erp_check_project/string_helper.cpp new file mode 100644 index 0000000..553e6f3 --- /dev/null +++ b/jf_erp_check_project/string_helper.cpp @@ -0,0 +1,146 @@ +/** +* @file string_helper.cpp +* @brief string utility functions' implemention +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +* 14-Jau-2009 James modify Split functions, add trim blank characters +*/ +#pragma warning(disable:4996) +// +//#include +//#include +//#include +#include "string_helper.h" + +string TrimString( string strArg ) +{ + size_t index1 = 0; + index1 = strArg.find_first_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin(), strArg.begin()+index1 ); + index1 = strArg.find_last_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin() + index1 + 1 ); + return strArg; +} + +void Split( string strArg, char spliter, vector &ans ) +{ + ans.clear(); + size_t index0 = 0; + string one_arg; + if ( strArg.find_first_not_of(' ') == string::npos ) + strArg = ""; + while( strArg.size()>0 ) + { + index0 = strArg.find_first_of( spliter ); + if( index0 != string::npos ) + { + one_arg = strArg.substr( 0,index0 ); + strArg = strArg.substr( index0 + 1 ); + ans.push_back( one_arg ); + } + else + { + ans.push_back( strArg ); + break; + } + } +} + +void Split( string strArg, string spliter, vector &ans ) +{ + + ans.clear(); + + size_t index0; + string one_arg; + + if ( strArg.find_first_not_of(" ") == string::npos ) + strArg = ""; + + + while( strArg.size()>0 ) + { + + index0 = strArg.find(spliter); + + if( index0 != string::npos ) + { + + one_arg = strArg.substr( 0, index0 ); + strArg = strArg.substr( index0 + spliter.size() ); + + ans.push_back( one_arg ); + } + else + { + + ans.push_back( strArg ); + break; + } + } +} + + +void RemoveLiner( string &in, string &out ) +{ + char buf[BUFSIZ] = ""; + for( int i=0; i<(int)in.size(); i++ ) + { + if( in[i] == '\n') + continue; + else + sprintf( buf,"%s%c", buf, in[i] ); + } + out.assign(buf); +} + +////Converting a WChar string to a Ansi string +//std::string WChar2Ansi(LPCWSTR pwszSrc) +//{ +// int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL); +// +// if (nLen<= 0) return std::string(""); +// +// char* pszDst = new char[nLen]; +// if (NULL == pszDst) return std::string(""); +// +// WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL); +// pszDst[nLen -1] = 0; +// +// std::string strTemp(pszDst); +// delete [] pszDst; +// +// return strTemp; +//} +// +//string ws2s(wstring& inputws){ return WChar2Ansi(inputws.c_str()); } +// +////Converting a Ansi string to WChar string +//std::wstring Ansi2WChar(LPCSTR pszSrc, int nLen) +//{ +// int nSize = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszSrc, nLen, 0, 0); +// if(nSize <= 0) return NULL; +// +// WCHAR *pwszDst = new WCHAR[nSize+1]; +// if( NULL == pwszDst) return NULL; +// +// MultiByteToWideChar(CP_ACP, 0,(LPCSTR)pszSrc, nLen, pwszDst, nSize); +// pwszDst[nSize] = 0; +// +// if( pwszDst[0] == 0xFEFF) // skip Oxfeff +// for(int i = 0; i < nSize; i ++) +// pwszDst[i] = pwszDst[i+1]; +// +// wstring wcharString(pwszDst); +// delete pwszDst; +// +// return wcharString; +//} +// +//std::wstring s2ws(const string& s){ return Ansi2WChar(s.c_str(),s.size());} + diff --git a/jf_erp_check_project/string_helper.h b/jf_erp_check_project/string_helper.h new file mode 100644 index 0000000..b4f7532 --- /dev/null +++ b/jf_erp_check_project/string_helper.h @@ -0,0 +1,25 @@ +/** +* @file string_helper.h +* @brief string utilities to help dealing with string +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef STRING_HELPER +#define STRING_HELPER + +#include +#include +using namespace std; + +string TrimString( string strArg ); +void Split( string strArg, char spliter, vector &ans ); +void Split( string strArg, string spliter, vector &ans ); +void RemoveLiner( string &in, string &out ); +//string ws2s(wstring& inputws); +//wstring s2ws(const string& s); + +#endif \ No newline at end of file diff --git a/jf_erp_check_project/string_utils.cxx b/jf_erp_check_project/string_utils.cxx new file mode 100644 index 0000000..07d93cb --- /dev/null +++ b/jf_erp_check_project/string_utils.cxx @@ -0,0 +1,253 @@ +/*================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +==================================================================================================================== +File description: + Filename: string_utils.c + Module : Common module. + + This file includes some operations of the string. + +==================================================================================================================== +Date Name Description of Change +3-Feb-2015 Ray li Initialize creation +$HISTORY$ +===================================================================================================================*/ +#ifndef _cplusplus +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE +#endif +#endif + +#include +#include +#include +#include +#include +#include + +#include "string_utils.h" + +//void Split( string strArg, string spliter, vector &ans ) +//{ +// ans.clear(); +// size_t index0; +// string one_arg; +// if ( strArg.find_first_not_of(' ') == string::npos ) +// strArg = ""; +// while( strArg.size()>0 ) +// { +// index0 = strArg.find(spliter); +// if( index0 != string::npos ) +// { +// one_arg = strArg.substr( 0, index0 ); +// strArg = strArg.substr( index0 + spliter.size() ); +// ans.push_back( one_arg ); +// } +// else +// { +// ans.push_back( strArg ); +// break; +// } +// } +//} +char* GSTR_clone( char **dst, const char *src ) +{ + char *retVal = NULL; + int srcLen = 0; + + *dst = NULL; + if (src == NULL) + return NULL; + + srcLen = (int)tc_strlen( src ) + 1; + *dst = (char*)MEM_alloc( srcLen * sizeof(char) ); + retVal = tc_strncpy( *dst, src, srcLen ); + (*dst)[srcLen - 1] = '\0'; + + return retVal; +} + +char* GSTR_copy( char *dst, const char *src, int dstSize ) +{ + char *retVal = tc_strncpy( dst, src, dstSize ); + dst[dstSize - 1] = '\0'; + return retVal; +} + +char* GSTR_int_to_string( char **dst, int value ) +{ + char strVal[128 + 1]; + + *dst = NULL; + memset( strVal, 0, sizeof(strVal)/sizeof(char) ); + sprintf( strVal, "%d", value ); + + return GSTR_clone( dst, strVal ); +} + +void GSTR_format_int_to_string( char *dst, int digitNum, int value ) +{ + char sNum[WSO_desc_size_c + 1]; + sprintf( sNum, "%%0%dd", digitNum ); + sprintf( dst, sNum, value ); +} + +void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ) +{ + char sNum[WSO_name_size_c + 1] = {0}; + char sNew[WSO_name_size_c + 1] = {0}; + sprintf( sNum, "%%%d.%ds", m, m ); + sprintf( sNew, sNum, dst ); + STRNG_replace_str( sNew, " ", fill_char, out ); +} + + +char* GSTR_string_append( const char *s1, const char *s2 ) +{ + char *s = NULL; + if (s1 == NULL || s2 == NULL) + { + GSTR_clone(&s, s1 == NULL ? (s2 == NULL ? "" : s2) : s1 ); + } + else + { + int size = (int)tc_strlen(s1) + (int)tc_strlen(s2) + 1; + s = (char *)MEM_alloc( size ); + tc_strcpy( s, s1 ); + tc_strcat( s, s2 ); + s[size - 1] = '\0'; + } + return s; +} + +logical GSTR_is_float(const char *str) +{ + logical isfloat = true; + char *pStr = (char *)str; + logical hasPositive = false; + logical hasMinus = false; + logical hasDot = false; + + if (str == NULL) + return false; + + while (*pStr != '\0' && isfloat == true) + { + if ( (*pStr >= '0' && *pStr <= '9')) + { + //continue; + } + else if ( *pStr == '+' ) + { + isfloat = (hasPositive ? false : (hasPositive = true)); + } + else if ( *pStr == '-' ) + { + isfloat = (hasMinus ? false : (hasMinus = true)); + } + else if ( *pStr == '.' ) + { + isfloat = (hasDot ? false : (hasDot = true)); + } + else + isfloat = false; + + pStr ++; + } + return isfloat; +} + +logical GSTR_is_number(const char *str) +{ + logical is_number = true; + char *pStr = (char *)str; + if (str == NULL) + return false; + + while (*pStr != '\0') + { + if ( !( (*pStr >= '0' && *pStr <= '9') || *pStr == '-' ) ) + { + is_number = false; + break; + } + pStr ++; + } + return is_number; +} + +logical GSTR_is_ascii(char ch) +{ + return ((unsigned int)ch) < 128; +} + +int GSTR_trim_l( char *str, char s ) +{ + int count = 0; + char *pointer = str, *poffset = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + while ( *pointer != '\0' ) + { + if ( *pointer != s ) + { + break; + } + count++; + pointer++; + } + if (count == 0) + return 0; + + poffset = str + count; + pointer = str; + while ( *poffset != '\0' ) + { + *pointer = *poffset; + pointer ++; + poffset ++; + } + *pointer = '\0'; + + return count; +} + +int GSTR_trim_r( char *str, char s ) +{ + int count = 0; + char *pointer = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + pointer = str + ((int) strlen(str) - 1); + + while ( pointer != str ) + { + if ( *pointer != s ) + { + break; + } + + *pointer = '\0'; + + count++; + pointer--; + } + + return count; +} + +void GSTR_trim_float( char *floatValue ) +{ + if ( !IS_EMPTY(floatValue) && tc_strstr(floatValue, ".") != NULL ) + { + int len = 0; + GSTR_trim_r(floatValue, '0'); + len = (int)tc_strlen(floatValue); + if (floatValue[ len - 1 ] == '.') + floatValue[ len - 1 ] = '\0'; + } +} + diff --git a/jf_erp_check_project/string_utils.h b/jf_erp_check_project/string_utils.h new file mode 100644 index 0000000..4b379cc --- /dev/null +++ b/jf_erp_check_project/string_utils.h @@ -0,0 +1,125 @@ +/*===================================================================================================================== + Copyright(c) 2005 ORIGIN PLM Software Corp. All rights reserved. + Unpublished - All rights reserved +======================================================================================================================= +File description: + Filename: string_utils.h + Module : Common module. + + This file includes some operations of the string. + +======================================================================================================================= +Date Name Description of Change +14-Jul-2009 Ray Li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#ifndef STRING_UTILS_H +#define STRING_UTILS_H +#include +#include +#include +using namespace std; +#ifdef __cplusplus + extern "C" + { +#endif + +// @{{ String assister +#define IS_NULL(S) ((S)==NULL) +#define IS_EMPTY(S) (((S)==NULL) || !(*(S))) +// @}} + void Split( string strArg, string spliter, vector &ans ); + /** + * Clones the string. + * @param dst - the output string. + * @param src - the string to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_clone( char **dst, const char *src ); + + /** + * Copy safely the string with null end. + * @param dst - the output string. + * @param src - the string to be cloned. + * @param dstSize - the size of output string. + * @return - the destinatin string pointer. + */ + extern char *GSTR_copy( char *dst, const char *src, int dstSize ); + + /** + * Converts int to string. + * @param dst - the output string. + * @param value - the int to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_int_to_string( char **dst, int value ); + + /** + * Formats the int/string value as string. + * @param dst - the destination string. + * @param digitNum - the digit number of the value. + * @param value - the value to be converted. + * @return - N/A. + */ + extern void GSTR_format_int_to_string( char *dst, int digitNum, int value ); + extern void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ); + + /** + * Appends the strings( never null returned ) + * @param s1 - string 1 + * @param s2 - string 2 + * @return - new string + */ + extern char* GSTR_string_append( const char *s1, const char *s2 ); + + /** + * Whether the string is float type + * @param str - The string + * + * NOTE: it's only check whether each word is in "+-.0123456789", not care the float with "E" or the float rule, + * like "00-1.+01", it will return true. + * @return - return true if it is one. + */ + extern logical GSTR_is_float(const char *str); + + /** + * Whether all char of the string are number + * @param str - The string + * + * NOTE: it's only check whether each word is in "0123456789" + * @return - return true if it is one. + */ + extern logical GSTR_is_number(const char *str); + + /** + * Is ascii char + * @param ch - ascii char + * @return - return true if it is. + */ + extern logical GSTR_is_ascii(char ch); + + /** + * Trims the string's prefix. + * @param str - The string + * @param s - The char + * + * @return - count. + */ + extern int GSTR_trim_l( char *str, char s ); + extern int GSTR_trim_r( char *str, char s ); + + /** + * Remove the zero. + * For Example: + * floatValue="50.00" -> = "50" + * floatValue="50.0100" -> = "50.01" + * @return - count. + */ + extern void GSTR_trim_float( char *floatValue ); + +#ifdef __cplusplus + } +#endif + + +#endif //STRING_UTILS_H diff --git a/jf_erp_check_project/x64/Release/CL.read.1.tlog b/jf_erp_check_project/x64/Release/CL.read.1.tlog new file mode 100644 index 0000000..b5f064f Binary files /dev/null and b/jf_erp_check_project/x64/Release/CL.read.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/CL.write.1.tlog b/jf_erp_check_project/x64/Release/CL.write.1.tlog new file mode 100644 index 0000000..187ae2a Binary files /dev/null and b/jf_erp_check_project/x64/Release/CL.write.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/cl.command.1.tlog b/jf_erp_check_project/x64/Release/cl.command.1.tlog new file mode 100644 index 0000000..08c87d5 Binary files /dev/null and b/jf_erp_check_project/x64/Release/cl.command.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/common_itk_util.obj b/jf_erp_check_project/x64/Release/common_itk_util.obj new file mode 100644 index 0000000..1268a03 Binary files /dev/null and b/jf_erp_check_project/x64/Release/common_itk_util.obj differ diff --git a/jf_erp_check_project/x64/Release/jf3_main.obj b/jf_erp_check_project/x64/Release/jf3_main.obj new file mode 100644 index 0000000..80f4fcc Binary files /dev/null and b/jf_erp_check_project/x64/Release/jf3_main.obj differ diff --git a/jf_erp_check_project/x64/Release/jf_erp_check_project.dll.intermediate.manifest b/jf_erp_check_project/x64/Release/jf_erp_check_project.dll.intermediate.manifest new file mode 100644 index 0000000..ecea6f7 --- /dev/null +++ b/jf_erp_check_project/x64/Release/jf_erp_check_project.dll.intermediate.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/jf_erp_check_project/x64/Release/jf_erp_check_project.lastbuildstate b/jf_erp_check_project/x64/Release/jf_erp_check_project.lastbuildstate new file mode 100644 index 0000000..8997680 --- /dev/null +++ b/jf_erp_check_project/x64/Release/jf_erp_check_project.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|x64|F:\Connor(项目管理)\继峰项目\签名\jf_itk\| diff --git a/jf_erp_check_project/x64/Release/jf_erp_check_project.log b/jf_erp_check_project/x64/Release/jf_erp_check_project.log new file mode 100644 index 0000000..60aec06 --- /dev/null +++ b/jf_erp_check_project/x64/Release/jf_erp_check_project.log @@ -0,0 +1,46 @@ +生成启动时间为 2015/9/17 17:59:45。 + 1>项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_check_project\jf_erp_check_project.vcxproj”在节点 2 上(build 个目标)。 + 1>InitializeBuildStatus: + 正在创建“x64\Release\jf_erp_check_project.unsuccessfulbuild”,因为已指定“AlwaysCreate”。 + ClCompile: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W3 /WX- /O2 /Oi /GL /D IPLIB=none /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D JF_ERP_CHECK_PROJECT_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Release\\" /Fd"x64\Release\vc100.pdb" /Gd /TC /errorReport:prompt common_itk_util.c + common_itk_util.c + 1>F:\Teamcenter10.1.0Env\tcbin\include\tc/emh_const.h(61): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated + 1>common_itk_util.c(91): warning C4013: “AM__set_application_bypass”未定义;假设外部返回 int + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W3 /WX- /O2 /Oi /GL /D IPLIB=none /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D JF_ERP_CHECK_PROJECT_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Release\\" /Fd"x64\Release\vc100.pdb" /Gd /TP /errorReport:prompt jf3_main.cpp ocilib.cxx string_helper.cpp string_utils.cxx + jf3_main.cpp + ocilib.cxx + 1>ocilib.cxx(158): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 + 1>ocilib.cxx(158): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 + 1>ocilib.cxx(158): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 + 1>ocilib.cxx(181): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 + 1>ocilib.cxx(249): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : 参见“sprintf”的声明 + 1>ocilib.cxx(264): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : 参见“sprintf”的声明 + 1>ocilib.cxx(377): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : 参见“strcpy”的声明 + 1>ocilib.cxx(411): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : 参见“strcpy”的声明 + string_helper.cpp + string_utils.cxx + 1>F:\Teamcenter10.1.0Env\tcbin\include\pom/pom/pom_errors.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\x64\Release\jf_erp_check_project.dll" /INCREMENTAL:NO /NOLOGO "F:\Teamcenter10.1.0Env\tcbin\lib\*.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"x64\Release\jf_erp_check_project.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\x64\Release\jf_erp_check_project.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\x64\Release\jf_erp_check_project.lib" /MACHINE:X64 /DLL x64\Release\common_itk_util.obj + x64\Release\jf3_main.obj + x64\Release\ocilib.obj + x64\Release\string_helper.obj + x64\Release\string_utils.obj + 正在生成代码 + 已完成代码的生成 + jf_erp_check_project.vcxproj -> F:\Connor(项目管理)\继峰项目\签名\jf_itk\x64\Release\jf_erp_check_project.dll + Manifest: + C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /out:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\x64\Release\jf_erp_check_project.dll.manifest" /manifest x64\Release\jf_erp_check_project.dll.intermediate.manifest + FinalizeBuildStatus: + 正在删除文件“x64\Release\jf_erp_check_project.unsuccessfulbuild”。 + 正在对“x64\Release\jf_erp_check_project.lastbuildstate”执行 Touch 任务。 + 1>已完成生成项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_check_project\jf_erp_check_project.vcxproj”(build 个目标)的操作。 + +生成成功。 + +已用时间 00:00:02.88 diff --git a/jf_erp_check_project/x64/Release/jf_erp_check_project.write.1.tlog b/jf_erp_check_project/x64/Release/jf_erp_check_project.write.1.tlog new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_check_project/x64/Release/link.command.1.tlog b/jf_erp_check_project/x64/Release/link.command.1.tlog new file mode 100644 index 0000000..24e16ae Binary files /dev/null and b/jf_erp_check_project/x64/Release/link.command.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/link.read.1.tlog b/jf_erp_check_project/x64/Release/link.read.1.tlog new file mode 100644 index 0000000..4d7ab74 Binary files /dev/null and b/jf_erp_check_project/x64/Release/link.read.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/link.write.1.tlog b/jf_erp_check_project/x64/Release/link.write.1.tlog new file mode 100644 index 0000000..34581b5 Binary files /dev/null and b/jf_erp_check_project/x64/Release/link.write.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/mt.command.1.tlog b/jf_erp_check_project/x64/Release/mt.command.1.tlog new file mode 100644 index 0000000..5b71543 Binary files /dev/null and b/jf_erp_check_project/x64/Release/mt.command.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/mt.read.1.tlog b/jf_erp_check_project/x64/Release/mt.read.1.tlog new file mode 100644 index 0000000..69a572c Binary files /dev/null and b/jf_erp_check_project/x64/Release/mt.read.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/mt.write.1.tlog b/jf_erp_check_project/x64/Release/mt.write.1.tlog new file mode 100644 index 0000000..f47f9ba Binary files /dev/null and b/jf_erp_check_project/x64/Release/mt.write.1.tlog differ diff --git a/jf_erp_check_project/x64/Release/ocilib.obj b/jf_erp_check_project/x64/Release/ocilib.obj new file mode 100644 index 0000000..91b4b57 Binary files /dev/null and b/jf_erp_check_project/x64/Release/ocilib.obj differ diff --git a/jf_erp_check_project/x64/Release/string_helper.obj b/jf_erp_check_project/x64/Release/string_helper.obj new file mode 100644 index 0000000..127e0be Binary files /dev/null and b/jf_erp_check_project/x64/Release/string_helper.obj differ diff --git a/jf_erp_check_project/x64/Release/string_utils.obj b/jf_erp_check_project/x64/Release/string_utils.obj new file mode 100644 index 0000000..7e297ba Binary files /dev/null and b/jf_erp_check_project/x64/Release/string_utils.obj differ diff --git a/jf_erp_check_project/x64/Release/vc100.pdb b/jf_erp_check_project/x64/Release/vc100.pdb new file mode 100644 index 0000000..31fe3b3 Binary files /dev/null and b/jf_erp_check_project/x64/Release/vc100.pdb differ diff --git a/jf_erp_project/Release/CL.read.1.tlog b/jf_erp_project/Release/CL.read.1.tlog new file mode 100644 index 0000000..e1e31d8 Binary files /dev/null and b/jf_erp_project/Release/CL.read.1.tlog differ diff --git a/jf_erp_project/Release/CL.write.1.tlog b/jf_erp_project/Release/CL.write.1.tlog new file mode 100644 index 0000000..2aa4147 Binary files /dev/null and b/jf_erp_project/Release/CL.write.1.tlog differ diff --git a/jf_erp_project/Release/cl.command.1.tlog b/jf_erp_project/Release/cl.command.1.tlog new file mode 100644 index 0000000..d6fadb4 Binary files /dev/null and b/jf_erp_project/Release/cl.command.1.tlog differ diff --git a/jf_erp_project/Release/common_itk_util.obj b/jf_erp_project/Release/common_itk_util.obj new file mode 100644 index 0000000..624638f Binary files /dev/null and b/jf_erp_project/Release/common_itk_util.obj differ diff --git a/jf_erp_project/Release/jf_erp_project.lastbuildstate b/jf_erp_project/Release/jf_erp_project.lastbuildstate new file mode 100644 index 0000000..85a14fb --- /dev/null +++ b/jf_erp_project/Release/jf_erp_project.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|F:\Connor(项目管理)\继峰项目\签名\jf_itk\| diff --git a/jf_erp_project/Release/jf_erp_project.log b/jf_erp_project/Release/jf_erp_project.log new file mode 100644 index 0000000..7af5872 --- /dev/null +++ b/jf_erp_project/Release/jf_erp_project.log @@ -0,0 +1,59 @@ +生成启动时间为 2015/9/17 17:55:52。 + 1>项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\jf_erp_project.vcxproj”在节点 2 上(build 个目标)。 + 1>InitializeBuildStatus: + 正在对“Release\jf_erp_project.unsuccessfulbuild”执行 Touch 任务。 + ClCompile: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D IPLIB=none /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TC /analyze- /errorReport:prompt common_itk_util.c + common_itk_util.c + 1>F:\Teamcenter10.1.0Env\tcbin\include\tc/emh_const.h(61): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated + 1>common_itk_util.c(91): warning C4013: “AM__set_application_bypass”未定义;假设外部返回 int + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D IPLIB=none /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt ocilib.cxx string_helper.cpp string_utils.cxx + ocilib.cxx + 1>ocilib.cxx(249): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : 参见“sprintf”的声明 + 1>ocilib.cxx(264): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : 参见“sprintf”的声明 + 1>ocilib.cxx(377): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : 参见“strcpy”的声明 + 1>ocilib.cxx(411): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : 参见“strcpy”的声明 + string_helper.cpp + string_utils.cxx + 1>F:\Teamcenter10.1.0Env\tcbin\include\pom/pom/pom_errors.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_project.exe" /INCREMENTAL:NO /NOLOGO "F:\Teamcenter10.1.0Env\tcbin\lib\*.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\jf_erp_project.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_project.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_project.lib" /MACHINE:X86 Release\common_itk_util.obj + Release\ocilib.obj + Release\string_helper.obj + Release\string_utils.obj + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__MEM_alloc + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__MEM_free + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__TC_write_syslog + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__POM_ask_session + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 __imp__ITK__convert_tag_to_uid + 1>common_itk_util.obj : error LNK2001: 无法解析的外部符号 _AM__set_application_bypass + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtPrepare + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCILogon + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIHandleFree + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIBindByPos + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIEnvCreate + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIBindByName + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIErrorGet + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCILogoff + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIDefineByPos + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIHandleAlloc + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIAttrGet + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtFetch2 + 1>ocilib.obj : error LNK2001: 无法解析的外部符号 _OCIStmtExecute + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strncpy + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strcat + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__STRNG_replace_str + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strstr + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strcpy + 1>string_utils.obj : error LNK2001: 无法解析的外部符号 __imp__tc_strlen + 1>MSVCRT.lib(crtexe.obj) : error LNK2001: 无法解析的外部符号 _main + 1>F:\Connor(项目管理)\继峰项目\签名\jf_itk\Release\jf_erp_project.exe : fatal error LNK1120: 26 个无法解析的外部命令 + 1>已完成生成项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\jf_erp_project.vcxproj”(build 个目标)的操作 - 失败。 + +生成失败。 + +已用时间 00:00:02.69 diff --git a/jf_erp_project/Release/jf_erp_project.unsuccessfulbuild b/jf_erp_project/Release/jf_erp_project.unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_project/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache b/jf_erp_project/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache new file mode 100644 index 0000000..bde9b77 Binary files /dev/null and b/jf_erp_project/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache differ diff --git a/jf_erp_project/Release/jf_erp_project.write.1.tlog b/jf_erp_project/Release/jf_erp_project.write.1.tlog new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_project/Release/link.command.1.tlog b/jf_erp_project/Release/link.command.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/Release/link.command.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/Release/link.read.1.tlog b/jf_erp_project/Release/link.read.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/Release/link.read.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/Release/link.write.1.tlog b/jf_erp_project/Release/link.write.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/Release/link.write.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/Release/ocilib.obj b/jf_erp_project/Release/ocilib.obj new file mode 100644 index 0000000..d404520 Binary files /dev/null and b/jf_erp_project/Release/ocilib.obj differ diff --git a/jf_erp_project/Release/string_helper.obj b/jf_erp_project/Release/string_helper.obj new file mode 100644 index 0000000..a983b8d Binary files /dev/null and b/jf_erp_project/Release/string_helper.obj differ diff --git a/jf_erp_project/Release/string_utils.obj b/jf_erp_project/Release/string_utils.obj new file mode 100644 index 0000000..fad0a42 Binary files /dev/null and b/jf_erp_project/Release/string_utils.obj differ diff --git a/jf_erp_project/Release/vc100.pdb b/jf_erp_project/Release/vc100.pdb new file mode 100644 index 0000000..08009db Binary files /dev/null and b/jf_erp_project/Release/vc100.pdb differ diff --git a/jf_erp_project/common_itk_util.c b/jf_erp_project/common_itk_util.c new file mode 100644 index 0000000..b56d00d --- /dev/null +++ b/jf_erp_project/common_itk_util.c @@ -0,0 +1,291 @@ +/** +* @file common_itk_util.cpp +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 18-July-2008 James +* +*/ + +#pragma warning (disable: 4996) +#pragma warning (disable: 4819) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include +//#include +//#include + +#include +//#include +#include +#include +//#include +//#include +#include "error_handling.h" +#include "common_itk_util.h" + +#ifdef WIN32 +#include +#include +#else +#include +#endif + + +#define ARGS_LENGTH 200 +#define ARGS_NAME_DEBUG "-debug" +#define DEBUG "-debug=" +#define MAX_PRINTLINE_LENGTH 2000 +#define MAX_PATH_LENGTH 2000 +#define MAX_ARGUMENT_LENGTH 400 +#define MAX_PARAMNAME_LENGTH 50 +#define MAX_FILE_EXT_LENGTH 10 +#define TRUE_FLAG 1 +#define FALSE_FLAG 0 +#define DETAILLOG 1 + + int AM__set_application_bypass(logical bypass); + +void ECHO(char *format, ...) +{ + //if( !YFJC_OPT_DEBUG ) + // return; + + char msg[1024]; + va_list args; + + va_start( args, format ); + vsprintf( msg, format, args ); + va_end( args ); + + printf( msg ); + TC_write_syslog( msg ); +} + +FILE* logFile = NULL; + +void set_bypass(logical bypass) +{ + AM__set_application_bypass(bypass); +} +/*=============================================================================* + * FUNCTION: current_time + * PURPOSE : get the current datetime + * INPUT: + * date_t* date_tag // current date time tag + * + * RETURN: + * void + *============================================================================*/ +void current_time( date_t * date_tag ) +{ + time_t ltime; + struct tm *today ; + + // Set time zone from TZ environment variable. If TZ is not set, + // the operating system is queried to obtain the default value + // for the variable. + // + //_tzset(); + + // Get UNIX-style time and display as number and string. + time( <ime ); + + today = localtime( <ime ); + date_tag->year = today->tm_year + 1900 ; + date_tag->month = today->tm_mon ; + date_tag->day = today->tm_mday ; + date_tag->hour = today->tm_hour ; + date_tag->minute = today->tm_min ; + date_tag->second = today->tm_sec ; +} +/*=============================================================================* + * FUNCTION: CreateLogFile + * PURPOSE : create log file + * INPUT: + * char* FunctionName // the funtion which need to create log file + * FILE** logFile // out: the log file pointer + * + * RETURN: + * void + *============================================================================*/ +void CreateLogFile(char* FunctionName, char **fullname) +{ + int i=0, ifail = ITK_ok; + //date_t status_now; + //char* date_string = NULL; + char date_string[MAX_PATH_LENGTH]; + char logFileDir[MAX_PATH_LENGTH]; + char logFileName[MAX_PATH_LENGTH]; + + char* session_uid = NULL; + tag_t session_tag = NULLTAG; + time_t now; + struct tm *p; + + time(&now); + + logFile = NULL; + //current_time(&status_now); + p=localtime(&now); + + memset(date_string, 0, sizeof(date_string)); + sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec ); + //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok ) + //ifail = ITK_date_to_string (status_now, &date_string ); + //if (ifail) + //{ + // printf("!*ERROR*!: Failed to get current date time\n"); + // goto CLEANUP; + //} + + memset(logFileDir, 0, sizeof(logFileDir)); + memset(logFileName, 0, sizeof(logFileName)); + //get log dir + sprintf(logFileDir, "%s", getenv("TEMP")); + printf("\n log file dir: %s\n", logFileDir); + //try to change dir to TC_USER_LOG_DIR + if(chdir(logFileDir)!=ITK_ok) + { + //not set TC_USER_LOG_DIR + //log in to default TC_LOG + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TC_LOG")); + printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir); + if(chdir(logFileDir)!=ITK_ok) + { + //still can not change to log dir + printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n"); + goto CLEANUP; + } + } + + //get session_uid to make sure the log file name unique + POM_ask_session(&session_tag); + ITK__convert_tag_to_uid(session_tag, &session_uid); + + + //get logFileName + sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string); + printf("log file name: %s\n", logFileName); + + *fullname = (char *)MEM_alloc(sizeof(char)*512); + sprintf(*fullname,"%s\\%s",logFileDir,logFileName); + + //for(i = 0; _access((char *)logFileName, 4) == 0; i++) + /*{ + memset(logFileName, 0, sizeof(logFileName)); + sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i); + } + printf("final log file name: %s\n", logFileName);*/ + + //create log file + logFile = fopen(logFileName, "w"); + +CLEANUP: + //DOFREE(date_string); + DOFREE(session_uid); +} + + +/*=============================================================================* + * FUNCTION: WriteLog + * PURPOSE : write log, if debug log File not null, write log message to log File + * INPUT: + * const char* format // debug message string + * + * RETURN: + * void + *============================================================================*/ +void WriteLog(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + + if(logFile) + { + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + + //----------print to command window for trace--------// + printf("%s\n", tmp); + + //print message to log file + fprintf(logFile, "%s\n", tmp); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} + +void CloseLog(void) +{ + if(logFile) + { + fclose(logFile); + logFile = NULL; + } +} + +//void getTypeinfo(char *type) +//{ +// int ulen = 0,i=0,tempcount=0,asd=0; +// +// char temp[128]=""; +// ulen = strlen(type); +// asd = ulen-1; +// for(i=0;i < ulen;i++) +// { +// if(type[i] == ';') +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// strcpy(temp,""); +// tempcount = 0; +// typecount = typecount + 1; +// } +// else +// { +// +// temp[tempcount] = type[i]; +// tempcount = tempcount + 1; +// if(i==asd) +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// typecount = typecount + 1; +// } +// +// } +// +// } +//} \ No newline at end of file diff --git a/jf_erp_project/common_itk_util.h b/jf_erp_project/common_itk_util.h new file mode 100644 index 0000000..f27d079 --- /dev/null +++ b/jf_erp_project/common_itk_util.h @@ -0,0 +1,40 @@ +/** +* @file common_itk_util.h +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef COMMON_ITK_UTIL +#define COMMON_ITK_UTIL + +#ifdef __cplusplus +extern "C" { +#endif + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} +void ECHO(char *format, ...); +void CreateLogFile(char* FunctionName, char **fullname); +void WriteLog(const char* format, ...); +void CloseLog(void); +void set_bypass(logical bypass); +//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] ); +//int CompareDate( date_t date1, date_t date2 ); +//int GetRandomTempFile( char tempFile[256] ); +//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] ); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/jf_erp_project/error_handling.h b/jf_erp_project/error_handling.h new file mode 100644 index 0000000..b6b8099 --- /dev/null +++ b/jf_erp_project/error_handling.h @@ -0,0 +1,160 @@ +/*! +* @addtogroup common +* \file error_handling.h +* \brief +* \date 2008/6/10 +* \author Ray Li +*/ + +#ifndef SIMPLE_ERR_H_INCLUDED +#define SIMPLE_ERR_H_INCLUDED + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define BUFSIZE 512 + + +// +//#define HANDLER_ARGUMENT_ERROR EMH_USER_error_base + 1 +//#define WORKFLOW_NODE_IS_NOT_VALID EMH_USER_error_base + 2 +//#define HANDLER_PLACED_INVALID EMH_USER_error_base + 3 +// +////user errors define +////վļȱ %1$ ã +//#define ERROR_PREFERENCE_NOT_FOUND (EMH_USER_error_base + 100) + + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + + + +//#define ECHO(X) printf X; +#define SYS_LOG(X) IMAN_write_syslog X; +#define LOG_ECHO(X) printf X; IMAN_write_syslog X; + + + +/*! +* \def CALL(x) +* ӡϢ +*/ +#define CALL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + LOG_ECHO( ("ERROR: %d ERROR MSG: %s.\n",stat, err_string) ) \ + LOG_ECHO( ("Function: %s FILE: %s LINE: %d\n", #x, __FILE__, __LINE__ ) ) \ + MEM_free (err_string); \ + return (stat); \ + } \ +} + +/*! +* \def DO(x) +* ӡϢ +*/ +#define DO(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != POM_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + } \ +} + +/*! +* \def CALLRNULL(x) +* ӡϢ +*/ +#define CALLRNULL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + return ((char *)NULL); \ + } \ +} + +/*! +* \def CALL2(x) +* ӡϢ +*/ +#define CALL2(x) { \ + int stat, n_ifails, *serverities, *ifails, err_count; \ + char *err_string, **texts; \ + if( (stat = (x)) != ITK_ok) \ + { \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + EMH_ask_errors( &n_ifails, (const int**)(&serverities), (const int**)(&ifails), (const char***)(&texts) );\ + for( err_count=0; err_count + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {375BE822-1125-4D9E-A589-08243D1FF487} + Win32Proj + jf_erp_project + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + IPLIB=none;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + IPLIB=none;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;%(AdditionalDependencies) + + + + + F:\Teamcenter10.1.0Env\OCI\include;F:\Teamcenter10.1.0Env\tcbin\include;%(AdditionalIncludeDirectories) + IPLIB=none;%(PreprocessorDefinitions) + + + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;F:\Teamcenter10.1.0Env\tcbin\lib\itk_main.obj;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jf_erp_project/jf_erp_project.vcxproj.filters b/jf_erp_project/jf_erp_project.vcxproj.filters new file mode 100644 index 0000000..08a1f7d --- /dev/null +++ b/jf_erp_project/jf_erp_project.vcxproj.filters @@ -0,0 +1,57 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {695e5212-e914-4315-a83f-087109122c06} + + + + + common + + + common + + + common + + + common + + + 源文件 + + + + + common + + + common + + + common + + + common + + + common + + + 头文件 + + + \ No newline at end of file diff --git a/jf_erp_project/jf_erp_project.vcxproj.user b/jf_erp_project/jf_erp_project.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/jf_erp_project/jf_erp_project.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/jf_erp_project/ocilib.cxx b/jf_erp_project/ocilib.cxx new file mode 100644 index 0000000..30151e3 --- /dev/null +++ b/jf_erp_project/ocilib.cxx @@ -0,0 +1,440 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.cxx + Module : OCI + + This file describes OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include "ocilib.h" +#include + +#define NUM 100 +#define USERNAME "infodba" +#define PASSWORD "infodba" +#define DBNAME "tc" + + +// ṹ +typedef struct{ + OCIEnv *p_env; //OCI environment handle + OCIError *p_err; //OCI error handle + OCISvcCtx *p_svc; //OCI service context handel ľ + OCIServer *p_ser; //OCI server handle + OCISession *p_usr; //OCI user session handle ûỰ + OCIStmt *p_sql; //OCI statement handle + OCIDefine *p_dfn; //OCI define handle + OCIBind *p_bnd; //OCI bind handle 󶨾 +}OCIHandleInfo; + + +// ṹ +typedef struct{ + OCIEnv *p_env; + OCIError *p_err; + OCISvcCtx *p_svc; + OCIStmt *p_sql; + OCIDefine *p_dfn; + OCIBind *p_bnd; +}OCIDATA; + + +// ִʱ +typedef struct{ + char value[NUM][NUM]; + char type[NUM][NUM]; +}SqlField; + + +// ѯʱ, +typedef struct{ + int naIntValue[NUM]; + int nIntNum; + char caCharValue[500][500]; + int nCharNum; +}SqlSelField; + +OCIHandleInfo *ociHandle = NULL; +OCIHandleInfo ociHand; + +int InitHandle(); +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount); +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField); +int GetDataFromQuery(int *pRc, SqlSelField *pOutField); +void QuitFreeHandle(); + + + + +/**************************************************************************************************************************************** +ƣ +ܣ +ڲ +ڲ + ע +*****************************************************************************************************************************************/ + + +// ʼHandler +int InitHandle() +{ + int swResult; + + ociHandle = &ociHand; + + + /*create OCI environment*/ + if(swResult = OCIEnvCreate(&ociHandle->p_env,OCI_DEFAULT,NULL,NULL,NULL,NULL,0,NULL)) // + { + printf("environment create error!\n\n"); + return -1; + } + else + { + printf("environment create success!\n\n"); + //return 0; + } + + /*init handle*/ + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_ser,OCI_HTYPE_SERVER,0,NULL)) // + { + printf("init server handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_err,OCI_HTYPE_ERROR,0,NULL)) // + { + printf("init error handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_usr,OCI_HTYPE_SESSION,0,NULL)) // + { + printf("init session handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_svc,OCI_HTYPE_SVCCTX,0,NULL)) //ľ + { + printf("init service context handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_sql,OCI_HTYPE_STMT,0,NULL)) //SQL + { + printf("init statement handle error!\n\n"); + return -1; + } + + printf("init handle success!\n\n"); + + return 0; +} + + + +// ݿ +int ConnServer(char *username,char *password,char *dbname) +{ + int swResult; + char errbuf[100]={0}; + int errcode; + + if(InitHandle() == -1)//ʼ + return -1; + + if(swResult = OCILogon(ociHandle->p_env,ociHandle->p_err,&ociHandle->p_svc,(text *)username,strlen(username),(text *)password,strlen(password),(text *)dbname,strlen(dbname))) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Error - %.*s/n", 512, errbuf); + return -1; + } + else + printf("ݿӳɹ!\n\n"); + return 0; +} + + + +// SQLij(ִSQL) +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount) +{ + int swResult,i; + int errcode; + + //ð󶨱 + OCIBind *p_bndp[100]; + + //׼SQL + if(swResult = OCIStmtPrepare(ociHandle->p_sql,ociHandle->p_err,(text *)SQL,strlen(SQL),OCI_NTV_SYNTAX,OCI_DEFAULT)) + { + printf("prepare SQL statements error!\n\n"); + } + else + { + printf("prepare SQL statements success!\n\n"); + } + + + // + for(i=0;ip_sql,&p_bndp[i],ociHandle->p_err,i+1,(dvoid *)inputValue[i],(sb4)strlen(inputValue[i])+1,SQLT_STR, (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Bind Error - %.*s/n", 512, errbuf); + return -1; + } + } + + //ִSQL statements + if(swResult = OCIStmtExecute(ociHandle->p_svc,ociHandle->p_sql,ociHandle->p_err,1,0,NULL,NULL,OCI_DEFAULT)) + { + char errbuf[100]={0}; + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL statement Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL statement success!\n\n"); + } + return 0; +} + + + + +// ѯSQL +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField ) +{ + sword status; + int rc= 0,ret=0; + char errbuf[100]={0}; + int maxNum = 2048; + char chTag[8]; + int iIndex = 0; + int outputColumn = 0; + int errcode=0; + char nullValue = '\0'; // + sb2 sb2aInd[30] = {'\0'}; + + // ׼SQL + status = OCIStmtPrepare(ociHandle->p_sql, ociHandle->p_err, (text *)SQL,(ub4)strlen(SQL), (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT); + + if (status != OCI_SUCCESS) + { + printf("SQL Preparing failed/n"); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + memset(chTag, 0, 8); + sprintf(chTag, ":%d", iIndex+1); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->naIntValue[iIndex], sizeof(int), SQLT_INT,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + // char *͵, SQLʱ :3,:4, + for (iIndex=0; iIndexnCharNum; iIndex++) + { + int n=0; + memset(chTag, 0, 8); + n = pSelField->nIntNum + iIndex +1; + sprintf(chTag, ":%d", n); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->caCharValue[iIndex], NUM, SQLT_STR,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // ִSQL + if (rc = OCIStmtExecute(ociHandle->p_svc, ociHandle->p_sql, ociHandle->p_err, (ub4) 0, (ub4) 0,(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_STMT_SCROLLABLE_READONLY)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL success!\n\n"); + } + + + if (ret = OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) &outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Get OCIAttr Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + if(rc = OCIDefineByPos(ociHandle->p_sql, &ociHandle->p_dfn, ociHandle->p_err, iIndex+1, (dvoid *)&pOutField->naIntValue[iIndex], sizeof(int), SQLT_INT, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // char *͵, SQLʱ :1,:2, + for (iIndex=0; iIndexp_sql, &ociHandle->p_dfn, ociHandle->p_err, n, (dvoid *)&pOutField->caCharValue[iIndex], 1000*sizeof(char), SQLT_STR, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + return 0; + +} + + + +// ͷHandler +void QuitFreeHandle() +{ + // ˳ + OCILogoff(ociHandle->p_svc,ociHandle->p_err); + printf("Quit success!\n"); + + // ͷž + OCIHandleFree(ociHandle->p_ser,OCI_HTYPE_SERVER); //ͷŷ + OCIHandleFree(ociHandle->p_err,OCI_HTYPE_ERROR); //ͷŴ + OCIHandleFree(ociHandle->p_usr,OCI_HTYPE_SESSION); //ͷ + OCIHandleFree(ociHandle->p_svc,OCI_HTYPE_SVCCTX); //ͷľ + OCIHandleFree(ociHandle->p_sql,OCI_HTYPE_STMT); //ͷSQL +} + + +// ִ +int ExecuteSQL(char *SQL,int valueCount,char **value) +{ + int i=0; + + if(i=_ExeSQL(SQL,value,valueCount)) + { + QuitFreeHandle(); + return -1; + } + + return 0; +} + + +// IJѯ +int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + int i = 0, j=0 ,ret =0; + + int times = 0, temp=0; + + SqlSelField infield; + SqlSelField outField; + + // ʼṹ + infield.nCharNum = inputValueCount; + infield.nIntNum = 0; + outField.nCharNum = 0; + outField.nIntNum = 0; + + * outputColumn = 0; + * outputValueCount = 0; + + for(i=0;ip_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err); + + // ȡһ,ȥ + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_LAST,0, OCI_DEFAULT); + // ȡ + ret= OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputValueCount, (ub4 *) 0, (ub4)OCI_ATTR_ROW_COUNT, ociHandle->p_err); + + if(*outputValueCount == 0) + return 0; + + + // ʼڴ沢Ҵ洢 + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_FIRST,0, OCI_DEFAULT); + *outputValue = (char ***) calloc ((*outputValueCount)+1,sizeof(char**)); + do + { + (*outputValue)[i] = (char **) calloc ((*outputColumn)+1,sizeof(char *)); + for(j=0;j<(*outputColumn);j++) + { + (*outputValue)[i][j] = (char *) calloc (1000,sizeof(char)); + strcpy((*outputValue)[i][j],outField.caCharValue[j]); + //printf("outValue[%d][%d] = %s , ַ=%d, ַָ= %d\n ",i,j,(*outputValue)[i][j],&(*outputValue)[i][j],(*outputValue)[i][j]); + } + i++; + } + while((ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_NEXT, 1, OCI_DEFAULT)!= OCI_NO_DATA)); + + return 0; +} + + +// IJѯ +int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + return QuerySQL(SQL,0,NULL,outputColumn,outputValueCount,outputValue); +} + +// ޲ +int ExecuteSQLNoInputParam(char *SQL) +{ + return ExecuteSQL(SQL,0,NULL); +} + +// Ͽ +void DisConnServer() +{ + if(ociHandle != NULL) + QuitFreeHandle(); +} + diff --git a/jf_erp_project/ocilib.h b/jf_erp_project/ocilib.h new file mode 100644 index 0000000..0a4e752 --- /dev/null +++ b/jf_erp_project/ocilib.h @@ -0,0 +1,98 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.h + Module : OCI + + This Header file of OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include +#include +#include +#include +#include +//#include + +#define OCI_FAIL 1 +#define OCI_OK 0 + +#ifdef __cplusplus +extern "C" +{ +#endif + /** + * ݿ. + * @param username - û + * @param password - + * @param dbname - ݿSID + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ConnServer(char *username,char *password,char *dbname); + + + /** + * ִSQL. + * @param SQL - SQL + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQLNoInputParam(char *SQL); + + /** + * ִSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQL(char *SQL,int inputValueCount,char **inputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * Ͽݿ. + * + * ORACLE ݿװ + */ + extern void DisConnServer(); + +#ifdef __cplusplus +} +#endif diff --git a/jf_erp_project/string_helper.cpp b/jf_erp_project/string_helper.cpp new file mode 100644 index 0000000..553e6f3 --- /dev/null +++ b/jf_erp_project/string_helper.cpp @@ -0,0 +1,146 @@ +/** +* @file string_helper.cpp +* @brief string utility functions' implemention +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +* 14-Jau-2009 James modify Split functions, add trim blank characters +*/ +#pragma warning(disable:4996) +// +//#include +//#include +//#include +#include "string_helper.h" + +string TrimString( string strArg ) +{ + size_t index1 = 0; + index1 = strArg.find_first_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin(), strArg.begin()+index1 ); + index1 = strArg.find_last_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin() + index1 + 1 ); + return strArg; +} + +void Split( string strArg, char spliter, vector &ans ) +{ + ans.clear(); + size_t index0 = 0; + string one_arg; + if ( strArg.find_first_not_of(' ') == string::npos ) + strArg = ""; + while( strArg.size()>0 ) + { + index0 = strArg.find_first_of( spliter ); + if( index0 != string::npos ) + { + one_arg = strArg.substr( 0,index0 ); + strArg = strArg.substr( index0 + 1 ); + ans.push_back( one_arg ); + } + else + { + ans.push_back( strArg ); + break; + } + } +} + +void Split( string strArg, string spliter, vector &ans ) +{ + + ans.clear(); + + size_t index0; + string one_arg; + + if ( strArg.find_first_not_of(" ") == string::npos ) + strArg = ""; + + + while( strArg.size()>0 ) + { + + index0 = strArg.find(spliter); + + if( index0 != string::npos ) + { + + one_arg = strArg.substr( 0, index0 ); + strArg = strArg.substr( index0 + spliter.size() ); + + ans.push_back( one_arg ); + } + else + { + + ans.push_back( strArg ); + break; + } + } +} + + +void RemoveLiner( string &in, string &out ) +{ + char buf[BUFSIZ] = ""; + for( int i=0; i<(int)in.size(); i++ ) + { + if( in[i] == '\n') + continue; + else + sprintf( buf,"%s%c", buf, in[i] ); + } + out.assign(buf); +} + +////Converting a WChar string to a Ansi string +//std::string WChar2Ansi(LPCWSTR pwszSrc) +//{ +// int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL); +// +// if (nLen<= 0) return std::string(""); +// +// char* pszDst = new char[nLen]; +// if (NULL == pszDst) return std::string(""); +// +// WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL); +// pszDst[nLen -1] = 0; +// +// std::string strTemp(pszDst); +// delete [] pszDst; +// +// return strTemp; +//} +// +//string ws2s(wstring& inputws){ return WChar2Ansi(inputws.c_str()); } +// +////Converting a Ansi string to WChar string +//std::wstring Ansi2WChar(LPCSTR pszSrc, int nLen) +//{ +// int nSize = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszSrc, nLen, 0, 0); +// if(nSize <= 0) return NULL; +// +// WCHAR *pwszDst = new WCHAR[nSize+1]; +// if( NULL == pwszDst) return NULL; +// +// MultiByteToWideChar(CP_ACP, 0,(LPCSTR)pszSrc, nLen, pwszDst, nSize); +// pwszDst[nSize] = 0; +// +// if( pwszDst[0] == 0xFEFF) // skip Oxfeff +// for(int i = 0; i < nSize; i ++) +// pwszDst[i] = pwszDst[i+1]; +// +// wstring wcharString(pwszDst); +// delete pwszDst; +// +// return wcharString; +//} +// +//std::wstring s2ws(const string& s){ return Ansi2WChar(s.c_str(),s.size());} + diff --git a/jf_erp_project/string_helper.h b/jf_erp_project/string_helper.h new file mode 100644 index 0000000..b4f7532 --- /dev/null +++ b/jf_erp_project/string_helper.h @@ -0,0 +1,25 @@ +/** +* @file string_helper.h +* @brief string utilities to help dealing with string +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef STRING_HELPER +#define STRING_HELPER + +#include +#include +using namespace std; + +string TrimString( string strArg ); +void Split( string strArg, char spliter, vector &ans ); +void Split( string strArg, string spliter, vector &ans ); +void RemoveLiner( string &in, string &out ); +//string ws2s(wstring& inputws); +//wstring s2ws(const string& s); + +#endif \ No newline at end of file diff --git a/jf_erp_project/string_utils.cxx b/jf_erp_project/string_utils.cxx new file mode 100644 index 0000000..07d93cb --- /dev/null +++ b/jf_erp_project/string_utils.cxx @@ -0,0 +1,253 @@ +/*================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +==================================================================================================================== +File description: + Filename: string_utils.c + Module : Common module. + + This file includes some operations of the string. + +==================================================================================================================== +Date Name Description of Change +3-Feb-2015 Ray li Initialize creation +$HISTORY$ +===================================================================================================================*/ +#ifndef _cplusplus +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE +#endif +#endif + +#include +#include +#include +#include +#include +#include + +#include "string_utils.h" + +//void Split( string strArg, string spliter, vector &ans ) +//{ +// ans.clear(); +// size_t index0; +// string one_arg; +// if ( strArg.find_first_not_of(' ') == string::npos ) +// strArg = ""; +// while( strArg.size()>0 ) +// { +// index0 = strArg.find(spliter); +// if( index0 != string::npos ) +// { +// one_arg = strArg.substr( 0, index0 ); +// strArg = strArg.substr( index0 + spliter.size() ); +// ans.push_back( one_arg ); +// } +// else +// { +// ans.push_back( strArg ); +// break; +// } +// } +//} +char* GSTR_clone( char **dst, const char *src ) +{ + char *retVal = NULL; + int srcLen = 0; + + *dst = NULL; + if (src == NULL) + return NULL; + + srcLen = (int)tc_strlen( src ) + 1; + *dst = (char*)MEM_alloc( srcLen * sizeof(char) ); + retVal = tc_strncpy( *dst, src, srcLen ); + (*dst)[srcLen - 1] = '\0'; + + return retVal; +} + +char* GSTR_copy( char *dst, const char *src, int dstSize ) +{ + char *retVal = tc_strncpy( dst, src, dstSize ); + dst[dstSize - 1] = '\0'; + return retVal; +} + +char* GSTR_int_to_string( char **dst, int value ) +{ + char strVal[128 + 1]; + + *dst = NULL; + memset( strVal, 0, sizeof(strVal)/sizeof(char) ); + sprintf( strVal, "%d", value ); + + return GSTR_clone( dst, strVal ); +} + +void GSTR_format_int_to_string( char *dst, int digitNum, int value ) +{ + char sNum[WSO_desc_size_c + 1]; + sprintf( sNum, "%%0%dd", digitNum ); + sprintf( dst, sNum, value ); +} + +void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ) +{ + char sNum[WSO_name_size_c + 1] = {0}; + char sNew[WSO_name_size_c + 1] = {0}; + sprintf( sNum, "%%%d.%ds", m, m ); + sprintf( sNew, sNum, dst ); + STRNG_replace_str( sNew, " ", fill_char, out ); +} + + +char* GSTR_string_append( const char *s1, const char *s2 ) +{ + char *s = NULL; + if (s1 == NULL || s2 == NULL) + { + GSTR_clone(&s, s1 == NULL ? (s2 == NULL ? "" : s2) : s1 ); + } + else + { + int size = (int)tc_strlen(s1) + (int)tc_strlen(s2) + 1; + s = (char *)MEM_alloc( size ); + tc_strcpy( s, s1 ); + tc_strcat( s, s2 ); + s[size - 1] = '\0'; + } + return s; +} + +logical GSTR_is_float(const char *str) +{ + logical isfloat = true; + char *pStr = (char *)str; + logical hasPositive = false; + logical hasMinus = false; + logical hasDot = false; + + if (str == NULL) + return false; + + while (*pStr != '\0' && isfloat == true) + { + if ( (*pStr >= '0' && *pStr <= '9')) + { + //continue; + } + else if ( *pStr == '+' ) + { + isfloat = (hasPositive ? false : (hasPositive = true)); + } + else if ( *pStr == '-' ) + { + isfloat = (hasMinus ? false : (hasMinus = true)); + } + else if ( *pStr == '.' ) + { + isfloat = (hasDot ? false : (hasDot = true)); + } + else + isfloat = false; + + pStr ++; + } + return isfloat; +} + +logical GSTR_is_number(const char *str) +{ + logical is_number = true; + char *pStr = (char *)str; + if (str == NULL) + return false; + + while (*pStr != '\0') + { + if ( !( (*pStr >= '0' && *pStr <= '9') || *pStr == '-' ) ) + { + is_number = false; + break; + } + pStr ++; + } + return is_number; +} + +logical GSTR_is_ascii(char ch) +{ + return ((unsigned int)ch) < 128; +} + +int GSTR_trim_l( char *str, char s ) +{ + int count = 0; + char *pointer = str, *poffset = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + while ( *pointer != '\0' ) + { + if ( *pointer != s ) + { + break; + } + count++; + pointer++; + } + if (count == 0) + return 0; + + poffset = str + count; + pointer = str; + while ( *poffset != '\0' ) + { + *pointer = *poffset; + pointer ++; + poffset ++; + } + *pointer = '\0'; + + return count; +} + +int GSTR_trim_r( char *str, char s ) +{ + int count = 0; + char *pointer = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + pointer = str + ((int) strlen(str) - 1); + + while ( pointer != str ) + { + if ( *pointer != s ) + { + break; + } + + *pointer = '\0'; + + count++; + pointer--; + } + + return count; +} + +void GSTR_trim_float( char *floatValue ) +{ + if ( !IS_EMPTY(floatValue) && tc_strstr(floatValue, ".") != NULL ) + { + int len = 0; + GSTR_trim_r(floatValue, '0'); + len = (int)tc_strlen(floatValue); + if (floatValue[ len - 1 ] == '.') + floatValue[ len - 1 ] = '\0'; + } +} + diff --git a/jf_erp_project/string_utils.h b/jf_erp_project/string_utils.h new file mode 100644 index 0000000..4b379cc --- /dev/null +++ b/jf_erp_project/string_utils.h @@ -0,0 +1,125 @@ +/*===================================================================================================================== + Copyright(c) 2005 ORIGIN PLM Software Corp. All rights reserved. + Unpublished - All rights reserved +======================================================================================================================= +File description: + Filename: string_utils.h + Module : Common module. + + This file includes some operations of the string. + +======================================================================================================================= +Date Name Description of Change +14-Jul-2009 Ray Li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#ifndef STRING_UTILS_H +#define STRING_UTILS_H +#include +#include +#include +using namespace std; +#ifdef __cplusplus + extern "C" + { +#endif + +// @{{ String assister +#define IS_NULL(S) ((S)==NULL) +#define IS_EMPTY(S) (((S)==NULL) || !(*(S))) +// @}} + void Split( string strArg, string spliter, vector &ans ); + /** + * Clones the string. + * @param dst - the output string. + * @param src - the string to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_clone( char **dst, const char *src ); + + /** + * Copy safely the string with null end. + * @param dst - the output string. + * @param src - the string to be cloned. + * @param dstSize - the size of output string. + * @return - the destinatin string pointer. + */ + extern char *GSTR_copy( char *dst, const char *src, int dstSize ); + + /** + * Converts int to string. + * @param dst - the output string. + * @param value - the int to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_int_to_string( char **dst, int value ); + + /** + * Formats the int/string value as string. + * @param dst - the destination string. + * @param digitNum - the digit number of the value. + * @param value - the value to be converted. + * @return - N/A. + */ + extern void GSTR_format_int_to_string( char *dst, int digitNum, int value ); + extern void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ); + + /** + * Appends the strings( never null returned ) + * @param s1 - string 1 + * @param s2 - string 2 + * @return - new string + */ + extern char* GSTR_string_append( const char *s1, const char *s2 ); + + /** + * Whether the string is float type + * @param str - The string + * + * NOTE: it's only check whether each word is in "+-.0123456789", not care the float with "E" or the float rule, + * like "00-1.+01", it will return true. + * @return - return true if it is one. + */ + extern logical GSTR_is_float(const char *str); + + /** + * Whether all char of the string are number + * @param str - The string + * + * NOTE: it's only check whether each word is in "0123456789" + * @return - return true if it is one. + */ + extern logical GSTR_is_number(const char *str); + + /** + * Is ascii char + * @param ch - ascii char + * @return - return true if it is. + */ + extern logical GSTR_is_ascii(char ch); + + /** + * Trims the string's prefix. + * @param str - The string + * @param s - The char + * + * @return - count. + */ + extern int GSTR_trim_l( char *str, char s ); + extern int GSTR_trim_r( char *str, char s ); + + /** + * Remove the zero. + * For Example: + * floatValue="50.00" -> = "50" + * floatValue="50.0100" -> = "50.01" + * @return - count. + */ + extern void GSTR_trim_float( char *floatValue ); + +#ifdef __cplusplus + } +#endif + + +#endif //STRING_UTILS_H diff --git a/jf_erp_project/x64/Release/CL.read.1.tlog b/jf_erp_project/x64/Release/CL.read.1.tlog new file mode 100644 index 0000000..bdf14e1 Binary files /dev/null and b/jf_erp_project/x64/Release/CL.read.1.tlog differ diff --git a/jf_erp_project/x64/Release/CL.write.1.tlog b/jf_erp_project/x64/Release/CL.write.1.tlog new file mode 100644 index 0000000..7e9800c Binary files /dev/null and b/jf_erp_project/x64/Release/CL.write.1.tlog differ diff --git a/jf_erp_project/x64/Release/cl.command.1.tlog b/jf_erp_project/x64/Release/cl.command.1.tlog new file mode 100644 index 0000000..4d49d29 Binary files /dev/null and b/jf_erp_project/x64/Release/cl.command.1.tlog differ diff --git a/jf_erp_project/x64/Release/common_itk_util.obj b/jf_erp_project/x64/Release/common_itk_util.obj new file mode 100644 index 0000000..e438445 Binary files /dev/null and b/jf_erp_project/x64/Release/common_itk_util.obj differ diff --git a/jf_erp_project/x64/Release/jf_erp_project.lastbuildstate b/jf_erp_project/x64/Release/jf_erp_project.lastbuildstate new file mode 100644 index 0000000..8997680 --- /dev/null +++ b/jf_erp_project/x64/Release/jf_erp_project.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|x64|F:\Connor(项目管理)\继峰项目\签名\jf_itk\| diff --git a/jf_erp_project/x64/Release/jf_erp_project.log b/jf_erp_project/x64/Release/jf_erp_project.log new file mode 100644 index 0000000..745d0d7 --- /dev/null +++ b/jf_erp_project/x64/Release/jf_erp_project.log @@ -0,0 +1,23 @@ +生成启动时间为 2015/9/17 19:47:48。 + 1>项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\jf_erp_project.vcxproj”在节点 2 上(build 个目标)。 + 1>InitializeBuildStatus: + 正在对“x64\Release\jf_erp_project.unsuccessfulbuild”执行 Touch 任务。 + ClCompile: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W1 /WX- /O2 /D IPLIB=none /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Release\\" /Fd"x64\Release\vc100.pdb" /Gd /TC /errorReport:prompt common_itk_util.c + common_itk_util.c + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /IF:\Teamcenter10.1.0Env\OCI\include /IF:\Teamcenter10.1.0Env\tcbin\include /Zi /nologo /W1 /WX- /O2 /D IPLIB=none /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Release\\" /Fd"x64\Release\vc100.pdb" /Gd /TP /errorReport:prompt jf_erp_project.cpp + jf_erp_project.cpp + 1>f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\common_itk_util.h(30): error C2065: “logical”: 未声明的标识符 + 1>f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\common_itk_util.h(30): error C2146: 语法错误: 缺少“)”(在标识符“bypass”的前面) + 1>f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\common_itk_util.h(30): error C2182: “set_bypass”: 非法使用“void”类型 + 1>f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\common_itk_util.h(30): error C2059: 语法错误:“)” + 1>F:\Teamcenter10.1.0Env\tcbin\include\pom/pom/pom_errors.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + 1>F:\Teamcenter10.1.0Env\tcbin\include\pom/pom/pom_errors.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + 1>F:\Teamcenter10.1.0Env\tcbin\include\pom/pom/pom_errors.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + 1>f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\string_utils.h(31): error C2732: 链接规范与“Split”的早期规范冲突 + f:\connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\string_utils.h(31) : 参见“Split”的声明 + 1>已完成生成项目“F:\Connor(项目管理)\继峰项目\签名\jf_itk\jf_erp_project\jf_erp_project.vcxproj”(build 个目标)的操作 - 失败。 + +生成失败。 + +已用时间 00:00:00.96 diff --git a/jf_erp_project/x64/Release/jf_erp_project.unsuccessfulbuild b/jf_erp_project/x64/Release/jf_erp_project.unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_project/x64/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache b/jf_erp_project/x64/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache new file mode 100644 index 0000000..bde9b77 Binary files /dev/null and b/jf_erp_project/x64/Release/jf_erp_project.vcxprojResolveAssemblyReference.cache differ diff --git a/jf_erp_project/x64/Release/jf_erp_project.write.1.tlog b/jf_erp_project/x64/Release/jf_erp_project.write.1.tlog new file mode 100644 index 0000000..e69de29 diff --git a/jf_erp_project/x64/Release/link.command.1.tlog b/jf_erp_project/x64/Release/link.command.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/x64/Release/link.command.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/x64/Release/link.read.1.tlog b/jf_erp_project/x64/Release/link.read.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/x64/Release/link.read.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/x64/Release/link.write.1.tlog b/jf_erp_project/x64/Release/link.write.1.tlog new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/jf_erp_project/x64/Release/link.write.1.tlog @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jf_erp_project/x64/Release/ocilib.obj b/jf_erp_project/x64/Release/ocilib.obj new file mode 100644 index 0000000..5e60a28 Binary files /dev/null and b/jf_erp_project/x64/Release/ocilib.obj differ diff --git a/jf_erp_project/x64/Release/string_helper.obj b/jf_erp_project/x64/Release/string_helper.obj new file mode 100644 index 0000000..1b60716 Binary files /dev/null and b/jf_erp_project/x64/Release/string_helper.obj differ diff --git a/jf_erp_project/x64/Release/string_utils.obj b/jf_erp_project/x64/Release/string_utils.obj new file mode 100644 index 0000000..1097816 Binary files /dev/null and b/jf_erp_project/x64/Release/string_utils.obj differ diff --git a/jf_erp_project/x64/Release/vc100.pdb b/jf_erp_project/x64/Release/vc100.pdb new file mode 100644 index 0000000..c9e7a88 Binary files /dev/null and b/jf_erp_project/x64/Release/vc100.pdb differ diff --git a/jf_itk/Connor_CAD_Convert_PDF.cpp b/jf_itk/Connor_CAD_Convert_PDF.cpp new file mode 100644 index 0000000..2aacaa7 --- /dev/null +++ b/jf_itk/Connor_CAD_Convert_PDF.cpp @@ -0,0 +1,311 @@ +#include "connor_cad.h" +#include "k_util.h" +#include +#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING +#include +#pragma comment(lib, "ws2_32.lib") +#pragma warning(disable:4996) +#define ITK_err 919012 +#include +using namespace std; + + +int ConvertPDF(tag_t rev, tag_t dataset, tag_t relation, const char* dir_path, const char* ref_name, const char* ext, bool remove_file, char* tz_path) { + int ifail = ITK_ok; + char* object_string = NULL, * object_name = NULL; + char* origin_file_name = NULL; + char temp_file[SS_MAXPATHLEN] = ""; + string pdf_path, pdf_name, out_pdf_path; + ITKCALL(ifail = AOM_ask_value_string(dataset, "object_string", &object_string)); + Log("ʼݼ%s", (object_string)); + tag_t spec_dataset_rev = NULLTAG, ref_object = NULLTAG, pdf_dataset = NULLTAG, pdf_dataset_type = NULLTAG, pdf_relation_tag = NULLTAG; + AE_reference_type_t reference_type; + ITKCALL(ifail = AE_ask_dataset_latest_rev(dataset, &spec_dataset_rev)); + ITKCALL(ifail = AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object)); + if (reference_type == AE_PART_OF) + { + // + ITKCALL(ifail = IMF_ask_original_file_name2(ref_object, &origin_file_name)); + // char new_ds_name[WSO_name_size_c + 1] = ""; + // char* new_file_name = USER_new_file_name(new_ds_name, ref_name, ext, 0); + strcpy_s(temp_file, dir_path); + strcat_s(temp_file, "\\"); + strcat_s(temp_file, origin_file_name); + ITKCALL(ifail = IMF_export_file(ref_object, temp_file)); + if (ifail != ITK_ok) { + goto end; + } + Log("·%s", temp_file); + // ýӿ + string request; + request.append("PDF|").append(temp_file).append("|"); + Log("%s", request.c_str()); + { + int sock; + int valread; + const int BUF_SIZE = 1024; + char buffer[BUF_SIZE] = { 0 }; + struct sockaddr_in serv_addr; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("Socketʧ"))); + ifail = ITK_err; + goto end; + } + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + serv_addr.sin_port = htons(PORT); + // Convert IPv4 and IPv6 addresses from text to binary form + if (connect(sock, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) + { + Log("ʧܣͷSocket"); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("޷ӵCAD"))); + ifail = ITK_err; + goto end; + } + const char* requestU = G2U(request.c_str()); + send(sock, requestU, strlen(requestU), 0); + Log("ѷ"); + recv(sock, buffer, BUF_SIZE, 0); + Log("յϢ%s", buffer); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + if (strcmp("OFF", buffer) == 0) { + goto end; + } + if (strcmp(SOCKET_SUCCESS, buffer) != 0) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("תPDF"), U2G(buffer))); + ifail = ITK_err; + goto end; + } + } + // ϴļ + Log("ִɣʼϴļ"); + pdf_path.assign(temp_file); + pdf_path = pdf_path.substr(0, pdf_path.length() - 4).append(".pdf"); + out_pdf_path = pdf_path.substr(0, pdf_path.length() - 4).append("-1").append(".pdf"); + Log("PDFļ%s", (pdf_path.c_str())); + if (!std::experimental::filesystem::exists((pdf_path.c_str()))) { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("תPDF쳣ļڻͼֽ"))); + ifail = ITK_err; + goto end; + } + pdf_name.assign(origin_file_name); + pdf_name = pdf_name.substr(0, pdf_name.length() - 4).append(".pdf"); + ITKCALL(ifail = AE_find_datasettype2("PDF", &pdf_dataset_type)); + if (ifail != ITK_ok) { + goto end; + } + ITKCALL(ifail = AOM_ask_value_string(dataset, "object_name", &object_name)); + ITKCALL(ifail = AE_create_dataset_with_id(pdf_dataset_type, object_name, "", "", "A", &pdf_dataset)); + ITKCALL(ifail = AOM_save(pdf_dataset)); + ITKCALL(ifail = GRM_create_relation(rev, pdf_dataset, relation, NULL, &pdf_relation_tag)); + ITKCALL(ifail = GRM_save_relation(pdf_relation_tag)); + Log("½ݼɣ%s", object_name); + ITKCALL(ifail = AE_ask_dataset_latest_rev(pdf_dataset, &spec_dataset_rev)); + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + char cmd[256] = ""; + char* tc_root_dir = getenv("tc_root"); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HS_PDFSignoff.jar"); + strcat(cmd, " \""); + strcat(cmd, pdf_path.c_str()); + strcat(cmd, "\" \""); + strcat(cmd, out_pdf_path.c_str()); + strcat(cmd, "\" \""); + strcat(cmd, tz_path); + strcat(cmd, "\""); + printf("\n%s\n", cmd); + system(cmd); + ITKCALL(ifail = IMF_import_file(out_pdf_path.c_str(), NULL, SS_BINARY, &new_file_tag, &file_descriptor)); + ITKCALL(ifail = AOM_lock(new_file_tag)); + ITKCALL(ifail = IMF_set_original_file_name2(new_file_tag, pdf_name.c_str())); + ITKCALL(ifail = IMF_close_file(file_descriptor)); + ITKCALL(ifail = AOM_save(new_file_tag)); + ITKCALL(ifail = AOM_unlock(new_file_tag)); + ITKCALL(ifail = AOM_lock(spec_dataset_rev)); + ITKCALL(ifail = AE_add_dataset_named_ref2(spec_dataset_rev, "PDF_Reference", AE_PART_OF, new_file_tag)); + ITKCALL(ifail = AE_save_myself(spec_dataset_rev)); + ITKCALL(ifail = AOM_unlock(spec_dataset_rev)); + Log("ϴ"); + } +end: + // ɾļ + if (remove_file && strlen(temp_file) > 0) { + remove(temp_file); + } + if (remove_file && pdf_path.size() > 0) { + remove(pdf_path.c_str()); + } + if (remove_file && out_pdf_path.size() > 0) { + remove(out_pdf_path.c_str()); + } + if (remove_file && strlen(tz_path) > 0) { + Log("ɾͼļ"); + remove(tz_path); + } + DOFREE(origin_file_name); + DOFREE(object_string); + DOFREE(object_name); + return ifail; +} + +int Connor_CAD_Convert_PDF(EPM_action_message_t msg) { + int ifail = ITK_ok, att_cnt = 0, pref_cnt = 0; + tag_t root_task = NULLTAG, * attachments = NULL, relation_tag = NULLTAG; + char* object_string = NULL, * object_type = NULL, ** pref_values = NULL; + string dataset_rel, dataset_type, dataset_ref; + bool has_err = false; + bool remove_file = true; + tag_t current_task = msg.task; + ITKCALL(ifail = EPM_ask_root_task(current_task, &root_task)); + if (ifail != ITK_ok) { goto end; } + Log("====================================================="); + Log("Connor_CAD_Convert_PDF ʼִ"); + Log("====================================================="); + _sleep(2 * 1000);//ʱ1 + // + int arg_cnt = 0; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + char TZ[16] = ""; + arg_cnt = TC_number_of_arguments(msg.arguments); + printf("Ϊ%d\n", arg_cnt); + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ifail = ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (stricmp(argflag, "type") == 0) + { + if (argvalue != NULL) + { + strcpy(TZ, argvalue); + } + } + + } + if (argflag != NULL) { + MEM_free(argflag); + argflag = NULL; + } + + } + char* tz_uid; + char tz_path[512] = ""; + //ITKCALL(PREF_ask_char_values("HS_UNIT_CODE", &value_count, &values)); + char tzs[64] = "HS2_TZ_"; + Log("3.21ͼ²: [%s]", TZ); + strcat(tzs, TZ); + ITKCALL(PREF_ask_char_value(tzs, 0, &tz_uid)); + Log("3.21ͼuid: [%s]", tz_uid); + tag_t tz_target; + ITK__convert_uid_to_tag(tz_uid, &tz_target); + int target_count = 0; + tag_t* target_tags = NULL; + char* target_type; + ITKCALL(AOM_ask_value_tags(tz_target, "ref_list", &target_count, &target_tags)); + ITKCALL(AOM_ask_value_string(target_tags[0], "file_ext", &target_type)); + strcat(tz_path, getenv("TEMP")); + strcat(tz_path, TZ); + strcat(tz_path, "TZ."); + strcat(tz_path, target_type); + IMF_export_file(target_tags[0], tz_path); + Log("3.21ͼģ·: [%s]", tz_path); + ITKCALL(ifail = EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + Log("Ŀö"); + goto end; + } + set_bypass(true); + ITKCALL(ifail = PREF_ask_logical_value(PREF_REMOVE_FILE, 0, &remove_file)); + if (ifail != ITK_ok) { + EMH_clear_last_error(ifail); + } + if (remove_file) { + Log("ʱļ"); + } + else { + Log("ʱļ"); + } + // ϴ + ITKCALL(ifail = PREF_ask_char_values(PREF_UPLOAD_FILE, &pref_cnt, &pref_values)); + if (ifail != ITK_ok) { goto end; } + if (pref_cnt < 3) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ѡô"), PREF_SIGNATURE)); + ifail = ITK_err; + goto end; + } + dataset_rel.assign(pref_values[0]); + dataset_type.assign(pref_values[1]); + dataset_ref.assign(pref_values[2]); + Log("ݼ: [%s][%s][%s]", dataset_rel.c_str(), dataset_type.c_str(), dataset_ref.c_str()); + ITKCALL(ifail = GRM_find_relation_type(dataset_rel.c_str(), &relation_tag)); + if (ifail != ITK_ok) { + Log("ϵδҵ"); + goto end; + } + DOFREE(pref_values); + if (ifail != ITK_ok) { goto end; } + for (int i = 0; i < att_cnt; i++) { + DOFREE(object_string); + DOFREE(object_type); + tag_t target = attachments[i]; + vector dataset_tags; + string dir_path, dir_path2; + ITKCALL(ifail = AOM_ask_value_string(target, "object_string", &object_string)); + ITKCALL(ifail = WSOM_ask_object_type2(target, &object_type)); + Log("%d. %s [%s]", i + 1, (object_string), object_type); + if (!isType(target, "ItemRevision")) { + continue; + } + // ѯݼ + ifail = GetDatasets(target, dataset_rel, dataset_type, dataset_tags); + int dataset_cnt = dataset_tags.size(); + Log("ҵݼ%d", dataset_cnt); + if (dataset_cnt == 0) { + continue; + } + // ʱļ + ifail = CreateTempFolder1(dir_path); + //ifail = CreateTempFolder(dir_path2); + if (ifail != ITK_ok) { + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("ʱĿ¼ʧ"))); + goto end; + } + for (int j = 0; j < dataset_cnt; j++) { + tag_t dataset_tag = dataset_tags[j]; + ifail = ConvertPDF(target, dataset_tag, relation_tag, dir_path.c_str(), dataset_ref.c_str(), "dwg", remove_file, tz_path); + if (ifail != ITK_ok) { + has_err = true; + } + } + + // ļ + if (remove_file) { + std::experimental::filesystem::remove_all(dir_path.c_str()); + } + // rmdir(dir_path.c_str()); + } + +end: + Log("====================================================="); + Log("Connor_CAD_Convert_PDF ִн"); + Log("====================================================="); + set_bypass(false); + if (has_err) { + ifail = ITK_err; + } + DOFREE(pref_values); + DOFREE(object_string); + DOFREE(object_type); + DOFREE(attachments); + return ifail; +} \ No newline at end of file diff --git a/jf_itk/Connor_CAD_Signature.cpp b/jf_itk/Connor_CAD_Signature.cpp new file mode 100644 index 0000000..d78cb9b --- /dev/null +++ b/jf_itk/Connor_CAD_Signature.cpp @@ -0,0 +1,689 @@ +#include "connor_cad.h" +#include "k_util.h" +#include +#include +#pragma comment(lib, "ws2_32.lib") +#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING +#include +#pragma warning(disable:4996) +#define ITK_err 919011 +#define PROP_LOCATION_ITEM "item" +#define PROP_LOCATION_REV "rev" +#define PROP_LOCATION_ITEMMASTER "itemmaster" +#define PROP_LOCATION_REVMASTER "revmaster" + +typedef struct { + string prop_location; + string prop_name; +} Prop_Config; + +typedef struct { + string rev_type; + string title_block_names; + map prop_config_map; +} Sign_Config; + +int ParseConfigFromPreference(map& sign_config_map) { + int ifail = ITK_ok, pref_cnt = 0; + char** pref_values = NULL; + ITKCALL(ifail = PREF_ask_char_values(PREF_SIGNATURE, &pref_cnt, &pref_values)); + if (ifail != ITK_ok) { goto end; } + for (int i = 0; i < pref_cnt; i++) { + + string value, rev_type, title_block_names; + map prop_config_map; + vector prop_configs; + value.assign(pref_values[i]); + printf("1111\n"); + int ind = value.find(":"); + if (ind == string::npos || ind == 0) { + continue; + } + printf("2222\n"); + rev_type = value.substr(0, ind); + printf("rev_type:%s\n", rev_type.c_str()); + if (sign_config_map.count(rev_type) > 0) { + continue; + } + printf("3333\n"); + value = value.substr(ind + 1); + ind = value.find(":"); + if (ind == string::npos || ind == 0) { + continue; + } + printf("4444\n"); + title_block_names = value.substr(0, ind); + value = value.substr(ind + 1); + Splits(value, ";", prop_configs); + int size = prop_configs.size(); + + for (int j = 0; j < size; j++) { + string cad_prop_name, prop_location, prop_name; + value = prop_configs[j]; + ind = value.find("="); + if (ind == string::npos || ind == 0) { + continue; + } + + cad_prop_name = value.substr(0, ind); + if (prop_config_map.count(cad_prop_name) > 0) { + continue; + } + + value = value.substr(ind + 1); + ind = value.find("."); + if (ind == string::npos || ind == 0) { + continue; + } + + prop_location = value.substr(0, ind); + prop_name = value.substr(ind + 1); + if (prop_name.empty()) { + continue; + } + + transform(prop_location.begin(), prop_location.end(), prop_location.begin(), ::tolower); + if (prop_location._Equal(PROP_LOCATION_ITEM) + || prop_location._Equal(PROP_LOCATION_REV) + || prop_location._Equal(PROP_LOCATION_ITEMMASTER) + || prop_location._Equal(PROP_LOCATION_REVMASTER)) { + Prop_Config prop_config; + prop_config.prop_location = prop_location; + prop_config.prop_name = prop_name; + prop_config_map.insert(make_pair(cad_prop_name, prop_config)); + } + } + if (prop_config_map.size() > 0) { + Sign_Config sign_config; + sign_config.rev_type = rev_type; + sign_config.title_block_names = title_block_names; + sign_config.prop_config_map = prop_config_map; + sign_config_map.insert(make_pair(rev_type, sign_config)); + printf("%d\n", i); + } + } + if (sign_config_map.size() < 1) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ѡô"), PREF_SIGNATURE)); + ifail = ITK_err; + } +end: + DOFREE(pref_values); + return ifail; +} + +int ReadSignInfo(tag_t rev_tag, Sign_Config sign_config, string& info) { + int ifail = ITK_ok; + map::iterator iter; + char* prop_value = NULL, * object_string = NULL; + tag_t item_tag = NULLTAG, item_master_tag = NULLTAG, rev_master_tag = NULLTAG; + ITKCALL(ifail = AOM_refresh(rev_tag, false)); + if (ifail != ITK_ok) { + goto end; + } + ITKCALL(ifail = AOM_ask_value_string(rev_tag, "object_string", &object_string)); + for (iter = sign_config.prop_config_map.begin(); iter != sign_config.prop_config_map.end(); iter++) { + string cad_prop_name = iter->first; + Prop_Config prop_config = iter->second; + DOFREE(prop_value); + printf("cad_prop_name:%s,prop_location:%s/n", cad_prop_name, prop_config.prop_location); + if (prop_config.prop_location._Equal(PROP_LOCATION_ITEM)) { + if (item_tag == NULLTAG) { + ITKCALL(ifail = ITEM_ask_item_of_rev(rev_tag, &item_tag)); + if (ifail != ITK_ok) { + goto end; + } + if (item_tag == NULLTAG) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ȡ汾ӦItem쳣"), object_string)); + ifail = ITK_err; + goto end; + } + ITKCALL(ifail = AOM_refresh(item_tag, false)); + if (ifail != ITK_ok) { + goto end; + } + } + ITKCALL(ifail = AOM_UIF_ask_value(item_tag, prop_config.prop_name.c_str(), &prop_value)); + } + else if (prop_config.prop_location._Equal(PROP_LOCATION_REV)) { + ITKCALL(ifail = AOM_UIF_ask_value(rev_tag, prop_config.prop_name.c_str(), &prop_value)); + } + else if (prop_config.prop_location._Equal(PROP_LOCATION_ITEMMASTER)) { + if (item_tag == NULLTAG) { + ITKCALL(ifail = ITEM_ask_item_of_rev(rev_tag, &item_tag)); + if (ifail != ITK_ok) { + goto end; + } + if (item_tag == NULLTAG) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ȡ汾ӦItem쳣"), object_string)); + ifail = ITK_err; + goto end; + } + ITKCALL(ifail = AOM_refresh(item_tag, false)); + if (ifail != ITK_ok) { + goto end; + } + } + if (item_master_tag == NULLTAG) { + int master_cnt = 0; + tag_t* master_tags = NULL; + ITKCALL(ifail = AOM_ask_value_tags(item_tag, "IMAN_master_form", &master_cnt, &master_tags)); + if (ifail != ITK_ok) { + goto end; + } + if (master_cnt == 0) { + DOFREE(master_tags); + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ȡԱ쳣"), object_string)); + ifail = ITK_err; + goto end; + } + item_master_tag = master_tags[0]; + DOFREE(master_tags); + ITKCALL(ifail = AOM_refresh(item_master_tag, false)); + if (ifail != ITK_ok) { + goto end; + } + } + ITKCALL(ifail = AOM_UIF_ask_value(item_master_tag, prop_config.prop_name.c_str(), &prop_value)); + } + else if (prop_config.prop_location._Equal(PROP_LOCATION_REVMASTER)) { + if (rev_master_tag == NULLTAG) { + int master_cnt = 0; + tag_t* master_tags = NULL; + ITKCALL(ifail = AOM_ask_value_tags(rev_tag, "IMAN_master_form_rev", &master_cnt, &master_tags)); + if (ifail != ITK_ok) { + goto end; + } + if (master_cnt == 0) { + DOFREE(master_tags); + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ȡ汾Ա쳣"), object_string)); + ifail = ITK_err; + goto end; + } + rev_master_tag = master_tags[0]; + DOFREE(master_tags); + ITKCALL(ifail = AOM_refresh(rev_master_tag, false)); + if (ifail != ITK_ok) { + goto end; + } + } + ITKCALL(ifail = AOM_UIF_ask_value(rev_master_tag, prop_config.prop_name.c_str(), &prop_value)); + } + if (prop_value == NULL || strcmp("", prop_value) == 0) { + continue; + } + info.append("\n").append(cad_prop_name).append("=").append(prop_value); + } + if (!info.empty()) { + info.insert(0, sign_config.title_block_names); + } +end: + DOFREE(object_string); + DOFREE(prop_value); + return ifail; +} + + + +int SignCAD(tag_t dataset, const char* dir_path, const char* ref_name, const char* ext, bool remove_file) { + int ifail = ITK_ok; + char* object_string = NULL; + char* origin_file_name = NULL; + char temp_file[SS_MAXPATHLEN] = ""; + ITKCALL(ifail = AOM_ask_value_string(dataset, "object_string", &object_string)); + Log("ʼݼ%s", object_string); + tag_t spec_dataset_rev = NULLTAG, ref_object = NULLTAG; + AE_reference_type_t reference_type; + ITKCALL(ifail = AE_ask_dataset_latest_rev(dataset, &spec_dataset_rev)); + ITKCALL(ifail = AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object)); + if (reference_type == AE_PART_OF) + { + // + ITKCALL(ifail = IMF_ask_original_file_name2(ref_object, &origin_file_name)); + strcpy_s(temp_file, dir_path); + strcat_s(temp_file, "\\"); + strcat_s(temp_file, origin_file_name); + ITKCALL(ifail = IMF_export_file(ref_object, temp_file)); + if (ifail != ITK_ok) { + goto end; + } + Log("·%s", temp_file); + // ýӿ + string request; + request.append("SYNC|").append(temp_file).append("|"); + Log("%s", request.c_str()); + { + SOCKET sock; + int valread; + const int BUF_SIZE = 1024; + char buffer[BUF_SIZE] = { 0 }; + struct sockaddr_in serv_addr; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("Socketʧ"))); + ifail = ITK_err; + goto end; + } + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + serv_addr.sin_port = htons(PORT); + // Convert IPv4 and IPv6 addresses from text to binary form + if (connect(sock, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) + { + Log("ʧܣͷSocket"); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("޷ӵCAD"))); + ifail = ITK_err; + goto end; + } + + const char* requestU = G2U(request.c_str()); + send(sock, requestU, strlen(requestU), 0); + Log("ѷ"); + recv(sock, buffer, BUF_SIZE, 0); + Log("յϢ%s", buffer); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + if (strcmp(SOCKET_SUCCESS, buffer) != 0) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ǩ"), (buffer))); + ifail = ITK_err; + goto end; + } + } + // ϴļ + Log("ִɣʼϴļ"); + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + ITKCALL(ifail = IMF_import_file(temp_file, NULL, SS_BINARY, &new_file_tag, &file_descriptor)); + ITKCALL(ifail = AOM_lock(new_file_tag)); + ITKCALL(ifail = IMF_set_original_file_name2(new_file_tag, origin_file_name)); + ITKCALL(ifail = IMF_close_file(file_descriptor)); + ITKCALL(ifail = AOM_save(new_file_tag)); + ITKCALL(ifail = AOM_unlock(new_file_tag)); + ITKCALL(ifail = AOM_lock(spec_dataset_rev)); + ITKCALL(ifail = AE_remove_dataset_named_ref_by_tag2(spec_dataset_rev, ref_name, ref_object)); + ITKCALL(ifail = AE_add_dataset_named_ref2(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag)); + ITKCALL(ifail = AE_save_myself(spec_dataset_rev)); + ITKCALL(ifail = AOM_unlock(spec_dataset_rev)); + Log("ϴ"); + + } +end: + // ɾļ + if (remove_file && strlen(temp_file) > 0) { + remove(temp_file); + } + DOFREE(origin_file_name); + DOFREE(object_string); + return ifail; +} + +int Connor_CAD_Signature(EPM_action_message_t msg) { + int ifail = ITK_ok, att_cnt = 0, pref_cnt = 0; + tag_t root_task = NULLTAG, * attachments = NULL; + map sign_config_map; + char* object_string = NULL, * object_type = NULL, ** pref_values = NULL; + string dataset_rel, dataset_type, dataset_ref; + bool has_err = false; + logical remove_file = true; + tag_t current_task = msg.task; + ITKCALL(ifail = EPM_ask_root_task(current_task, &root_task)); + if (ifail != ITK_ok) { goto end; } + Log("====================================================="); + Log("Connor_CAD_Signature ʼִ"); + Log("====================================================="); + + ITKCALL(ifail = EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + Log("Ŀö"); + goto end; + } + set_bypass(true); + ITKCALL(ifail = PREF_ask_logical_value(PREF_REMOVE_FILE, 0, &remove_file)); + if (ifail != ITK_ok) { + EMH_clear_last_error(ifail); + } + if (remove_file) { + Log("ʱļ"); + } + else { + Log("ʱļ"); + } + // ϴ + ITKCALL(ifail = PREF_ask_char_values(PREF_UPLOAD_FILE, &pref_cnt, &pref_values)); + if (ifail != ITK_ok) { goto end; } + if (pref_cnt < 3) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ѡô"), PREF_SIGNATURE)); + ifail = ITK_err; + goto end; + } + dataset_rel.assign(pref_values[0]); + dataset_type.assign(pref_values[1]); + dataset_ref.assign(pref_values[2]); + Log("ݼ: [%s][%s][%s]", dataset_rel.c_str(), dataset_type.c_str(), dataset_ref.c_str()); + DOFREE(pref_values); + // ǩ + ifail = ParseConfigFromPreference(sign_config_map); + if (ifail != ITK_ok) { goto end; } + for (int i = 0; i < att_cnt; i++) { + DOFREE(object_string); + DOFREE(object_type); + tag_t target = attachments[i]; + vector dataset_tags; + string info, dir_path, info_path; + ITKCALL(ifail = AOM_ask_value_string(target, "object_string", &object_string)); + ITKCALL(ifail = WSOM_ask_object_type2(target, &object_type)); + Log("%d. %s [%s]", i + 1, object_string, object_type); + if (sign_config_map.count(object_type) < 1) { + continue; + } + Sign_Config sign_config = sign_config_map[object_type]; + // ѯݼ + ifail = GetDatasets(target, dataset_rel, dataset_type, dataset_tags); + int dataset_cnt = dataset_tags.size(); + Log("ҵݼ%d", dataset_cnt); + if (dataset_cnt == 0) { + continue; + } + // ȡ + ifail = ReadSignInfo(target, sign_config, info); + if (ifail != ITK_ok) { + goto end; + } + if (info.size() < 2) { + Log("ǩ"); + continue; + } + Log("ǩݣ\n====================================\n%s\n====================================", info.c_str()); + // ʱļ + ifail = CreateTempFolder(dir_path); + if (ifail != ITK_ok) { + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("ʱĿ¼ʧ"))); + goto end; + } + // ׼info.txt + info_path.append(dir_path).append("\\info.txt"); + printf("ӳļ·:%s,ӳ:%s", info_path.c_str(), info.c_str()); + + ifail = WriteToFile(info_path.c_str(), G2U(info.c_str())); + if (ifail != ITK_ok) { + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("ӳļʧ"))); + goto end; + } + for (int j = 0; j < dataset_cnt; j++) { + tag_t dataset_tag = dataset_tags[j]; + ifail = SignCAD(dataset_tag, dir_path.c_str(), dataset_ref.c_str(), "dwg", remove_file); + if (ifail != ITK_ok) { + has_err = true; + } + } + // ļ + if (remove_file) { + remove(info_path.c_str()); + std::experimental::filesystem::remove_all(dir_path.c_str()); + } + //rmdir(dir_path.c_str()); + } +end: + Log("====================================================="); + Log("Connor_CAD_Signature ִн"); + Log("====================================================="); + set_bypass(false); + if (has_err) { + ifail = ITK_err; + } + DOFREE(pref_values); + DOFREE(object_string); + DOFREE(object_type); + DOFREE(attachments); + return ifail; +} + + + +int Test(tag_t dataset, const char* dir_path, const char* ref_name, const char* ext) { + int ifail = ITK_ok; + char* object_string = NULL; + char* origin_file_name = NULL; + char temp_file[SS_MAXPATHLEN] = ""; + string pdf_path; + ITKCALL(ifail = AOM_ask_value_string(dataset, "object_string", &object_string)); + Log("ʼݼ%s", object_string); + tag_t spec_dataset_rev = NULLTAG, ref_object = NULLTAG; + AE_reference_type_t reference_type; + ITKCALL(ifail = AE_ask_dataset_latest_rev(dataset, &spec_dataset_rev)); + ITKCALL(ifail = AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object)); + if (reference_type == AE_PART_OF) + { + // + ITKCALL(ifail = IMF_ask_original_file_name2(ref_object, &origin_file_name)); + strcpy_s(temp_file, dir_path); + strcat_s(temp_file, "\\"); + strcat_s(temp_file, origin_file_name); + ITKCALL(ifail = IMF_export_file(ref_object, temp_file)); + if (ifail != ITK_ok) { + goto end; + } + Log("·%s", temp_file); + // ýӿ + { + string request; + request.append("SYNC|").append(temp_file).append("|"); + Log("%s", request.c_str()); + SOCKET sock; + int valread; + const int BUF_SIZE = 1024; + char buffer[BUF_SIZE] = { 0 }; + struct sockaddr_in serv_addr; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("Socketʧ"))); + ifail = ITK_err; + goto end; + } + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + serv_addr.sin_port = htons(PORT); + // Convert IPv4 and IPv6 addresses from text to binary form + if (connect(sock, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) + { + Log("ʧܣͷSocket"); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("޷ӵCAD"))); + ifail = -1; + goto end; + } + const char* requestU = (request.c_str()); + send(sock, requestU, strlen(requestU), 0); + Log("ѷ"); + recv(sock, buffer, BUF_SIZE, 0); + Log("յϢ%s", buffer); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + if (strcmp(SOCKET_SUCCESS, buffer) != 0) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ǩ"), (buffer))); + ifail = ITK_err; + goto end; + } + } + pdf_path.assign(temp_file); + pdf_path = pdf_path.substr(0, pdf_path.length() - 4).append(".pdf"); + // ýӿ + { + string request; + request.append("PDF|").append(temp_file).append("|"); + Log("%s", request.c_str()); + int sock; + int valread; + const int BUF_SIZE = 1024; + char buffer[BUF_SIZE] = { 0 }; + struct sockaddr_in serv_addr; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("Socketʧ"))); + ifail = ITK_err; + goto end; + } + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + serv_addr.sin_port = htons(PORT); + // Convert IPv4 and IPv6 addresses from text to binary form + if (connect(sock, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) + { + Log("ʧܣͷSocket"); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("޷ӵCAD"))); + ifail = ITK_err; + goto end; + } + const char* requestU = request.c_str(); + send(sock, requestU, strlen(requestU), 0); + Log("ѷ"); + recv(sock, buffer, BUF_SIZE, 0); + Log("յϢ%s", buffer); + closesocket(sock); //ر׽ + //WSACleanup(); //ͷ׽Դ + Log("ѹر"); + if (strcmp(SOCKET_SUCCESS, buffer) != 0) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("תPDF"), (buffer))); + ifail = ITK_err; + goto end; + } + } + } +end: + // ɾļ + /*if (strlen(temp_file) > 0) { + remove(temp_file); + } + if (pdf_path.size() > 0) { + remove(pdf_path.c_str()); + }*/ + DOFREE(origin_file_name); + DOFREE(object_string); + return ifail; +} + + +int Connor_CAD_Test(EPM_action_message_t msg) { + int ifail = ITK_ok, att_cnt = 0, pref_cnt = 0; + tag_t root_task = NULLTAG, * attachments = NULL; + map sign_config_map; + char* object_string = NULL, * object_type = NULL, ** pref_values = NULL; + string dataset_rel, dataset_type, dataset_ref; + bool has_err = false; + int counter = 1; + tag_t current_task = msg.task; + ITKCALL(ifail = EPM_ask_root_task(current_task, &root_task)); + if (ifail != ITK_ok) { goto end; } + Log("====================================================="); + Log("Connor_CAD_Test ʼִ"); + Log("====================================================="); + + ITKCALL(ifail = EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + Log("Ŀö"); + goto end; + } + // ϴ + ITKCALL(ifail = PREF_ask_char_values(PREF_UPLOAD_FILE, &pref_cnt, &pref_values)); + if (ifail != ITK_ok) { goto end; } + if (pref_cnt < 3) { + ITKCALL(ifail = EMH_store_error_s2(EMH_severity_error, ITK_err, ("ѡô"), PREF_SIGNATURE)); + ifail = ITK_err; + goto end; + } + dataset_rel.assign(pref_values[0]); + dataset_type.assign(pref_values[1]); + dataset_ref.assign(pref_values[2]); + Log("ݼ: [%s][%s][%s]", dataset_rel.c_str(), dataset_type.c_str(), dataset_ref.c_str()); + DOFREE(pref_values); + // ǩ + ifail = ParseConfigFromPreference(sign_config_map); + if (ifail != ITK_ok) { goto end; } + while (true) { + Log("%dѭ", counter++); + for (int i = 0; i < att_cnt; i++) { + DOFREE(object_string); + DOFREE(object_type); + tag_t target = attachments[i]; + vector dataset_tags; + string info, dir_path, info_path; + ITKCALL(ifail = AOM_ask_value_string(target, "object_string", &object_string)); + ITKCALL(ifail = WSOM_ask_object_type2(target, &object_type)); + Log("%d. %s [%s]", i + 1, object_string, object_type); + if (sign_config_map.count(object_type) < 1) { + continue; + } + Sign_Config sign_config = sign_config_map[object_type]; + // ѯݼ + ifail = GetDatasets(target, dataset_rel, dataset_type, dataset_tags); + int dataset_cnt = dataset_tags.size(); + Log("ҵݼ%d", dataset_cnt); + if (dataset_cnt == 0) { + continue; + } + // ȡ + ifail = ReadSignInfo(target, sign_config, info); + if (ifail != ITK_ok) { + goto end; + } + if (info.size() < 2) { + Log("ǩ"); + continue; + } + Log("ǩݣ\n====================================\n%s\n====================================", info.c_str()); + // ʱļ + ifail = CreateTempFolder(dir_path); + if (ifail != ITK_ok) { + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("ʱĿ¼ʧ"))); + goto end; + } + // ׼info.txt + info_path.append(dir_path).append("\\info.txt"); + ifail = WriteToFile(info_path.c_str(), info.c_str()); + if (ifail != ITK_ok) { + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("ӳļʧ"))); + goto end; + } + for (int j = 0; j < dataset_cnt; j++) { + tag_t dataset_tag = dataset_tags[j]; + ifail = Test(dataset_tag, dir_path.c_str(), dataset_ref.c_str(), "dwg"); + if (ifail != ITK_ok) { + has_err = true; + } + if (ifail == -1) { + ifail = ITK_err; + goto end; + } + } + // ļ + /*remove(info_path.c_str()); + rmdir(dir_path.c_str());*/ + } + } +end: + Log("====================================================="); + Log("Connor_CAD_Test ִн"); + Log("====================================================="); + + if (has_err) { + ifail = ITK_err; + } + DOFREE(pref_values); + DOFREE(object_string); + DOFREE(object_type); + DOFREE(attachments); + return ifail; +} \ No newline at end of file diff --git a/jf_itk/Debug/jf_itk.log b/jf_itk/Debug/jf_itk.log new file mode 100644 index 0000000..48f6a8d --- /dev/null +++ b/jf_itk/Debug/jf_itk.log @@ -0,0 +1,5 @@ +生成启动时间为 2015/9/7 8:48:50。 + +生成成功。 + +已用时间 00:00:00.19 diff --git a/jf_itk/TIPTOPServiceGateWayBinding.nsmap b/jf_itk/TIPTOPServiceGateWayBinding.nsmap new file mode 100644 index 0000000..99fb203 --- /dev/null +++ b/jf_itk/TIPTOPServiceGateWayBinding.nsmap @@ -0,0 +1,11 @@ + +#include "stdsoap2.h" +/* This defines the global XML namespaces[] table to #include and compile */ +SOAP_NMAC struct Namespace namespaces[] = { + { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL }, + { "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL }, + { "xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL }, + { "xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL }, + { "ns1", "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", NULL, NULL }, + { NULL, NULL, NULL, NULL} + }; diff --git a/jf_itk/Text.txt b/jf_itk/Text.txt new file mode 100644 index 0000000..eca07b5 --- /dev/null +++ b/jf_itk/Text.txt @@ -0,0 +1,39 @@ +Shoulder 2017/05/11 09:52:49 +lx = form.getTCProperty("jk8ProductType").getStringArrayValue();//Ʒ + cpxh = form.getTCProperty("jk8ProductModNO").getStringArrayValue();// Ʒͺ + sbh = form.getTCProperty("jk8ProductIdentifyNO").getStringArrayValue();// ʶ + cpmc = form.getTCProperty("jk8ProductName").getStringArrayValue();// Ʒ + jbcj = form.getTCProperty("jk8BaseMeterManufactor").getStringArrayValue();// + ickxh = form.getTCProperty("jk8ICCardType").getStringArrayValue();// ICͺ + xlbxh = form.getTCProperty("jk8CircBoardModNO").getStringArrayValue();// ·ͺ + cxtz = form.getTCProperty("jk8ProgramFeatures").getStringArrayValue();// + tdxh = form.getTCProperty("jk8InsteadType").getStringArrayValue();// ͺ + gngs = form.getTCProperty("jk8FunctionOverview").getStringArrayValue();// ܸ + khtsyq = form.getTCProperty("jk8CustSpecRequirements").getStringArrayValue();// ͻҪ + u8mmh = form.getTCProperty("jk8U8NO").getStringArrayValue();// U8 + fm = form.getTCProperty("jk8Valve").getStringArrayValue();// + jmlx = form.getTCProperty("jk8EncryptType").getStringArrayValue();// + sqr = form.getTCProperty("jk8Applicant").getStringArrayValue();// + djrq = form.getTCProperty("jk8RecordDate").getStringArrayValue();// Ǽ + sysc = form.getTCProperty("jk8ApplyMarket").getStringArrayValue();// г + ptjbcj = form.getTCProperty("jk8BMManfMatched").getStringArrayValue();// ׻ + + + jk8ProductType//Ʒ + jk8ProductModNO// Ʒͺ + jk8ProductIdentifyNO// ʶ + jk8ProductName// Ʒ + jk8BaseMeterManufactor// + jk8ICCardType// ICͺ + jk8CircBoardModNO// ·ͺ + jk8ProgramFeatures// + jk8InsteadType// ͺ + jk8FunctionOverview// ܸ + jk8CustSpecRequirements// ͻҪ + jk8U8NO// U8 ȥ + jk8Valve// + jk8EncryptType// + jk8Applicant// + jk8RecordDate// Ǽ + jk8ApplyMarket// г + jk8BMManfMatched// ׻ \ No newline at end of file diff --git a/jf_itk/common_itk_util.c b/jf_itk/common_itk_util.c new file mode 100644 index 0000000..477d6c6 --- /dev/null +++ b/jf_itk/common_itk_util.c @@ -0,0 +1,291 @@ +/** +* @file common_itk_util.cpp +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 18-July-2008 James +*/ + +#pragma warning (disable: 4996) +#pragma warning (disable: 4819) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include +//#include +//#include + +#include +//#include +#include +#include +//#include +//#include +#include "error_handling.h" +#include "common_itk_util.h" + +#ifdef WIN32 +#include +#include +#else +#include +#endif + + +#define ARGS_LENGTH 200 +#define ARGS_NAME_DEBUG "-debug" +#define DEBUG "-debug=" +#define MAX_PRINTLINE_LENGTH 2000 +#define MAX_PATH_LENGTH 2000 +#define MAX_ARGUMENT_LENGTH 400 +#define MAX_PARAMNAME_LENGTH 50 +#define MAX_FILE_EXT_LENGTH 10 +#define TRUE_FLAG 1 +#define FALSE_FLAG 0 +#define DETAILLOG 1 + + +void ECHO(char *format, ...) +{ + //if( !YFJC_OPT_DEBUG ) + // return; + + char msg[4096]; + va_list args; + + va_start( args, format ); + vsprintf( msg, format, args ); + va_end( args ); + + printf( msg ); + TC_write_syslog( msg ); +} + +FILE* logFile = NULL; + + + +//void set_bypass(logical bypass) +//{ +// POM_AM__set_application_bypass(bypass); +//} +/*=============================================================================* + * FUNCTION: current_time + * PURPOSE : get the current datetime + * INPUT: + * date_t* date_tag // current date time tag + * + * RETURN: + * void + *============================================================================*/ +void current_time( date_t * date_tag ) +{ + time_t ltime; + struct tm *today ; + + // Set time zone from TZ environment variable. If TZ is not set, + // the operating system is queried to obtain the default value + // for the variable. + // + //_tzset(); + + // Get UNIX-style time and display as number and string. + time( <ime ); + + today = localtime( <ime ); + date_tag->year = today->tm_year + 1900 ; + date_tag->month = today->tm_mon ; + date_tag->day = today->tm_mday ; + date_tag->hour = today->tm_hour ; + date_tag->minute = today->tm_min ; + date_tag->second = today->tm_sec ; +} +/*=============================================================================* + * FUNCTION: CreateLogFile + * PURPOSE : create log file + * INPUT: + * char* FunctionName // the funtion which need to create log file + * FILE** logFile // out: the log file pointer + * + * RETURN: + * void + *============================================================================*/ +void CreateLogFile(char* FunctionName, char **fullname) +{ + int i=0, ifail = ITK_ok; + //date_t status_now; + //char* date_string = NULL; + char date_string[MAX_PATH_LENGTH]; + char logFileDir[MAX_PATH_LENGTH]; + char logFileName[MAX_PATH_LENGTH]; + + char* session_uid = NULL; + tag_t session_tag = NULLTAG; + time_t now; + struct tm *p; + + time(&now); + + logFile = NULL; + //current_time(&status_now); + p=localtime(&now); + + memset(date_string, 0, sizeof(date_string)); + sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec ); + //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok ) + //ifail = ITK_date_to_string (status_now, &date_string ); + //if (ifail) + //{ + // printf("!*ERROR*!: Failed to get current date time\n"); + // goto CLEANUP; + //} + + memset(logFileDir, 0, sizeof(logFileDir)); + memset(logFileName, 0, sizeof(logFileName)); + //get log dir + sprintf(logFileDir, "%s", getenv("TEMP")); + printf("\n log file dir: %s\n", logFileDir); + //try to change dir to TC_USER_LOG_DIR + if(chdir(logFileDir)!=ITK_ok) + { + //not set TC_USER_LOG_DIR + //log in to default TC_LOG + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TC_LOG")); + printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir); + if(chdir(logFileDir)!=ITK_ok) + { + //still can not change to log dir + printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n"); + goto CLEANUP; + } + } + + //get session_uid to make sure the log file name unique + POM_ask_session(&session_tag); + ITK__convert_tag_to_uid(session_tag, &session_uid); + + + //get logFileName + sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string); + printf("log file name: %s\n", logFileName); + + *fullname = (char *)MEM_alloc(sizeof(char)*512); + sprintf(*fullname,"%s\\%s",logFileDir,logFileName); + + //for(i = 0; _access((char *)logFileName, 4) == 0; i++) + /*{ + memset(logFileName, 0, sizeof(logFileName)); + sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i); + } + printf("final log file name: %s\n", logFileName);*/ + + //create log file + logFile = fopen(logFileName, "w"); + +CLEANUP: + //DOFREE(date_string); + DOFREE(session_uid); +} + + +/*=============================================================================* + * FUNCTION: WriteLog + * PURPOSE : write log, if debug log File not null, write log message to log File + * INPUT: + * const char* format // debug message string + * + * RETURN: + * void + *============================================================================*/ +void WriteLog(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + + if(logFile) + { + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + + //----------print to command window for trace--------// + printf("%s\n", tmp); + + //print message to log file + fprintf(logFile, "%s\n", tmp); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} + +void CloseLog(void) +{ + if(logFile) + { + fclose(logFile); + logFile = NULL; + } +} + +//void getTypeinfo(char *type) +//{ +// int ulen = 0,i=0,tempcount=0,asd=0; +// +// char temp[128]=""; +// ulen = strlen(type); +// asd = ulen-1; +// for(i=0;i < ulen;i++) +// { +// if(type[i] == ';') +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// strcpy(temp,""); +// tempcount = 0; +// typecount = typecount + 1; +// } +// else +// { +// +// temp[tempcount] = type[i]; +// tempcount = tempcount + 1; +// if(i==asd) +// { +// temp[tempcount] = '\0'; +// strcpy(excludetypes[typecount].type,temp); +// typecount = typecount + 1; +// } +// +// } +// +// } +//} \ No newline at end of file diff --git a/jf_itk/common_itk_util.h b/jf_itk/common_itk_util.h new file mode 100644 index 0000000..71ca4ea --- /dev/null +++ b/jf_itk/common_itk_util.h @@ -0,0 +1,41 @@ +/** +* @file common_itk_util.h +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef COMMON_ITK_UTIL +#define COMMON_ITK_UTIL + +#ifdef __cplusplus +extern "C" { +#endif + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} +void ECHO(char *format, ...); +void CreateLogFile(char* FunctionName, char **fullname); +void WriteLog(const char* format, ...); +void CloseLog(void); +void set_bypass(logical bypass); +void current_time( date_t * date_tag ); +//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] ); +//int CompareDate( date_t date1, date_t date2 ); +//int GetRandomTempFile( char tempFile[256] ); +//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] ); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/jf_itk/connor_cad.h b/jf_itk/connor_cad.h new file mode 100644 index 0000000..5d40de8 --- /dev/null +++ b/jf_itk/connor_cad.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include +#include + +#define PREF_UPLOAD_FILE "Connor_MCAD_UploadFile" +#define PREF_REMOVE_FILE "Connor_MCAD_RemoveTempFile" +#define PREF_SIGNATURE "Connor_MCAD_Signature" +#define PORT 11415 +#define SOCKET_SUCCESS "OK" + +extern DLLAPI int K_register_handlers(int*, va_list); + +int Connor_CAD_Signature(EPM_action_message_t msg); +int Connor_CAD_Convert_PDF(EPM_action_message_t msg); +int Connor_CAD_Test(EPM_action_message_t msg); \ No newline at end of file diff --git a/jf_itk/connor_util.cpp b/jf_itk/connor_util.cpp new file mode 100644 index 0000000..905a72c --- /dev/null +++ b/jf_itk/connor_util.cpp @@ -0,0 +1,52 @@ +#include "connor_util.h" + +/** +*жijǷ +*objtag ҪжϵĶ +*type_name ͵ +*/ +int checkIsTypeOrSubtype(tag_t objtag,char * type_name){ + printf("жǷ%s\n",type_name); + tag_t type = NULLTAG; + ITKCALL(TCTYPE_ask_object_type(objtag,&type)); + tag_t item_type = NULLTAG; + ITKCALL(TCTYPE_find_type(type_name,"",&item_type)); + int is_type = 0; + if(item_type != NULLTAG){ + printf("ҵ%s\n",type_name); + //printf(" find Folder type ok !!!! \n"); + logical isok = FALSE; + ITKCALL(TCTYPE_is_type_of(type,item_type,&isok)); + if(isok){ + printf("%s༰\n\n",type_name); + is_type= 1; + }else{ + printf("%s༰\n\n",type_name); + is_type= 0; + } + }else{ + printf("ûҵ%s\n\n",type_name); + } + return is_type; +} + +/** +* ȡѡ +*/ +int getPrefStrings( const char *preference, TC_preference_search_scope_t scope, vector &pref_vec ) +{ + int ifail = ITK_ok , i = 0, j = 0, k =0, num = 0; + char **values; + TC_preference_search_scope_t old_scope; + // ITKCALL( ifail = PREF_ask_search_scope( &old_scope) ); + //ITKCALL( ifail = PREF_set_search_scope( scope ) ); + ITKCALL( ifail = PREF_ask_char_values( preference, &num, &values ) ); + //WriteLog("num=%d",num); + for(i = 0; i < num; i++) + { + pref_vec.push_back(values[i]); + } + DOFREE(values); + // ITKCALL( ifail = PREF_set_search_scope( old_scope ) ); + return ifail; +} \ No newline at end of file diff --git a/jf_itk/connor_util.h b/jf_itk/connor_util.h new file mode 100644 index 0000000..1c1a6cd --- /dev/null +++ b/jf_itk/connor_util.h @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + +int checkIsTypeOrSubtype(tag_t objtag,char * type_name); +int getPrefStrings( const char *preference, TC_preference_search_scope_t scope, vector &pref_vec); + + \ No newline at end of file diff --git a/jf_itk/epm_handler_common.h b/jf_itk/epm_handler_common.h new file mode 100644 index 0000000..7b737d5 --- /dev/null +++ b/jf_itk/epm_handler_common.h @@ -0,0 +1,52 @@ +/** +* @addtogroup handler +* @{ +*/ + +/** +* @file epm_handler_common.h +* @brief handler functions declation +* @date 2011/4/12 +* @author Ray +* @history +* =================================================================================== +* Date Name Description +* 12-Apr-2011 Ray created +*/ + + +#ifndef EPM_HANDLER_COMMON +#define EPM_HANDLER_COMMON + +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +using namespace std; + + +#define TC_specification "IMAN_specification" +//#define NX_3W_DATASET_TYPE "UGMASTER" +//#define NX_2W_DATASET_TYPE "UGPART" +//#define DATASET_REF_TYPE "UGPART" + +int getDbMsg(void *returnValue); + +int check_target_null( EPM_rule_message_t msg ); + + //user service end +#ifdef __cplusplus +} +#endif + +#endif + + +/** +* @} +*/ \ No newline at end of file diff --git a/jf_itk/epm_register_handler.cpp b/jf_itk/epm_register_handler.cpp new file mode 100644 index 0000000..0d6dec6 --- /dev/null +++ b/jf_itk/epm_register_handler.cpp @@ -0,0 +1,511 @@ +/*=================================================================================================== + Copyright(c) 2011 Siemens PLM Software Corp. All rights reserved. + Unpublished - All rights reserved +==================================================================================================== +File description: + + Filename : epm_register_handler.c + + This file registers functions which are called when Teamcenter is being initialized + +==================================================================================================== +Date Name Description of Change +2011-8-21 Ray creation + +$HISTORY$ +==================================================================================================*/ + +#pragma warning (disable: 4819) + +/** +* @headerfile tcua ͷļ +*/ +#include +#include +#include +#include + +/** +* @headerfile standard c & cpp header files +*/ +#include +#include +#include +#include +#include +#include +#include +#include + + +/** +* @headerfile user's header files +*/ +#include "epm_register_handler.h" +#include "epm_handler_common.h" +#include "signoff_rev.h" +#include "yb_send_to_erp.h" +#include "connor_cad.h" + +#define LIMITDAY 2016 + +int checkvalue(char* str) +{ + + int i; + for (i=0;i + +#ifdef __cplusplus +extern "C" { +#endif + +extern DLLAPI int USERSERVICE_custom_register_handlers(int *, va_list); +extern DLLAPI int USERSERVICE_custom_register_methods(int *decision, va_list args); +//extern int Register_revise_msg( void ); +//extern int Run_Time_register_properties( void ); +// int Q7_ebom_to_pbom (void * returnValueType); + +#ifdef __cplusplus +} +#endif + +#endif + + +/** +* @} +*/ \ No newline at end of file diff --git a/jf_itk/erp_utils.cxx b/jf_itk/erp_utils.cxx new file mode 100644 index 0000000..561f7e0 --- /dev/null +++ b/jf_itk/erp_utils.cxx @@ -0,0 +1,28 @@ + +#pragma warning (disable: 4996) +#pragma warning (disable: 4819) + + +#include "erp_utils.h" +#include "ocilib.h" +#include "common_itk_util.h" +using namespace std; + + +int getPrefStrings( const char *preference, TC_preference_search_scope_t scope, vector &pref_vec ) +{ + int ifail = ITK_ok , i = 0, j = 0, k =0, num = 0; + char **values; + TC_preference_search_scope_t old_scope; + // ITKCALL( ifail = PREF_ask_search_scope( &old_scope) ); + // ITKCALL( ifail = PREF_set_search_scope( scope ) ); + ITKCALL( ifail = PREF_ask_char_values( preference, &num, &values ) ); + WriteLog("num=%d",num); + for(i = 0; i < num; i++) + { + pref_vec.push_back(values[i]); + } + DOFREE(values); + //ITKCALL( ifail = PREF_set_search_scope( old_scope ) ); + return ifail; +} \ No newline at end of file diff --git a/jf_itk/erp_utils.h b/jf_itk/erp_utils.h new file mode 100644 index 0000000..d483878 --- /dev/null +++ b/jf_itk/erp_utils.h @@ -0,0 +1,102 @@ +/** +* @addtogroup batch service +* @{ +*/ + +/** +* @file erp_utils.h +* +* @brief import item from middle table +* +* @author Ray Li +* +* @history +* =================================================================================== +* Date Name Description of Change +* 3-Feb-2015 Ray created +*/ + + +/** +* @headerfile tcua ͷļ +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/** +* @headerfile standard c & cpp header files +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +//erp table name +#define PART_INFO_TABLE "ERP_PART_INFO_TABLE" + +#define PREF_JF3_ERP_DB_Login_Info "TM2_ERP_DB_Login_Info" + +#define CUST_CP_NAME_PROPS "Cust_ERP_PLM_CP_Name_Props"//Ʒƹ +#define CUST_CP_GG_PROPS "Cust_ERP_PLM_CP_GG_Props"//Ʒ +#define CUST_BCP_NAME_PROPS "Cust_ERP_PLM_BCP_Name_Props"//Ʒƹ +#define CUST_BCP_GG_PROPS "Cust_ERP_PLM_BCP_GG_Props"//Ʒ +#define CUST_YCL_NAME_PROPS "Cust_ERP_PLM_YCL_NAME_Props"//ԭƹ +#define CUST_WL_PROPS "Cust_ERP_PLM_WL_Props"//JAVAȡԹ + +//error +#define ERROR_PREFERENCE_ERROR (EMH_USER_error_base + 1) +#define ERROR_ERP_LOGIN_FAIL (EMH_USER_error_base + 2) + +//ERP +#define ERROR_OCI_FAIL (EMH_USER_error_base + 11) + + +#ifdef __cplusplus +extern "C" +{ +#endif + + + + +int getPrefStrings( const char *preference, TC_preference_search_scope_t scope, vector &pref_vec ); + +#ifdef __cplusplus +} +#endif + diff --git a/jf_itk/error_handling.h b/jf_itk/error_handling.h new file mode 100644 index 0000000..05d9d62 --- /dev/null +++ b/jf_itk/error_handling.h @@ -0,0 +1,162 @@ +/*! +* @addtogroup common +* \file error_handling.h +* \brief +* \date 2008/6/10 +* \author Ray Li +*/ + +#ifndef SIMPLE_ERR_H_INCLUDED +#define SIMPLE_ERR_H_INCLUDED + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define BUFSIZE 512 + + +// +#define HANDLER_ARGUMENT_ERROR EMH_USER_error_base + 1 +//#define WORKFLOW_NODE_IS_NOT_VALID EMH_USER_error_base + 2 + +#define ERROR_STATUS_ERROR EMH_USER_error_base + 2 +//#define HANDLER_PLACED_INVALID EMH_USER_error_base + 3 +// +////user errors define +////վļȱ %1$ ã +//#define ERROR_PREFERENCE_NOT_FOUND (EMH_USER_error_base + 100) + + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + + + +//#define ECHO(X) printf X; +#define SYS_LOG(X) IMAN_write_syslog X; +#define LOG_ECHO(X) printf X; IMAN_write_syslog X; + + + +/*! +* \def CALL(x) +* ӡϢ +*/ +#define CALL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + LOG_ECHO( ("ERROR: %d ERROR MSG: %s.\n",stat, err_string) ) \ + LOG_ECHO( ("Function: %s FILE: %s LINE: %d\n", #x, __FILE__, __LINE__ ) ) \ + MEM_free (err_string); \ + return (stat); \ + } \ +} + +/*! +* \def DO(x) +* ӡϢ +*/ +#define DO(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != POM_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + } \ +} + +/*! +* \def CALLRNULL(x) +* ӡϢ +*/ +#define CALLRNULL(x) { \ + int stat; \ + char *err_string; \ + if( (stat = (x)) != ITK_ok) \ + { \ + EMH_ask_error_text (stat, &err_string); \ + printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string); \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + MEM_free (err_string); \ + return ((char *)NULL); \ + } \ +} + +/*! +* \def CALL2(x) +* ӡϢ +*/ +#define CALL2(x) { \ + int stat, n_ifails, *serverities, *ifails, err_count; \ + char *err_string, **texts; \ + if( (stat = (x)) != ITK_ok) \ + { \ + printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__); \ + EMH_ask_errors( &n_ifails, (const int**)(&serverities), (const int**)(&ifails), (const char***)(&texts) );\ + for( err_count=0; err_count +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int sendto_ico(char *ic_id,tag_t revTag,char *item_id); + +extern int hi2_auto_class( EPM_action_message_t msg ); diff --git a/jf_itk/hi2_handlers.h b/jf_itk/hi2_handlers.h new file mode 100644 index 0000000..73d14fa --- /dev/null +++ b/jf_itk/hi2_handlers.h @@ -0,0 +1,244 @@ +#ifndef CUST_CS_H + +#define CUST_CS_H + + + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + + + +//add by Tim 20130409 + +#include + +#include + +//end add + + + +#include "hi2_coding.h" + +#include "hi2_auto.h" + +#include "hi2_prod_code.h" + +#include "hi2_prod_code_kt.h" + +#include "hi2_autosign.h" + +#include "hi2_up_and_down.h" + +#include "update_dateproperty_one.h" + +#include "update_formproperty_one.h" + +#include "hi2_check_req.h" + +#include "hi2_sap.h" + +#include "hi2_prod_model.h" + +#include "hi2_auto_class.h" + +#include "hi2_remove_reviews.h" + +#include "hi2_test_bomline.h" + +#include "mdm_send_message.h" + +#include "hi2_check_order.h" + + + +//add by Tim 20130409 + + + +#define USER_ERROR (EMH_USER_error_base + 002) + + + +#define MAX_PATH_LENGTH 1000 + +#define MAX_PRINTLINE_LENGTH 2000 + +#define SENDING_CMD_SIZE 20000 + + + +#define CHECK_STATUS "-check_status=" + +#define RELATION_NAME "-relation=" + +#define SEND_ERP_MODE "-erp_mode=" + +#define ARG_CM_TYPE_NAME "-cm_rev_type=" + +#define ARG_KM_PROP_NAME "-km_prop_name=" + + + +#define PART_IDENTIFY_REVISION_TYPE "HI2_LBJRD_LGRevision" + +#define PART_REVISION_TYPE "HI2_LBJ_LGRevision" + +#define PART_ID_PROP_NAME "hi2_LBJRD_LGRev_00" + +#define SUPPLIER_PROP_NAME "hi2_LBJRD_LGRev_04" + +#define RALTION_SUPPLIER_PART "" + + + +#define PROP_PART_ID "hi2_GZMJ_LGRev_21" + +#define PROP_PART_REV "hi2_GZMJ_LGRev_30" + + + +void common_get_prefix(char* input, char bot, char* prefix); + +int get_rev_master(tag_t item_rev, tag_t* form_tag); + + + +//end add + + + +#define SAFECALL(x) \ + +{ \ + + err_function = #x; err_line = __LINE__; \ + + if((rcode = (x)) != ITK_ok) \ + + { \ + + goto CLEANUP; \ + + } \ + +} + + + +#define TCFREE(obj) { \ + + if(obj) { \ + + MEM_free(obj); \ + + obj = NULL; \ + + } \ + +} + + + +#define FREE(obj) { \ + + if(obj) { \ + + free(obj); \ + + obj = NULL; \ + + } \ + +} + + + +#define DOFREE(obj) \ + +{ \ + + if(obj) \ + + { \ + + MEM_free(obj); \ + + obj = NULL; \ + + } \ + +} + + + +#define DOFREE_STRINGS(obj) \ + +{ \ + + if(obj) \ + + { \ + + TC_free_strings(obj); \ + + obj = NULL; \ + + } \ + +} + + + +#define CLOSEFILE(filePtr) \ + +{ \ + + if(filePtr) \ + + { \ + + fclose(filePtr); \ + + filePtr = NULL; \ + + } \ + +} + + + +#endif + diff --git a/jf_itk/jf_itk.vcxproj b/jf_itk/jf_itk.vcxproj new file mode 100644 index 0000000..93a14b9 --- /dev/null +++ b/jf_itk/jf_itk.vcxproj @@ -0,0 +1,255 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AEABC483-FCBD-45F5-9884-8FA4C5A9892D} + Win32Proj + jf_itk + YB_ERP_itk + 10.0 + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + + + Application + false + true + Unicode + v142 + + + DynamicLibrary + false + true + Unicode + Static + v142 + + + DynamicLibrary + false + true + Unicode + Static + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + false + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;IPLIB=none;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + D:\dflittk\include;D:\dflittk\include_cpp;D:\dflittk\oci\include;D:\项目\恒帅\includeOCI\include;D:\项目\恒帅\include_cpp;D:\项目\恒帅\include;%(AdditionalIncludeDirectories) + false + + + Console + true + true + true + $(OutDir)YB_ERP_itk.dll + D:\dflittk\lib\*.lib;%(AdditionalDependencies) + libuser_exits.ar.lib + %(AdditionalLibraryDirectories) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions) + F:\Teamcenter10.1.0Env\tcbin\include;F:\Teamcenter10.1.0Env\OCI\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + $(OutDir)libjf.dll + F:\Teamcenter10.1.0Env\tcbin\lib\*.lib;%(AdditionalDependencies) + libuser_exits.ar.lib + D:\Work\CONNOR\继峰\CODE\OCI\lib\MSVC;%(AdditionalLibraryDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jf_itk/jf_itk.vcxproj.filters b/jf_itk/jf_itk.vcxproj.filters new file mode 100644 index 0000000..243906a --- /dev/null +++ b/jf_itk/jf_itk.vcxproj.filters @@ -0,0 +1,119 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {70889105-2766-48cd-955a-f8fa1cab7cc6} + + + {4e155a8b-5ae9-449f-bb95-aa3a2b2dd9f6} + + + {2028f5f0-6bdd-4da5-8bc2-e680c333bf79} + + + + + common + + + common\epm-handler + + + common + + + common + + + common + + + common + + + common\epm-handler + + + common\epm-handler + + + common\epm-handler + + + common\epm-handler + + + common + + + common\epm-handler + + + common\epm-handler + + + common\epm-handler + + + + + common\epm-handler + + + common\epm-handler + + + common + + + common + + + common + + + common + + + common\epm-handler + + + common + + + common\epm-handler + + + common\epm-handler + + + common\epm-handler + + + common + + + common\epm-handler + + + common\epm-handler + + + + + common\epm-handler + + + \ No newline at end of file diff --git a/jf_itk/jf_itk.vcxproj.user b/jf_itk/jf_itk.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/jf_itk/jf_itk.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/jf_itk/k_util.cpp b/jf_itk/k_util.cpp new file mode 100644 index 0000000..6997be8 --- /dev/null +++ b/jf_itk/k_util.cpp @@ -0,0 +1,252 @@ +#include "k_util.h" +#define MAX_PRINTLINE_LENGTH 8000 +#define MAX_PATH_LENGTH 250 +#define ITK_err 919099 +#define GUID_LEN 64 +#include + +extern "C" int POM_AM__set_application_bypass(logical bypass); + +void set_bypass(logical bypass) +{ + POM_AM__set_application_bypass(bypass); +} + + +int CreateTempFolder(string& dir_path) { + char buf[GUID_LEN] = { 0 }; + GUID guid; + + time_t t; + struct tm* lt; + time(&t);//ȡUnixʱ + lt = localtime(&t);//תΪʱṹ + sprintf(buf, "%d%d%d%d%d%d", lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); + Log("3.18buf%s", buf); + + /*CoCreateGuid(&guid); + sprintf(buf, "%08X%04X%04x%02X%02X%02X%02X%02X%02X%02X%02X", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], + guid.Data4[3], guid.Data4[4], guid.Data4[5], + guid.Data4[6], guid.Data4[7]);*/ + std::move(std::string(buf)); + string uuidStr; + uuidStr.assign(buf); + //uuidStr.erase(std::remove(uuidStr.begin(), uuidStr.end(), '-'), uuidStr.end()); + char logFileDir[MAX_PATH_LENGTH]; + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TEMP")); + strcat(logFileDir, "\\"); + strcat(logFileDir, uuidStr.c_str()); + struct stat info; + if (stat(logFileDir, &info) != 0) { + Log("ʱĿ¼: %s", logFileDir); + mkdir(logFileDir); + } + if (stat(logFileDir, &info) != 0) { + Log("ʱĿ¼ʧ"); + return ITK_err; + } + dir_path.assign(logFileDir); + return ITK_ok; +} +int CreateTempFolder1(string& dir_path) { + char buf[GUID_LEN] = { 0 }; + GUID guid; + + time_t t; + struct tm* lt; + time(&t);//ȡUnixʱ + lt = localtime(&t);//תΪʱṹ + sprintf(buf, "%d%d%d%d%d%d", lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); + Log("3.18buf%s", buf); + //CoCreateGuid(&guid); + /*sprintf(buf, "%08X%04X%04x%02X%02X%02X%02X%02X%02X%02X%02X", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], + guid.Data4[3], guid.Data4[4], guid.Data4[5], + guid.Data4[6], guid.Data4[7]);*/ + std::move(std::string(buf)); + string uuidStr; + uuidStr.assign(buf); + //uuidStr.erase(std::remove(uuidStr.begin(), uuidStr.end(), '-'), uuidStr.end()); + char logFileDir[MAX_PATH_LENGTH]; + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TEMP")); + strcat(logFileDir, "\\"); + strcat(logFileDir, uuidStr.c_str()); + struct stat info; + if (stat(logFileDir, &info) != 0) { + Log("ʱĿ¼: %s", logFileDir); + mkdir(logFileDir); + } + if (stat(logFileDir, &info) != 0) { + Log("ʱĿ¼ʧ"); + return ITK_err; + } + dir_path.assign(logFileDir); + return ITK_ok; +} + +char* U2G(const char* utf8) +{ + int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len); + len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL); + if (wstr) delete[] wstr; + return str; +} + + + +char* G2U(const char* gb2312) +{ + int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len); + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL); + if (wstr) delete[] wstr; + return str; +} + +bool isClass(tag_t class_id, char* className) { + tag_t* pclass_ids = NULL; + char* class_name = NULL; + int pclass_count = 0, ifail = ITK_ok; + ITKCALL(POM_name_of_class(class_id, &class_name)); + bool isType = false; + if (strcmp(class_name, className) == 0) { + isType = true; + } + DOFREE(class_name); + if (isType) { + return true; + } + ITKCALL(ifail = POM_superclasses_of_class(class_id, &pclass_count, &pclass_ids)); + for (int i = 0; i < pclass_count; i++) { + isType = isClass(pclass_ids[i], className); + if (isType) { + return true; + } + } + return false; +} + +int GetDatasets(tag_t target_tag, string dataset_rel, string dataset_type, vector& dataset_tags) { + int ifail = ITK_ok, child_cnt = 0; + tag_t* child_tags = NULL; + char* object_type = NULL, * object_string = NULL;; + ITKCALL(ifail = AOM_ask_value_tags(target_tag, dataset_rel.c_str(), &child_cnt, &child_tags)); + if (ifail != ITK_ok) { + return ifail; + } + for (int i = 0; i < child_cnt; i++) { + DOFREE(object_string); + DOFREE(object_type); + tag_t child_tag = child_tags[i]; + ITKCALL(ifail = AOM_ask_value_string(child_tag, "object_string", &object_string)); + ITKCALL(ifail = WSOM_ask_object_type2(child_tag, &object_type)); + Log(">> %d. %s [%s]", i + 1, object_string, object_type); + if (dataset_type._Equal(object_type)) { + dataset_tags.push_back(child_tag); + } + } + DOFREE(object_string); + DOFREE(object_type); + DOFREE(child_tags); + return ifail; +} + +bool isType(tag_t item, const char* type) { + int ifail = ITK_ok; + tag_t item_type = NULLTAG, target_type = NULLTAG; + logical answer = false; + ITKCALL(ifail = TCTYPE_ask_object_type(item, &item_type)); + if (ifail != ITK_ok) { + return false; + } + ITKCALL(ifail = TCTYPE_ask_type(type, &target_type)); + if (ifail != ITK_ok) { + return false; + } + ITKCALL(ifail = TCTYPE_is_type_of(item_type, target_type, &answer)); + if (ifail == ITK_ok) { + return answer; + } + return false; +} + + +int WriteToFile(const char* file_path, const char* content) { + ofstream file; + file.open(file_path); + file << content; + file.close(); + /*FILE *file = fopen(file_path, "a"); + if (!file) { + Log("ļʧܣ%s", file_path); + return ITK_err; + } + Log("1"); + fprintf(file, content); + Log("2"); + fflush(file); + Log("3"); + fclose(file); + Log("4"); + file = NULL;*/ + return ITK_ok; +} + +void Log(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + time_t now; + struct tm* p; + + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + printf("%s\n", tmp); + TC_write_syslog("%s\n", tmp); +} + +void Splits(string strArg, string spliter, vector& ans) +{ + ans.clear(); + size_t index0 = 0; + string one_arg; + if (strArg.find_first_not_of(' ') == string::npos) + strArg = ""; + int len = spliter.size(); + while (strArg.size() > 0) + { + index0 = strArg.find(spliter); + if (index0 != string::npos) + { + one_arg = strArg.substr(0, index0); + strArg = strArg.substr(index0 + len); + ans.push_back(one_arg); + if (strArg.size() == 0) { + ans.push_back(strArg); + } + } + else + { + ans.push_back(strArg); + break; + } + } +} \ No newline at end of file diff --git a/jf_itk/k_util.h b/jf_itk/k_util.h new file mode 100644 index 0000000..cf2367b --- /dev/null +++ b/jf_itk/k_util.h @@ -0,0 +1,68 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef WIN32 +#include +#include +#else +#include +#endif + +using namespace std; + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + +void Log(const char* format, ...); +void Splits(string strArg, string spliter, vector& ans); +int CreateTempFolder(string& dir_path); +int CreateTempFolder1(string& dir_path); +int WriteToFile(const char* file_path, const char* content); +char* G2U(const char* gb2312); +char* U2G(const char* utf8); +bool isType(tag_t item, const char* type); +int GetDatasets(tag_t target_tag, string dataset_rel, string dataset_type, vector& dataset_tags); +void set_bypass(logical bypass); \ No newline at end of file diff --git a/jf_itk/libjf_custom_main.cpp b/jf_itk/libjf_custom_main.cpp new file mode 100644 index 0000000..37cae86 --- /dev/null +++ b/jf_itk/libjf_custom_main.cpp @@ -0,0 +1,49 @@ + +#pragma warning (disable: 4819) + +/** +* @headerfile tcua ͷļ +*/ +#include +#include +#include +#include "error_handling.h" +#include "epm_register_handler.h" +#include "epm_handler_common.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + + /** + * @fn extern "C" DLLAPI int liborigin_register_callbacks + * @return usually return ITK_ok + * @brief liborigin customization entry + * ˺й淶дdllƼ"_"ͷ + */ + DLLAPI int YB_ERP_itk_register_callbacks() + { + int ifail = ITK_ok; + TC_write_syslog("*******************************************************************************\n"); + TC_write_syslog("* YB_ERP_itk register_callbacks is starting *\n"); + TC_write_syslog("*******************************************************************************\n"); + + + ITKCALL( ifail = CUSTOM_register_exit( "YB_ERP_itk", "USERSERVICE_register_methods", + (CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods) ); + fprintf( stdout, "\n YB_ERP_itk registering USERSERVICE_custom_register_methods completed!\n" ); + + + ITKCALL( ifail = CUSTOM_register_exit("YB_ERP_itk","USER_gs_shell_init_module", + (CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_handlers) ); + fprintf( stdout, "\n YB_ERP_itk registering USERSERVICE_custom_register_handlers completed!\n" ); + + + return ifail; + } + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/jf_itk/ocilib.cxx b/jf_itk/ocilib.cxx new file mode 100644 index 0000000..779bd05 --- /dev/null +++ b/jf_itk/ocilib.cxx @@ -0,0 +1,442 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.cxx + Module : OCI + + This file describes OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include "ocilib.h" +#include + +#define NUM 100 +#define USERNAME "infodba" +#define PASSWORD "infodba" +#define DBNAME "tc" + + +// ṹ +typedef struct{ + OCIEnv *p_env; //OCI environment handle + OCIError *p_err; //OCI error handle + OCISvcCtx *p_svc; //OCI service context handel ľ + OCIServer *p_ser; //OCI server handle + OCISession *p_usr; //OCI user session handle ûỰ + OCIStmt *p_sql; //OCI statement handle + OCIDefine *p_dfn; //OCI define handle + OCIBind *p_bnd; //OCI bind handle 󶨾 +}OCIHandleInfo; + + +// ṹ +typedef struct{ + OCIEnv *p_env; + OCIError *p_err; + OCISvcCtx *p_svc; + OCIStmt *p_sql; + OCIDefine *p_dfn; + OCIBind *p_bnd; +}OCIDATA; + + +// ִʱ +typedef struct{ + char value[NUM][NUM]; + char type[NUM][NUM]; +}SqlField; + + +// ѯʱ, +typedef struct{ + int naIntValue[NUM]; + int nIntNum; + char caCharValue[500][500]; + int nCharNum; +}SqlSelField; + +OCIHandleInfo *ociHandle = NULL; +OCIHandleInfo ociHand; + +int InitHandle(); +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount); +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField); +int GetDataFromQuery(int *pRc, SqlSelField *pOutField); +void QuitFreeHandle(); + + + + +/**************************************************************************************************************************************** +ƣ +ܣ +ڲ +ڲ + ע +*****************************************************************************************************************************************/ + + +// ʼHandler +int InitHandle() +{ + int swResult; + + ociHandle = &ociHand; + + + /*create OCI environment*/ + if(swResult = OCIEnvCreate(&ociHandle->p_env,OCI_DEFAULT,NULL,NULL,NULL,NULL,0,NULL)) // + { + printf("environment create error!\n\n"); + return -1; + } + else + { + printf("environment create success!\n\n"); + //return 0; + } + + /*init handle*/ + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_ser,OCI_HTYPE_SERVER,0,NULL)) // + { + printf("init server handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_err,OCI_HTYPE_ERROR,0,NULL)) // + { + printf("init error handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_usr,OCI_HTYPE_SESSION,0,NULL)) // + { + printf("init session handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_svc,OCI_HTYPE_SVCCTX,0,NULL)) //ľ + { + printf("init service context handle error!\n\n"); + return -1; + } + + + if(swResult = OCIHandleAlloc(ociHandle->p_env,(dvoid **)&ociHandle->p_sql,OCI_HTYPE_STMT,0,NULL)) //SQL + { + printf("init statement handle error!\n\n"); + return -1; + } + + printf("init handle success!\n\n"); + + return 0; +} + + + +// ݿ +int ConnServer(char *username,char *password,char *dbname) +{ + int swResult; + char errbuf[100]={0}; + int errcode; + + if(InitHandle() == -1)//ʼ + return -1; + + if(swResult = OCILogon(ociHandle->p_env,ociHandle->p_err,&ociHandle->p_svc,(text *)username,strlen(username),(text *)password,strlen(password),(text *)dbname,strlen(dbname))) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Error - %.*s/n", 512, errbuf); + return -1; + } + else + printf("ݿӳɹ!\n\n"); + return 0; +} + + + +// SQLij(ִSQL) +int _ExeSQL(char *SQL,char ** inputValue,int inputValueCount) +{ + int swResult,i; + int errcode; + + //ð󶨱 + OCIBind *p_bndp[100]; + + //׼SQL + if(swResult = OCIStmtPrepare(ociHandle->p_sql,ociHandle->p_err,(text *)SQL,strlen(SQL),OCI_NTV_SYNTAX,OCI_DEFAULT)) + { + printf("prepare SQL statements error!\n\n"); + } + else + { + printf("prepare SQL statements success!\n\n"); + } + + + // + for(i=0;ip_sql,&p_bndp[i],ociHandle->p_err,i+1,(dvoid *)inputValue[i],(sb4)strlen(inputValue[i])+1,SQLT_STR, (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Bind Error - %.*s/n", 512, errbuf); + return -1; + } + } + + //ִSQL statements + if(swResult = OCIStmtExecute(ociHandle->p_svc,ociHandle->p_sql,ociHandle->p_err,1,0,NULL,NULL,OCI_DEFAULT)) + { + char errbuf[100]={0}; + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL statement Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL statement success!\n\n"); + } + return 0; +} + + + + +// ѯSQL +int _QuerySQL(char *SQL, SqlSelField *pOutField, SqlSelField *pSelField ) +{ + sword status; + int rc= 0,ret=0; + char errbuf[100]={0}; + int maxNum = 2048; + char chTag[8]; + int iIndex = 0; + int outputColumn = 0; + int errcode=0; + char nullValue = '\0'; // + sb2 sb2aInd[30] = {'\0'}; + + // ׼SQL + status = OCIStmtPrepare(ociHandle->p_sql, ociHandle->p_err, (text *)SQL,(ub4)strlen(SQL), (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT); + + if (status != OCI_SUCCESS) + { + printf("SQL Preparing failed/n"); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + memset(chTag, 0, 8); + sprintf(chTag, ":%d", iIndex+1); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->naIntValue[iIndex], sizeof(int), SQLT_INT,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + // char *͵, SQLʱ :3,:4, + for (iIndex=0; iIndexnCharNum; iIndex++) + { + int n=0; + memset(chTag, 0, 8); + n = pSelField->nIntNum + iIndex +1; + sprintf(chTag, ":%d", n); + if(rc = OCIBindByName(ociHandle->p_sql, (OCIBind **)&ociHandle->p_dfn, ociHandle->p_err, (text *)chTag,(sb4)strlen((char *)chTag),(dvoid *) &pSelField->caCharValue[iIndex], NUM, SQLT_STR,(dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("BindByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // ִSQL + if (rc = OCIStmtExecute(ociHandle->p_svc, ociHandle->p_sql, ociHandle->p_err, (ub4) 0, (ub4) 0,(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_STMT_SCROLLABLE_READONLY)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("execute SQL Error - %.*s\n", 512, errbuf); + return -1; + } + else + { + printf("execute SQL success!\n\n"); + } + + + if (ret = OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) &outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("Get OCIAttr Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + + + // int͵, SQLʱ :1,:2, + for (iIndex=0; iIndexnIntNum; iIndex++) + { + if(rc = OCIDefineByPos(ociHandle->p_sql, &ociHandle->p_dfn, ociHandle->p_err, iIndex+1, (dvoid *)&pOutField->naIntValue[iIndex], sizeof(int), SQLT_INT, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + + // char *͵, SQLʱ :1,:2, + for (iIndex=0; iIndexp_sql, &ociHandle->p_dfn, ociHandle->p_err, n, (dvoid *)&pOutField->caCharValue[iIndex], 1000*sizeof(char), SQLT_STR, (dvoid *) 0, (ub2 *)0,(ub2 *)0, OCI_DEFAULT)) + { + OCIErrorGet((dvoid *)ociHandle->p_err, (ub4) 1, (text *) NULL, &errcode, (ub1 *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); + printf("DefineByPos Error of ociHandle->p_sql - %.*s\n", 512, errbuf); + return -1; + } + } + + return 0; + +} + + + +// ͷHandler +void QuitFreeHandle() +{ + // ˳ + OCILogoff(ociHandle->p_svc,ociHandle->p_err); + printf("Quit success!\n"); + + // ͷž + OCIHandleFree(ociHandle->p_ser,OCI_HTYPE_SERVER); //ͷŷ + OCIHandleFree(ociHandle->p_err,OCI_HTYPE_ERROR); //ͷŴ + OCIHandleFree(ociHandle->p_usr,OCI_HTYPE_SESSION); //ͷ + OCIHandleFree(ociHandle->p_svc,OCI_HTYPE_SVCCTX); //ͷľ + OCIHandleFree(ociHandle->p_sql,OCI_HTYPE_STMT); //ͷSQL +} + + +// ִ +int ExecuteSQL(char *SQL,int valueCount,char **value) +{ + int i=0; + + if(i=_ExeSQL(SQL,value,valueCount)) + { + printf("1\n"); + QuitFreeHandle(); + return -1; + } + printf("2\n"); + return 0; +} + + +// IJѯ +int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + int i = 0, j=0 ,ret =0; + + int times = 0, temp=0; + + SqlSelField infield; + SqlSelField outField; + + // ʼṹ + infield.nCharNum = inputValueCount; + infield.nIntNum = 0; + outField.nCharNum = 0; + outField.nIntNum = 0; + + * outputColumn = 0; + * outputValueCount = 0; + + for(i=0;ip_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputColumn, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, ociHandle->p_err); + + // ȡһ,ȥ + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_LAST,0, OCI_DEFAULT); + // ȡ + ret= OCIAttrGet (ociHandle->p_sql, (ub4)OCI_HTYPE_STMT, (dvoid *) outputValueCount, (ub4 *) 0, (ub4)OCI_ATTR_ROW_COUNT, ociHandle->p_err); + + if(*outputValueCount == 0) + return 0; + + + // ʼڴ沢Ҵ洢 + ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_FIRST,0, OCI_DEFAULT); + *outputValue = (char ***) calloc ((*outputValueCount)+1,sizeof(char**)); + do + { + (*outputValue)[i] = (char **) calloc ((*outputColumn)+1,sizeof(char *)); + for(j=0;j<(*outputColumn);j++) + { + (*outputValue)[i][j] = (char *) calloc (1000,sizeof(char)); + strcpy((*outputValue)[i][j],outField.caCharValue[j]); + //printf("outValue[%d][%d] = %s , ַ=%d, ַָ= %d\n ",i,j,(*outputValue)[i][j],&(*outputValue)[i][j],(*outputValue)[i][j]); + } + i++; + } + while((ret = OCIStmtFetch2(ociHandle->p_sql, ociHandle->p_err,1, OCI_FETCH_NEXT, 1, OCI_DEFAULT)!= OCI_NO_DATA)); + + return 0; +} + + +// IJѯ +int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue) +{ + return QuerySQL(SQL,0,NULL,outputColumn,outputValueCount,outputValue); +} + +// ޲ +int ExecuteSQLNoInputParam(char *SQL) +{ + printf("ʼ\n"); + return ExecuteSQL(SQL,0,NULL); +} + +// Ͽ +void DisConnServer() +{ + if(ociHandle != NULL) + QuitFreeHandle(); +} + diff --git a/jf_itk/ocilib.h b/jf_itk/ocilib.h new file mode 100644 index 0000000..0a4e752 --- /dev/null +++ b/jf_itk/ocilib.h @@ -0,0 +1,98 @@ +/*===================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +======================================================================================================================= +File description: + + Filename: ocilib.h + Module : OCI + + This Header file of OCI library Package. + +======================================================================================================================= +Date Name Description of Change +1-Feb-2015 Ray Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#include +#include +#include +#include +#include +//#include + +#define OCI_FAIL 1 +#define OCI_OK 0 + +#ifdef __cplusplus +extern "C" +{ +#endif + /** + * ݿ. + * @param username - û + * @param password - + * @param dbname - ݿSID + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ConnServer(char *username,char *password,char *dbname); + + + /** + * ִSQL. + * @param SQL - SQL + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQLNoInputParam(char *SQL); + + /** + * ִSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int ExecuteSQL(char *SQL,int inputValueCount,char **inputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQLNoInputParam(char *SQL, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * IJѯSQL. + * @param SQL - SQL + * @param inputValueCount - + * @param inputValue - ֵ + * @param outputColumn - е + * @param outputValueCount - е + * @param outputValue - + * @return - OCI_OK or error code + * + * ORACLE ݿװ + */ + extern int QuerySQL(char *SQL, int inputValueCount, char ** inputValue, int * outputColumn, int * outputValueCount, char **** outputValue); + + /** + * Ͽݿ. + * + * ORACLE ݿװ + */ + extern void DisConnServer(); + +#ifdef __cplusplus +} +#endif diff --git a/jf_itk/runtime_properties.cpp b/jf_itk/runtime_properties.cpp new file mode 100644 index 0000000..35983fa --- /dev/null +++ b/jf_itk/runtime_properties.cpp @@ -0,0 +1,258 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/** +* @headerfile standard c & cpp header files +*/ +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +/** +* @headerfile user's header files +*/ + +#include "epm_handler_common.h" +#include "error_handling.h" +#include "common_itk_util.h" +#include "string_helper.h" + + +#define SAFECALL(x) \ +{ \ + err_function = #x; err_line = __LINE__; \ + if((rcode = (x)) != ITK_ok) \ + { \ + goto CLEANUP; \ + } \ +} +void va_copy( va_list *dest , va_list * src ){ + *dest = *src ; +} +static int SMP_ask_bomline_value( METHOD_message_t * m, va_list args ) +{ + int rcode = ITK_ok; + char *err_string,*err_function; + int err_line = -1; + tag_t objTag = NULLTAG; + const char * prop_name; + char** value = NULL; + char *bom_rev_status = NULL; + char sQty[] = ""; + char sUnRead[] = "UNREADABLE"; + va_list largs; + tag_t bom_line_item = NULLTAG; + tag_t bom_line_rev = NULLTAG; + tag_t last_rev = NULLTAG; + tag_t iman_type_tag = NULLTAG ; + char obj_class_name[TCTYPE_class_name_size_c+1]; + char obj_type_name[TCTYPE_name_size_c+1]; + int attr_bom_item = 0; + int attr_bom_rev = 0; + int attr_bom_rev_status = 0; + char item_rev_id[ITEM_id_size_c+1]="",item_id[ITEM_id_size_c+1]="",rev_id[ITEM_id_size_c+1]="", + strRow[BUFSIZ]="",txtfile[BUFSIZ]="", obj_type[WSO_object_type_size_c+1]=""; + tag_t master_form_rel_type = NULLTAG; + int form_count = 0, attr_qty_id = 0; + tag_t *form_list=NULL, master_form = NULLTAG; + char *d_value=NULL, *qty_value = NULL; + + METHOD_PROP_MESSAGE_OBJECT(m, objTag) /* objTag is the tag of the property's owning object */ + METHOD_PROP_MESSAGE_PROP_NAME(m, prop_name) /* prop_name is the name of the current property */ + printf("\n name : %s\n",prop_name); + + va_copy( &largs, &args ); + va_arg( largs, tag_t ); /* ignore the first tag_t arg */ + value = va_arg( largs, char**); + va_end( largs ); + //ȡĿ + ITKCALL( TCTYPE_ask_object_type( objTag,&iman_type_tag ) ); + ITKCALL( TCTYPE_ask_class_name(iman_type_tag,obj_class_name));//get ClassName of attachment + ITKCALL( TCTYPE_ask_name(iman_type_tag,obj_type_name) ); + printf("\n Type name : %s\n",obj_type_name); + TC_write_syslog("\n Type name : %s\n",obj_type_name); + //if ( strcmp( obj_type_name , "Mfg0BvrPart" ) == 0 ) + //{ + // + //} + if ( strcmp( obj_type_name , "Mfg0BvrPart" ) == 0 ) + //if ( strcmp( obj_type_name , "BOMLine" ) == 0 ) + { + printf("\n is Mfg0BvrPart\n"); + SAFECALL( BOM_line_look_up_attribute( bomAttr_lineItemTag , & attr_bom_item ) ); + SAFECALL( BOM_line_look_up_attribute( bomAttr_lineItemRevTag , & attr_bom_rev ) ); + SAFECALL( BOM_line_look_up_attribute( bomAttr_occQty , & attr_qty_id ) ); + SAFECALL( BOM_line_ask_attribute_tag( objTag, attr_bom_item , &bom_line_item )); + SAFECALL( BOM_line_ask_attribute_tag( objTag, attr_bom_rev , &bom_line_rev )); + SAFECALL( BOM_line_ask_attribute_string( objTag, attr_qty_id, &qty_value )); + SAFECALL( WSOM_ask_object_type(bom_line_item, obj_type )); + printf("\n obj_type=%s",obj_type); + TC_write_syslog("\n obj_type=%s",obj_type); + //if( strcmp(obj_type, "Mfg0BvrPart") == 0) + if( strcmp(obj_type, "C7Part") == 0) + { + SAFECALL( GRM_find_relation_type( TC_master_form_rtype, &master_form_rel_type ) ); + SAFECALL( GRM_list_secondary_objects_only(bom_line_rev, master_form_rel_type, &form_count, &form_list )); + master_form = form_list[0]; + if( master_form != NULLTAG ) + { + SAFECALL(AOM_UIF_ask_value(master_form, "c7GeneralClfion", &d_value)); + printf("\n d_value=%s\n",d_value); + TC_write_syslog("\n d_value=%s\n",d_value); + //޸ӱʶ + if( strcmp(d_value, "C") == 0 + || strcmp(d_value, "F") == 0 + || strcmp(d_value, "F1") == 0 + || strcmp(d_value, "F2") == 0 + || strcmp(d_value, "F3") == 0 ) + { + strcpy(sQty,""); + } + else + { + if( strcmp(qty_value,"") == 0) + { + strcpy(sQty,"1"); + } + else + strcpy(sQty,qty_value); + } + MEM_free(d_value); + } + MEM_free(form_list); + } + + } +CLEANUP : + + if( rcode != ITK_ok) + { + if ( 515001 == rcode || err_line == 80 ){ + if ( *value != NULL ) MEM_free( *value ); + *value = NULL; + *value = (char*)MEM_alloc ( 10 + 1 ); + strcpy ( *value, "1" ); + EMH_clear_errors( ); + rcode = ITK_ok; + }else + { + EMH_ask_error_text (rcode, &err_string); + printf ("ERROR: %d ERROR MSG: %s.\n", rcode, err_string); + printf ("Function: %s FILE: %s LINE: %d\n", err_function, __FILE__, err_line); + MEM_free (err_string); + } + TC_write_syslog("\n rcode != ITK_ok"); + }else{ + if ( *value != NULL ) MEM_free( *value ); + *value = NULL ; + *value = (char*)MEM_alloc ( strlen ( sQty ) + 1 ); + strcpy ( *value, sQty ); + TC_write_syslog("\n else sQty=%s",sQty); + } + + return rcode; +} + +int SMP_init_user_bomline_props(METHOD_message_t* m, va_list args) +{ + int rcode = ITK_ok; + char *err_string,*err_function; + int err_line = -1; + tag_t type_tag; + tag_t pd_tag = NULLTAG; + METHOD_id_t method; + char typename_cpp[TCTYPE_name_size_c+1]; + tag_t lov_tag; + tag_t tmp_lov_tag; + + + va_list largs; + va_copy( &largs, &args ); + type_tag = va_arg( largs, tag_t ); + va_end( largs ); + + ITKCALL( TCTYPE_ask_name( type_tag, typename_cpp ) ); + + /* ====== add properties for Bomline class types ====== */ + /* ---- add superseded runtime property ---- */ + ITKCALL( TCTYPE_add_runtime_property( type_tag, "JK8SupplyType",PROP_string,1,&pd_tag ) ); + + /* --- set display name...can also be done in user_property_names.uil --- */ + ITKCALL( PROPDESC_set_display_name(pd_tag,"JK8SupplyType") ); + + /* --- register method to ask value --- */ + ITKCALL( METHOD_register_prop_method( (const char*)typename_cpp, "JK8SupplyType", PROP_ask_value_string_msg, SMP_ask_bomline_value , 0 , &method ) ); + printf("\n METHOD_register_prop_method"); + /* --- register method to set value --- */ + //SAFECALL( PROPDESC_set_protection( pd_tag, PROP_write ) ); + //SAFECALL( METHOD_register_prop_method( (const char*)typename, "superseded", PROP_set_value_string_msg, SMP_set_bomline_superseded , 0 , &method ) ); + +CLEANUP: + + if( rcode != ITK_ok) + { + EMH_ask_error_text (rcode, &err_string); + printf ("ERROR: %d ERROR MSG: %s.\n", rcode, err_string); + printf ("Function: %s FILE: %s LINE: %d\n", err_function, __FILE__, err_line); + MEM_free (err_string); + } + + return( ITK_ok ); + +} + + +extern int Run_Time_register_properties( void ) +{ + int rcode = ITK_ok; + char *err_string,*err_function; + int err_line = -1; + + USER_prop_init_entry_t user_types_methods[]= { { "BOMLine" , SMP_init_user_bomline_props , NULL } }; + + int n_types = sizeof(user_types_methods)/sizeof(USER_prop_init_entry_t); + + SAFECALL( TCTYPE_register_properties(user_types_methods, n_types )); + printf("\n TCTYPE_register_properties\n"); + TC_write_syslog("\n TCTYPE_register_properties\n"); +CLEANUP: + + if( rcode != ITK_ok) + { + EMH_ask_error_text (rcode, &err_string); + printf ("ERROR: %d ERROR MSG: %s.\n", rcode, err_string); + printf ("Function: FILE: %s LINE: %d\n", __FILE__, err_line); + MEM_free (err_string); + } + + return rcode; +} diff --git a/jf_itk/sendTOClass/ErpWebServiceSoap.nsmap b/jf_itk/sendTOClass/ErpWebServiceSoap.nsmap new file mode 100644 index 0000000..580fdcb --- /dev/null +++ b/jf_itk/sendTOClass/ErpWebServiceSoap.nsmap @@ -0,0 +1,11 @@ + +#include "stdsoap2.h" +/* This defines the global XML namespaces[] table to #include and compile */ +SOAP_NMAC struct Namespace namespaces[] = { + { "SOAP-ENV", "http://www.w3.org/2003/05/soap-envelope", "http://schemas.xmlsoap.org/soap/envelope/", NULL }, + { "SOAP-ENC", "http://www.w3.org/2003/05/soap-encoding", "http://schemas.xmlsoap.org/soap/encoding/", NULL }, + { "xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL }, + { "xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL }, + { "ns1", "http://tempuri.org/", NULL, NULL }, + { NULL, NULL, NULL, NULL} + }; diff --git a/jf_itk/sendTOClass/sendToClass.h b/jf_itk/sendTOClass/sendToClass.h new file mode 100644 index 0000000..ad75230 --- /dev/null +++ b/jf_itk/sendTOClass/sendToClass.h @@ -0,0 +1,1205 @@ +/* .\sendToClass.h + Generated by wsdl2h 2.8.103 from .\sendToClass.wsdl and .\chinano1.bat + 2020-09-03 08:52:31 GMT + + DO NOT INCLUDE THIS ANNOTATED FILE DIRECTLY IN YOUR PROJECT SOURCE CODE. + USE THE FILES GENERATED BY soapcpp2 FOR YOUR PROJECT'S SOURCE CODE. + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +/** + +@page page_notes Notes + +@note HINTS: + - Run soapcpp2 on .\sendToClass.h to generate the SOAP/XML processing logic: + Use soapcpp2 -I to specify paths for #import + Use soapcpp2 -j to generate improved proxy and server classes. + Use soapcpp2 -r to generate a report. + - Edit 'typemap.dat' to control namespace bindings and type mappings: + It is strongly recommended to customize the names of the namespace prefixes + generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces + section below and add the modified lines to 'typemap.dat' to rerun wsdl2h. + - Run Doxygen (www.doxygen.org) on this file to generate documentation. + - Use wsdl2h -c to generate pure C code. + - Use wsdl2h -R to include the REST operations defined by the WSDLs. + - Use wsdl2h -O3 or -O4 to optimize by removing unused schema components. + - Use wsdl2h -d to enable DOM support for xsd:any and xsd:anyType. + - Use wsdl2h -F to simulate struct-type derivation in C (also works in C++). + - Use wsdl2h -f to generate flat C++ class hierarchy, removes type derivation. + - Use wsdl2h -g to generate top-level root elements with readers and writers. + - Use wsdl2h -U to map XML names to C++ Unicode identifiers instead of _xNNNN. + - Use wsdl2h -u to disable the generation of unions. + - Use wsdl2h -L to remove this @note and all other @note comments. + - Use wsdl2h -nname to use name as the base namespace prefix instead of 'ns'. + - Use wsdl2h -Nname for service prefix and produce multiple service bindings + - Struct/class members serialized as XML attributes are annotated with a '@'. + - Struct/class members that have a special role are annotated with a '$'. + +@warning + DO NOT INCLUDE THIS ANNOTATED FILE DIRECTLY IN YOUR PROJECT SOURCE CODE. + USE THE FILES GENERATED BY soapcpp2 FOR YOUR PROJECT'S SOURCE CODE: + THE GENERATED soapStub.h FILE CONTAINS THIS CONTENT WITHOUT ANNOTATIONS. + +@copyright LICENSE: +@verbatim +-------------------------------------------------------------------------------- +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The wsdl2h tool and its generated software are released under the GPL. +This software is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +GPL license. + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, MA 02111-1307 USA + +Author contact information: +engelen@genivia.com / engelen@acm.org + +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial-use license is available from Genivia, Inc., contact@genivia.com +-------------------------------------------------------------------------------- +@endverbatim + +*/ + + +//gsoapopt c++,w + +/******************************************************************************\ + * * + * Definitions * + * http://tempuri.org/ * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * $CONTAINER typemap variable: * + * std::vector * + * * +\******************************************************************************/ + +#include +template class std::vector; + +/******************************************************************************\ + * * + * $SIZE typemap variable: * + * int * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Import * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Schema Namespaces * + * * +\******************************************************************************/ + + +/* NOTE: + +It is strongly recommended to customize the names of the namespace prefixes +generated by wsdl2h. To do so, modify the prefix bindings below and add the +modified lines to 'typemap.dat' then rerun wsdl2h (use wsdl2h -t typemap.dat): + +ns1 = "http://tempuri.org/" + +*/ + +#define SOAP_NAMESPACE_OF_ns1 "http://tempuri.org/" +//gsoap ns1 schema namespace: http://tempuri.org/ +//gsoap ns1 schema elementForm: qualified +//gsoap ns1 schema attributeForm: unqualified + +/******************************************************************************\ + * * + * Built-in Schema Types and Top-Level Elements and Attributes * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Forward Declarations * + * * +\******************************************************************************/ + + +class _ns1__SetMaterialStatusS; + +class _ns1__SetMaterialStatusSResponse; + +class _ns1__CreateProject; + +class _ns1__CreateProjectResponse; + +class _ns1__SendToClass; + +class _ns1__SendToClassResponse; + +class _ns1__DeleteClass; + +class _ns1__DeleteClassResponse; + + +/******************************************************************************\ + * * + * Schema Types and Top-Level Elements and Attributes * + * http://tempuri.org/ * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Schema Complex Types and Top-Level Elements * + * http://tempuri.org/ * + * * +\******************************************************************************/ + +/// @brief Top-level root element "http://tempuri.org/":SetMaterialStatusS +/// @brief "http://tempuri.org/":SetMaterialStatusS is a complexType. +/// +/// @note class _ns1__SetMaterialStatusS operations: +/// - _ns1__SetMaterialStatusS* soap_new__ns1__SetMaterialStatusS(soap*) allocate and default initialize +/// - _ns1__SetMaterialStatusS* soap_new__ns1__SetMaterialStatusS(soap*, int num) allocate and default initialize an array +/// - _ns1__SetMaterialStatusS* soap_new_req__ns1__SetMaterialStatusS(soap*, ...) allocate, set required members +/// - _ns1__SetMaterialStatusS* soap_new_set__ns1__SetMaterialStatusS(soap*, ...) allocate, set all public members +/// - _ns1__SetMaterialStatusS::soap_default(soap*) default initialize members +/// - int soap_read__ns1__SetMaterialStatusS(soap*, _ns1__SetMaterialStatusS*) deserialize from a stream +/// - int soap_write__ns1__SetMaterialStatusS(soap*, _ns1__SetMaterialStatusS*) serialize to a stream +/// - _ns1__SetMaterialStatusS* _ns1__SetMaterialStatusS::soap_dup(soap*) returns deep copy of _ns1__SetMaterialStatusS, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__SetMaterialStatusS::soap_del() deep deletes _ns1__SetMaterialStatusS data members, use only after _ns1__SetMaterialStatusS::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__SetMaterialStatusS::soap_type() returns SOAP_TYPE__ns1__SetMaterialStatusS or derived type identifier +class _ns1__SetMaterialStatusS +{ public: +/// Element "fileName" of type xs:string. + wchar_t* fileName 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":SetMaterialStatusSResponse +/// @brief "http://tempuri.org/":SetMaterialStatusSResponse is a complexType. +/// +/// @note class _ns1__SetMaterialStatusSResponse operations: +/// - _ns1__SetMaterialStatusSResponse* soap_new__ns1__SetMaterialStatusSResponse(soap*) allocate and default initialize +/// - _ns1__SetMaterialStatusSResponse* soap_new__ns1__SetMaterialStatusSResponse(soap*, int num) allocate and default initialize an array +/// - _ns1__SetMaterialStatusSResponse* soap_new_req__ns1__SetMaterialStatusSResponse(soap*, ...) allocate, set required members +/// - _ns1__SetMaterialStatusSResponse* soap_new_set__ns1__SetMaterialStatusSResponse(soap*, ...) allocate, set all public members +/// - _ns1__SetMaterialStatusSResponse::soap_default(soap*) default initialize members +/// - int soap_read__ns1__SetMaterialStatusSResponse(soap*, _ns1__SetMaterialStatusSResponse*) deserialize from a stream +/// - int soap_write__ns1__SetMaterialStatusSResponse(soap*, _ns1__SetMaterialStatusSResponse*) serialize to a stream +/// - _ns1__SetMaterialStatusSResponse* _ns1__SetMaterialStatusSResponse::soap_dup(soap*) returns deep copy of _ns1__SetMaterialStatusSResponse, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__SetMaterialStatusSResponse::soap_del() deep deletes _ns1__SetMaterialStatusSResponse data members, use only after _ns1__SetMaterialStatusSResponse::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__SetMaterialStatusSResponse::soap_type() returns SOAP_TYPE__ns1__SetMaterialStatusSResponse or derived type identifier +class _ns1__SetMaterialStatusSResponse +{ public: +/// Element "SetMaterialStatusSResult" of type xs:string. + wchar_t* SetMaterialStatusSResult 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":CreateProject +/// @brief "http://tempuri.org/":CreateProject is a complexType. +/// +/// @note class _ns1__CreateProject operations: +/// - _ns1__CreateProject* soap_new__ns1__CreateProject(soap*) allocate and default initialize +/// - _ns1__CreateProject* soap_new__ns1__CreateProject(soap*, int num) allocate and default initialize an array +/// - _ns1__CreateProject* soap_new_req__ns1__CreateProject(soap*, ...) allocate, set required members +/// - _ns1__CreateProject* soap_new_set__ns1__CreateProject(soap*, ...) allocate, set all public members +/// - _ns1__CreateProject::soap_default(soap*) default initialize members +/// - int soap_read__ns1__CreateProject(soap*, _ns1__CreateProject*) deserialize from a stream +/// - int soap_write__ns1__CreateProject(soap*, _ns1__CreateProject*) serialize to a stream +/// - _ns1__CreateProject* _ns1__CreateProject::soap_dup(soap*) returns deep copy of _ns1__CreateProject, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__CreateProject::soap_del() deep deletes _ns1__CreateProject data members, use only after _ns1__CreateProject::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__CreateProject::soap_type() returns SOAP_TYPE__ns1__CreateProject or derived type identifier +class _ns1__CreateProject +{ public: +/// Element "projJsonString" of type xs:string. + wchar_t* projJsonString 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":CreateProjectResponse +/// @brief "http://tempuri.org/":CreateProjectResponse is a complexType. +/// +/// @note class _ns1__CreateProjectResponse operations: +/// - _ns1__CreateProjectResponse* soap_new__ns1__CreateProjectResponse(soap*) allocate and default initialize +/// - _ns1__CreateProjectResponse* soap_new__ns1__CreateProjectResponse(soap*, int num) allocate and default initialize an array +/// - _ns1__CreateProjectResponse* soap_new_req__ns1__CreateProjectResponse(soap*, ...) allocate, set required members +/// - _ns1__CreateProjectResponse* soap_new_set__ns1__CreateProjectResponse(soap*, ...) allocate, set all public members +/// - _ns1__CreateProjectResponse::soap_default(soap*) default initialize members +/// - int soap_read__ns1__CreateProjectResponse(soap*, _ns1__CreateProjectResponse*) deserialize from a stream +/// - int soap_write__ns1__CreateProjectResponse(soap*, _ns1__CreateProjectResponse*) serialize to a stream +/// - _ns1__CreateProjectResponse* _ns1__CreateProjectResponse::soap_dup(soap*) returns deep copy of _ns1__CreateProjectResponse, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__CreateProjectResponse::soap_del() deep deletes _ns1__CreateProjectResponse data members, use only after _ns1__CreateProjectResponse::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__CreateProjectResponse::soap_type() returns SOAP_TYPE__ns1__CreateProjectResponse or derived type identifier +class _ns1__CreateProjectResponse +{ public: +/// Element "CreateProjectResult" of type xs:string. + wchar_t* CreateProjectResult 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":SendToClass +/// @brief "http://tempuri.org/":SendToClass is a complexType. +/// +/// @note class _ns1__SendToClass operations: +/// - _ns1__SendToClass* soap_new__ns1__SendToClass(soap*) allocate and default initialize +/// - _ns1__SendToClass* soap_new__ns1__SendToClass(soap*, int num) allocate and default initialize an array +/// - _ns1__SendToClass* soap_new_req__ns1__SendToClass(soap*, ...) allocate, set required members +/// - _ns1__SendToClass* soap_new_set__ns1__SendToClass(soap*, ...) allocate, set all public members +/// - _ns1__SendToClass::soap_default(soap*) default initialize members +/// - int soap_read__ns1__SendToClass(soap*, _ns1__SendToClass*) deserialize from a stream +/// - int soap_write__ns1__SendToClass(soap*, _ns1__SendToClass*) serialize to a stream +/// - _ns1__SendToClass* _ns1__SendToClass::soap_dup(soap*) returns deep copy of _ns1__SendToClass, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__SendToClass::soap_del() deep deletes _ns1__SendToClass data members, use only after _ns1__SendToClass::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__SendToClass::soap_type() returns SOAP_TYPE__ns1__SendToClass or derived type identifier +class _ns1__SendToClass +{ public: +/// Element "wsoPuiid" of type xs:string. + wchar_t* wsoPuiid 0; ///< Optional element. +/// Element "classID" of type xs:string. + wchar_t* classID 0; ///< Optional element. +/// Element "JsonContainer" of type xs:string. + wchar_t* JsonContainer 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":SendToClassResponse +/// @brief "http://tempuri.org/":SendToClassResponse is a complexType. +/// +/// @note class _ns1__SendToClassResponse operations: +/// - _ns1__SendToClassResponse* soap_new__ns1__SendToClassResponse(soap*) allocate and default initialize +/// - _ns1__SendToClassResponse* soap_new__ns1__SendToClassResponse(soap*, int num) allocate and default initialize an array +/// - _ns1__SendToClassResponse* soap_new_req__ns1__SendToClassResponse(soap*, ...) allocate, set required members +/// - _ns1__SendToClassResponse* soap_new_set__ns1__SendToClassResponse(soap*, ...) allocate, set all public members +/// - _ns1__SendToClassResponse::soap_default(soap*) default initialize members +/// - int soap_read__ns1__SendToClassResponse(soap*, _ns1__SendToClassResponse*) deserialize from a stream +/// - int soap_write__ns1__SendToClassResponse(soap*, _ns1__SendToClassResponse*) serialize to a stream +/// - _ns1__SendToClassResponse* _ns1__SendToClassResponse::soap_dup(soap*) returns deep copy of _ns1__SendToClassResponse, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__SendToClassResponse::soap_del() deep deletes _ns1__SendToClassResponse data members, use only after _ns1__SendToClassResponse::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__SendToClassResponse::soap_type() returns SOAP_TYPE__ns1__SendToClassResponse or derived type identifier +class _ns1__SendToClassResponse +{ public: +/// Element "SendToClassResult" of type xs:string. + wchar_t* SendToClassResult 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":DeleteClass +/// @brief "http://tempuri.org/":DeleteClass is a complexType. +/// +/// @note class _ns1__DeleteClass operations: +/// - _ns1__DeleteClass* soap_new__ns1__DeleteClass(soap*) allocate and default initialize +/// - _ns1__DeleteClass* soap_new__ns1__DeleteClass(soap*, int num) allocate and default initialize an array +/// - _ns1__DeleteClass* soap_new_req__ns1__DeleteClass(soap*, ...) allocate, set required members +/// - _ns1__DeleteClass* soap_new_set__ns1__DeleteClass(soap*, ...) allocate, set all public members +/// - _ns1__DeleteClass::soap_default(soap*) default initialize members +/// - int soap_read__ns1__DeleteClass(soap*, _ns1__DeleteClass*) deserialize from a stream +/// - int soap_write__ns1__DeleteClass(soap*, _ns1__DeleteClass*) serialize to a stream +/// - _ns1__DeleteClass* _ns1__DeleteClass::soap_dup(soap*) returns deep copy of _ns1__DeleteClass, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__DeleteClass::soap_del() deep deletes _ns1__DeleteClass data members, use only after _ns1__DeleteClass::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__DeleteClass::soap_type() returns SOAP_TYPE__ns1__DeleteClass or derived type identifier +class _ns1__DeleteClass +{ public: +/// Element "icoPuid" of type xs:string. + wchar_t* icoPuid 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + +/// @brief Top-level root element "http://tempuri.org/":DeleteClassResponse +/// @brief "http://tempuri.org/":DeleteClassResponse is a complexType. +/// +/// @note class _ns1__DeleteClassResponse operations: +/// - _ns1__DeleteClassResponse* soap_new__ns1__DeleteClassResponse(soap*) allocate and default initialize +/// - _ns1__DeleteClassResponse* soap_new__ns1__DeleteClassResponse(soap*, int num) allocate and default initialize an array +/// - _ns1__DeleteClassResponse* soap_new_req__ns1__DeleteClassResponse(soap*, ...) allocate, set required members +/// - _ns1__DeleteClassResponse* soap_new_set__ns1__DeleteClassResponse(soap*, ...) allocate, set all public members +/// - _ns1__DeleteClassResponse::soap_default(soap*) default initialize members +/// - int soap_read__ns1__DeleteClassResponse(soap*, _ns1__DeleteClassResponse*) deserialize from a stream +/// - int soap_write__ns1__DeleteClassResponse(soap*, _ns1__DeleteClassResponse*) serialize to a stream +/// - _ns1__DeleteClassResponse* _ns1__DeleteClassResponse::soap_dup(soap*) returns deep copy of _ns1__DeleteClassResponse, copies the (cyclic) graph structure when a context is provided, or (cycle-pruned) tree structure with soap_set_mode(soap, SOAP_XML_TREE) (use soapcpp2 -Ec) +/// - _ns1__DeleteClassResponse::soap_del() deep deletes _ns1__DeleteClassResponse data members, use only after _ns1__DeleteClassResponse::soap_dup(NULL) (use soapcpp2 -Ed) +/// - int _ns1__DeleteClassResponse::soap_type() returns SOAP_TYPE__ns1__DeleteClassResponse or derived type identifier +class _ns1__DeleteClassResponse +{ public: +/// Element "DeleteClassResult" of type xs:string. + wchar_t* DeleteClassResult 0; ///< Optional element. +/// Pointer to soap context that manages this instance. + struct soap *soap ; +}; + + +/******************************************************************************\ + * * + * Additional Top-Level Elements * + * http://tempuri.org/ * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Additional Top-Level Attributes * + * http://tempuri.org/ * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Services * + * * +\******************************************************************************/ + +// This service supports SOAP 1.2 namespaces: +#import "soap12.h" + +//gsoap ns1 service name: ErpWebServiceSoap +//gsoap ns1 service type: ErpWebServiceSoap +//gsoap ns1 service port: http://192.168.1.137:8090/ErpWebService.asmx +//gsoap ns1 service namespace: http://tempuri.org/ +//gsoap ns1 service transport: http://schemas.xmlsoap.org/soap/http + +/** @mainpage Service Definitions + +@section Service_bindings Service Bindings + + - @ref ErpWebServiceSoap + +@section Service_more More Information + + - @ref page_notes "Notes" + + - @ref page_XMLDataBinding "XML Data Binding" + + - @ref SOAP_ENV__Header "SOAP Header Content" (when applicable) + + - @ref SOAP_ENV__Detail "SOAP Fault Detail Content" (when applicable) + + +*/ + +/** @page ErpWebServiceSoap Binding "ErpWebServiceSoap" + +@section ErpWebServiceSoap_operations Operations of Binding "ErpWebServiceSoap" + + - @ref __ns1__SetMaterialStatusS + + - @ref __ns1__CreateProject + + - @ref __ns1__SendToClass + + - @ref __ns1__DeleteClass + + - @ref __ns1__SetMaterialStatusS_ + + - @ref __ns1__CreateProject_ + + - @ref __ns1__SendToClass_ + + - @ref __ns1__DeleteClass_ + +@section ErpWebServiceSoap_ports Default endpoints of Binding "ErpWebServiceSoap" + + - http://192.168.1.137:8090/ErpWebService.asmx + +@note Multiple service bindings collected as one, use wsdl2h option -Nname to produce a separate service for each binding + + +*/ + +/******************************************************************************\ + * * + * Service Binding * + * ErpWebServiceSoap * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__SetMaterialStatusS * + * * +\******************************************************************************/ + + +/** Operation "__ns1__SetMaterialStatusS" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/SetMaterialStatusS" + + - Addressing input action: "http://tempuri.org/SetMaterialStatusS" + + - Addressing output action: "http://tempuri.org/SetMaterialStatusSResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__SetMaterialStatusS( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, + // output parameters: + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__SetMaterialStatusS( + struct soap *soap, + // input parameters: + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, + // output parameters: + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: SetMaterialStatusS SOAP +//gsoap ns1 service method-style: SetMaterialStatusS document +//gsoap ns1 service method-encoding: SetMaterialStatusS literal +//gsoap ns1 service method-input-action: SetMaterialStatusS http://tempuri.org/SetMaterialStatusS +//gsoap ns1 service method-output-action: SetMaterialStatusS http://tempuri.org/SetMaterialStatusSResponse +int __ns1__SetMaterialStatusS( + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, ///< Input parameter + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__CreateProject * + * * +\******************************************************************************/ + + +/** Operation "__ns1__CreateProject" of service binding "ErpWebServiceSoap". +/ + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/CreateProject" + + - Addressing input action: "http://tempuri.org/CreateProject" + + - Addressing output action: "http://tempuri.org/CreateProjectResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__CreateProject( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__CreateProject* ns1__CreateProject, + // output parameters: + _ns1__CreateProjectResponse &ns1__CreateProjectResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__CreateProject( + struct soap *soap, + // input parameters: + _ns1__CreateProject* ns1__CreateProject, + // output parameters: + _ns1__CreateProjectResponse &ns1__CreateProjectResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: CreateProject SOAP +//gsoap ns1 service method-style: CreateProject document +//gsoap ns1 service method-encoding: CreateProject literal +//gsoap ns1 service method-input-action: CreateProject http://tempuri.org/CreateProject +//gsoap ns1 service method-output-action: CreateProject http://tempuri.org/CreateProjectResponse +int __ns1__CreateProject( + _ns1__CreateProject* ns1__CreateProject, ///< Input parameter + _ns1__CreateProjectResponse &ns1__CreateProjectResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__SendToClass * + * * +\******************************************************************************/ + + +/** Operation "__ns1__SendToClass" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/SendToClass" + + - Addressing input action: "http://tempuri.org/SendToClass" + + - Addressing output action: "http://tempuri.org/SendToClassResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__SendToClass( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__SendToClass* ns1__SendToClass, + // output parameters: + _ns1__SendToClassResponse &ns1__SendToClassResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__SendToClass( + struct soap *soap, + // input parameters: + _ns1__SendToClass* ns1__SendToClass, + // output parameters: + _ns1__SendToClassResponse &ns1__SendToClassResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: SendToClass SOAP +//gsoap ns1 service method-style: SendToClass document +//gsoap ns1 service method-encoding: SendToClass literal +//gsoap ns1 service method-input-action: SendToClass http://tempuri.org/SendToClass +//gsoap ns1 service method-output-action: SendToClass http://tempuri.org/SendToClassResponse +int __ns1__SendToClass( + _ns1__SendToClass* ns1__SendToClass, ///< Input parameter + _ns1__SendToClassResponse &ns1__SendToClassResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__DeleteClass * + * * +\******************************************************************************/ + + +/** Operation "__ns1__DeleteClass" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/DeleteClass" + + - Addressing input action: "http://tempuri.org/DeleteClass" + + - Addressing output action: "http://tempuri.org/DeleteClassResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__DeleteClass( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__DeleteClass* ns1__DeleteClass, + // output parameters: + _ns1__DeleteClassResponse &ns1__DeleteClassResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__DeleteClass( + struct soap *soap, + // input parameters: + _ns1__DeleteClass* ns1__DeleteClass, + // output parameters: + _ns1__DeleteClassResponse &ns1__DeleteClassResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: DeleteClass SOAP +//gsoap ns1 service method-style: DeleteClass document +//gsoap ns1 service method-encoding: DeleteClass literal +//gsoap ns1 service method-input-action: DeleteClass http://tempuri.org/DeleteClass +//gsoap ns1 service method-output-action: DeleteClass http://tempuri.org/DeleteClassResponse +int __ns1__DeleteClass( + _ns1__DeleteClass* ns1__DeleteClass, ///< Input parameter + _ns1__DeleteClassResponse &ns1__DeleteClassResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__SetMaterialStatusS_ * + * * +\******************************************************************************/ + + +/** Operation "__ns1__SetMaterialStatusS_" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/SetMaterialStatusS" + + - Addressing input action: "http://tempuri.org/SetMaterialStatusS" + + - Addressing output action: "http://tempuri.org/SetMaterialStatusSResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__SetMaterialStatusS_( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, + // output parameters: + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__SetMaterialStatusS_( + struct soap *soap, + // input parameters: + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, + // output parameters: + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: SetMaterialStatusS_ SOAP +//gsoap ns1 service method-style: SetMaterialStatusS_ document +//gsoap ns1 service method-encoding: SetMaterialStatusS_ literal +//gsoap ns1 service method-input-action: SetMaterialStatusS_ http://tempuri.org/SetMaterialStatusS +//gsoap ns1 service method-output-action: SetMaterialStatusS_ http://tempuri.org/SetMaterialStatusSResponse +int __ns1__SetMaterialStatusS_( + _ns1__SetMaterialStatusS* ns1__SetMaterialStatusS, ///< Input parameter + _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__CreateProject_ * + * * +\******************************************************************************/ + + +/** Operation "__ns1__CreateProject_" of service binding "ErpWebServiceSoap". +/ + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/CreateProject" + + - Addressing input action: "http://tempuri.org/CreateProject" + + - Addressing output action: "http://tempuri.org/CreateProjectResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__CreateProject_( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__CreateProject* ns1__CreateProject, + // output parameters: + _ns1__CreateProjectResponse &ns1__CreateProjectResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__CreateProject_( + struct soap *soap, + // input parameters: + _ns1__CreateProject* ns1__CreateProject, + // output parameters: + _ns1__CreateProjectResponse &ns1__CreateProjectResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: CreateProject_ SOAP +//gsoap ns1 service method-style: CreateProject_ document +//gsoap ns1 service method-encoding: CreateProject_ literal +//gsoap ns1 service method-input-action: CreateProject_ http://tempuri.org/CreateProject +//gsoap ns1 service method-output-action: CreateProject_ http://tempuri.org/CreateProjectResponse +int __ns1__CreateProject_( + _ns1__CreateProject* ns1__CreateProject, ///< Input parameter + _ns1__CreateProjectResponse &ns1__CreateProjectResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__SendToClass_ * + * * +\******************************************************************************/ + + +/** Operation "__ns1__SendToClass_" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/SendToClass" + + - Addressing input action: "http://tempuri.org/SendToClass" + + - Addressing output action: "http://tempuri.org/SendToClassResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__SendToClass_( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__SendToClass* ns1__SendToClass, + // output parameters: + _ns1__SendToClassResponse &ns1__SendToClassResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__SendToClass_( + struct soap *soap, + // input parameters: + _ns1__SendToClass* ns1__SendToClass, + // output parameters: + _ns1__SendToClassResponse &ns1__SendToClassResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: SendToClass_ SOAP +//gsoap ns1 service method-style: SendToClass_ document +//gsoap ns1 service method-encoding: SendToClass_ literal +//gsoap ns1 service method-input-action: SendToClass_ http://tempuri.org/SendToClass +//gsoap ns1 service method-output-action: SendToClass_ http://tempuri.org/SendToClassResponse +int __ns1__SendToClass_( + _ns1__SendToClass* ns1__SendToClass, ///< Input parameter + _ns1__SendToClassResponse &ns1__SendToClassResponse ///< Output parameter +); + +/******************************************************************************\ + * * + * Service Operation * + * __ns1__DeleteClass_ * + * * +\******************************************************************************/ + + +/** Operation "__ns1__DeleteClass_" of service binding "ErpWebServiceSoap". + + + - SOAP document/literal style messaging + + - Default endpoints: + - http://192.168.1.137:8090/ErpWebService.asmx + + - Default SOAP action or REST location path: + - "http://tempuri.org/DeleteClass" + + - Addressing input action: "http://tempuri.org/DeleteClass" + + - Addressing output action: "http://tempuri.org/DeleteClassResponse" + +C stub function (defined in soapClient.c[pp] generated by soapcpp2): +@code + int soap_call___ns1__DeleteClass_( + struct soap *soap, + NULL, // char *endpoint = NULL selects default endpoint for this operation + NULL, // char *action = NULL selects default action for this operation + // input parameters: + _ns1__DeleteClass* ns1__DeleteClass, + // output parameters: + _ns1__DeleteClassResponse &ns1__DeleteClassResponse + ); +@endcode + +C server function (called from the service dispatcher defined in soapServer.c[pp]): +@code + int __ns1__DeleteClass_( + struct soap *soap, + // input parameters: + _ns1__DeleteClass* ns1__DeleteClass, + // output parameters: + _ns1__DeleteClassResponse &ns1__DeleteClassResponse + ); +@endcode + +C++ proxy class (defined in soapErpWebServiceSoapProxy.h generated with soapcpp2): +@code + class ErpWebServiceSoapProxy; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use proxy classes; + +C++ service class (defined in soapErpWebServiceSoapService.h generated with soapcpp2): +@code + class ErpWebServiceSoapService; +@endcode +Important: use soapcpp2 option '-j' (or '-i') to generate improved and easy-to-use service classes; + +*/ + +//gsoap ns1 service method-protocol: DeleteClass_ SOAP +//gsoap ns1 service method-style: DeleteClass_ document +//gsoap ns1 service method-encoding: DeleteClass_ literal +//gsoap ns1 service method-input-action: DeleteClass_ http://tempuri.org/DeleteClass +//gsoap ns1 service method-output-action: DeleteClass_ http://tempuri.org/DeleteClassResponse +int __ns1__DeleteClass_( + _ns1__DeleteClass* ns1__DeleteClass, ///< Input parameter + _ns1__DeleteClassResponse &ns1__DeleteClassResponse ///< Output parameter +); + +/** @page ErpWebServiceSoap Binding "ErpWebServiceSoap" + +@section ErpWebServiceSoap_policy_enablers Policy Enablers of Binding "ErpWebServiceSoap" + +None specified. + +*/ + +/******************************************************************************\ + * * + * XML Data Binding * + * * +\******************************************************************************/ + + +/** @page page_XMLDataBinding XML Data Binding + +SOAP/XML services use data bindings that are contractually bound by WSDLs and +are auto-generated by wsdl2h and soapcpp2 (see Service Bindings). Plain data +bindings are adopted from XML schemas as part of the WSDL types section or when +running wsdl2h on a set of schemas to produce non-SOAP-based XML data bindings. + +@note The following readers and writers are C/C++ data type (de)serializers +auto-generated by wsdl2h and soapcpp2. Run soapcpp2 on this file to generate the +(de)serialization code, which is stored in soapC.c[pp]. Include "soapH.h" in +your code to import these data type and function declarations. Only use the +soapcpp2-generated files in your project build. Do not include the wsdl2h- +generated .h file in your code. + +@note Data can be read and deserialized from: + - an int file descriptor, using soap->recvfd = fd + - a socket, using soap->socket = (int)... + - a C++ stream (istream, stringstream), using soap->is = (istream*)... + - a C string, using soap->is = (const char*)... + - any input, using the soap->frecv() callback + +@note Data can be serialized and written to: + - an int file descriptor, using soap->sendfd = (int)... + - a socket, using soap->socket = (int)... + - a C++ stream (ostream, stringstream), using soap->os = (ostream*)... + - a C string, using soap->os = (const char**)... + - any output, using the soap->fsend() callback + +@note The following options are available for (de)serialization control: + - soap->encodingStyle = NULL; to remove SOAP 1.1/1.2 encodingStyle + - soap_set_mode(soap, SOAP_XML_TREE); XML without id-ref (no cycles!) + - soap_set_mode(soap, SOAP_XML_GRAPH); XML with id-ref (including cycles) + - soap_set_namespaces(soap, struct Namespace *nsmap); to set xmlns bindings + + +*/ + +/** + +@section ns1 Top-level root elements of schema "http://tempuri.org/" + + - @ref _ns1__SetMaterialStatusS + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__SetMaterialStatusS(struct soap*, const char *URL, _ns1__SetMaterialStatusS*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__SetMaterialStatusS(struct soap*, const char *URL, _ns1__SetMaterialStatusS*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__SetMaterialStatusS(struct soap*, const char *URL, _ns1__SetMaterialStatusS*); + soap_POST_recv__ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS*); + @endcode + + - @ref _ns1__SetMaterialStatusSResponse + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__SetMaterialStatusSResponse(struct soap*, _ns1__SetMaterialStatusSResponse*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__SetMaterialStatusSResponse(struct soap*, _ns1__SetMaterialStatusSResponse*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__SetMaterialStatusSResponse(struct soap*, const char *URL, _ns1__SetMaterialStatusSResponse*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__SetMaterialStatusSResponse(struct soap*, const char *URL, _ns1__SetMaterialStatusSResponse*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__SetMaterialStatusSResponse(struct soap*, const char *URL, _ns1__SetMaterialStatusSResponse*); + soap_POST_recv__ns1__SetMaterialStatusSResponse(struct soap*, _ns1__SetMaterialStatusSResponse*); + @endcode + + - @ref _ns1__CreateProject + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__CreateProject(struct soap*, _ns1__CreateProject*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__CreateProject(struct soap*, _ns1__CreateProject*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__CreateProject(struct soap*, const char *URL, _ns1__CreateProject*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__CreateProject(struct soap*, const char *URL, _ns1__CreateProject*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__CreateProject(struct soap*, const char *URL, _ns1__CreateProject*); + soap_POST_recv__ns1__CreateProject(struct soap*, _ns1__CreateProject*); + @endcode + + - @ref _ns1__CreateProjectResponse + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__CreateProjectResponse(struct soap*, _ns1__CreateProjectResponse*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__CreateProjectResponse(struct soap*, _ns1__CreateProjectResponse*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__CreateProjectResponse(struct soap*, const char *URL, _ns1__CreateProjectResponse*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__CreateProjectResponse(struct soap*, const char *URL, _ns1__CreateProjectResponse*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__CreateProjectResponse(struct soap*, const char *URL, _ns1__CreateProjectResponse*); + soap_POST_recv__ns1__CreateProjectResponse(struct soap*, _ns1__CreateProjectResponse*); + @endcode + + - @ref _ns1__SendToClass + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__SendToClass(struct soap*, _ns1__SendToClass*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__SendToClass(struct soap*, _ns1__SendToClass*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__SendToClass(struct soap*, const char *URL, _ns1__SendToClass*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__SendToClass(struct soap*, const char *URL, _ns1__SendToClass*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__SendToClass(struct soap*, const char *URL, _ns1__SendToClass*); + soap_POST_recv__ns1__SendToClass(struct soap*, _ns1__SendToClass*); + @endcode + + - @ref _ns1__SendToClassResponse + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__SendToClassResponse(struct soap*, _ns1__SendToClassResponse*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__SendToClassResponse(struct soap*, _ns1__SendToClassResponse*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__SendToClassResponse(struct soap*, const char *URL, _ns1__SendToClassResponse*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__SendToClassResponse(struct soap*, const char *URL, _ns1__SendToClassResponse*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__SendToClassResponse(struct soap*, const char *URL, _ns1__SendToClassResponse*); + soap_POST_recv__ns1__SendToClassResponse(struct soap*, _ns1__SendToClassResponse*); + @endcode + + - @ref _ns1__DeleteClass + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__DeleteClass(struct soap*, _ns1__DeleteClass*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__DeleteClass(struct soap*, _ns1__DeleteClass*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__DeleteClass(struct soap*, const char *URL, _ns1__DeleteClass*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__DeleteClass(struct soap*, const char *URL, _ns1__DeleteClass*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__DeleteClass(struct soap*, const char *URL, _ns1__DeleteClass*); + soap_POST_recv__ns1__DeleteClass(struct soap*, _ns1__DeleteClass*); + @endcode + + - @ref _ns1__DeleteClassResponse + @code + // Reader (returns SOAP_OK on success): + soap_read__ns1__DeleteClassResponse(struct soap*, _ns1__DeleteClassResponse*); + // Writer (returns SOAP_OK on success): + soap_write__ns1__DeleteClassResponse(struct soap*, _ns1__DeleteClassResponse*); + // REST GET (returns SOAP_OK on success): + soap_GET__ns1__DeleteClassResponse(struct soap*, const char *URL, _ns1__DeleteClassResponse*); + // REST PUT (returns SOAP_OK on success): + soap_PUT__ns1__DeleteClassResponse(struct soap*, const char *URL, _ns1__DeleteClassResponse*); + // REST POST (returns SOAP_OK on success): + soap_POST_send__ns1__DeleteClassResponse(struct soap*, const char *URL, _ns1__DeleteClassResponse*); + soap_POST_recv__ns1__DeleteClassResponse(struct soap*, _ns1__DeleteClassResponse*); + @endcode + +*/ + +/* End of .\sendToClass.h */ diff --git a/jf_itk/sendTOClass/sendToClass.wsdl b/jf_itk/sendTOClass/sendToClass.wsdl new file mode 100644 index 0000000..e315576 --- /dev/null +++ b/jf_itk/sendTOClass/sendToClass.wsdl @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 单个物料更改属性,生效时间,和状态 + + + + + 创建项目/更新项目 + + + + + 发送分类 + + + + + 删除分类 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jf_itk/sendTOClass/soapC.cpp b/jf_itk/sendTOClass/soapC.cpp new file mode 100644 index 0000000..eb77e23 --- /dev/null +++ b/jf_itk/sendTOClass/soapC.cpp @@ -0,0 +1,3878 @@ +/* soapC.cpp + Generated by gSOAP 2.8.103 for .\sendToClass.h + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +#if defined(__BORLANDC__) +#pragma option push -w-8060 +#pragma option push -w-8004 +#endif + +#include "soapH.h" + +SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.103 2020-09-03 08:53:03 GMT") + + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap) +{ + soap->part = SOAP_IN_HEADER; + soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", soap->header, NULL); + soap->part = SOAP_END_HEADER; + return soap->header == NULL; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap) +{ + if (soap->version && soap->header) + { soap->part = SOAP_IN_HEADER; + if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, "")) + return soap->error; + soap->part = SOAP_END_HEADER; + } + return SOAP_OK; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap) +{ + if (soap->version && soap->header) + soap_serialize_SOAP_ENV__Header(soap, soap->header); +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap) +{ + if (soap->header == NULL) + { if ((soap->header = soap_new_SOAP_ENV__Header(soap))) + soap_default_SOAP_ENV__Header(soap, soap->header); + } +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) +{ + if (soap->fault == NULL) + { soap->fault = soap_new_SOAP_ENV__Fault(soap, -1); + if (soap->fault == NULL) + return; + } + if (soap->version == 2 && soap->fault->SOAP_ENV__Code == NULL) + soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap, -1); + if (soap->version == 2 && soap->fault->SOAP_ENV__Reason == NULL) + soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap, -1); +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap) +{ + if (soap->fault) + soap_serialize_SOAP_ENV__Fault(soap, soap->fault); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap) +{ + if (soap->fault) + return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", ""); + return SOAP_OK; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap) +{ + return (soap->fault = soap_get_SOAP_ENV__Fault(soap, NULL, "SOAP-ENV:Fault", NULL)) == NULL; +} + +SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap) +{ + soap_fault(soap); + if (soap->fault == NULL) + return NULL; + if (soap->version == 2 && soap->fault->SOAP_ENV__Code) + return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value; + return (const char**)(void*)&soap->fault->faultcode; +} + +SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap) +{ + soap_fault(soap); + if (soap->fault == NULL) + return NULL; + if (soap->version == 2 && soap->fault->SOAP_ENV__Code) + { if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL) + { soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap, -1); + if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL) + return NULL; + } + return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; + } + return (const char**)(void*)&soap->fault->faultcode; +} + +SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_subcode(struct soap *soap) +{ + const char **s = soap_faultsubcode(soap); + return s ? *s : NULL; +} + +SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap) +{ + soap_fault(soap); + if (soap->fault == NULL) + return NULL; + if (soap->version == 2 && soap->fault->SOAP_ENV__Reason) + return (const char**)(void*)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text; + return (const char**)(void*)&soap->fault->faultstring; +} + +SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_string(struct soap *soap) +{ + const char **s = soap_faultstring(soap); + return s ? *s : NULL; +} + +SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap) +{ + soap_fault(soap); + if (soap->fault == NULL) + return NULL; + if (soap->version == 2) + { if (soap->fault->SOAP_ENV__Detail == NULL) + soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap, -1); + return (const char**)(void*)&soap->fault->SOAP_ENV__Detail->__any; + } + if (soap->fault->detail == NULL) + soap->fault->detail = soap_new_SOAP_ENV__Detail(soap, -1); + return (const char**)(void*)&soap->fault->detail->__any; +} + +SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_detail(struct soap *soap) +{ + const char **s = soap_faultdetail(soap); + return s ? *s : NULL; +} + +#endif + +#ifndef WITH_NOIDREF +SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap) +{ + int t; + if (soap->version == 1) + { for (;;) + { if (!soap_getelement(soap, NULL, &t)) + if ((soap->error && soap->error != SOAP_TAG_MISMATCH) || soap_ignore_element(soap)) + break; + } + } + if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF) + soap->error = SOAP_OK; + return soap->error; +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif +SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, const char *tag, int *type) +{ (void)type; + if (soap_peek_element(soap)) + return NULL; +#ifndef WITH_NOIDREF + if (!*soap->id || !(*type = soap_lookup_type(soap, soap->id))) + *type = soap_lookup_type(soap, soap->href); + switch (*type) + { + case SOAP_TYPE_byte: + return soap_in_byte(soap, tag, NULL, "xsd:byte"); + case SOAP_TYPE_int: + return soap_in_int(soap, tag, NULL, "xsd:int"); + case SOAP_TYPE_PointerTo_ns1__DeleteClass: + return soap_in_PointerTo_ns1__DeleteClass(soap, tag, NULL, "ns1:DeleteClass"); + case SOAP_TYPE_PointerTo_ns1__SendToClass: + return soap_in_PointerTo_ns1__SendToClass(soap, tag, NULL, "ns1:SendToClass"); + case SOAP_TYPE_PointerTo_ns1__CreateProject: + return soap_in_PointerTo_ns1__CreateProject(soap, tag, NULL, "ns1:CreateProject"); + case SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS: + return soap_in_PointerTo_ns1__SetMaterialStatusS(soap, tag, NULL, "ns1:SetMaterialStatusS"); + case SOAP_TYPE_wstring: + { wchar_t **s; + s = soap_in_wstring(soap, tag, NULL, "xsd:string"); + return s ? *s : NULL; + } + case SOAP_TYPE__QName: + { char **s; + s = soap_in__QName(soap, tag, NULL, "xsd:QName"); + return s ? *s : NULL; + } + case SOAP_TYPE_string: + { char **s; + s = soap_in_string(soap, tag, NULL, "xsd:string"); + return s ? *s : NULL; + } + default: +#else + *type = 0; +#endif + { const char *t = soap->type; + if (!*t) + t = soap->tag; + if (!soap_match_tag(soap, t, "xsd:byte")) + { *type = SOAP_TYPE_byte; + return soap_in_byte(soap, tag, NULL, NULL); + } + if (!soap_match_tag(soap, t, "xsd:int")) + { *type = SOAP_TYPE_int; + return soap_in_int(soap, tag, NULL, NULL); + } + if (!soap_match_tag(soap, t, "xsd:string")) + { wchar_t **s; + *type = SOAP_TYPE_wstring; + s = soap_in_wstring(soap, tag, NULL, NULL); + return s ? *s : NULL; + } + if (!soap_match_tag(soap, t, "xsd:QName")) + { char **s; + *type = SOAP_TYPE__QName; + s = soap_in__QName(soap, tag, NULL, NULL); + return s ? *s : NULL; + } + if (!soap_match_tag(soap, t, "xsd:string")) + { char **s; + *type = SOAP_TYPE_string; + s = soap_in_string(soap, tag, NULL, NULL); + return s ? *s : NULL; + } + t = soap->tag; + if (!soap_match_tag(soap, t, "ns1:DeleteClassResponse")) + { *type = SOAP_TYPE__ns1__DeleteClassResponse; + return soap_in__ns1__DeleteClassResponse(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:DeleteClass")) + { *type = SOAP_TYPE__ns1__DeleteClass; + return soap_in__ns1__DeleteClass(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:SendToClassResponse")) + { *type = SOAP_TYPE__ns1__SendToClassResponse; + return soap_in__ns1__SendToClassResponse(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:SendToClass")) + { *type = SOAP_TYPE__ns1__SendToClass; + return soap_in__ns1__SendToClass(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:CreateProjectResponse")) + { *type = SOAP_TYPE__ns1__CreateProjectResponse; + return soap_in__ns1__CreateProjectResponse(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:CreateProject")) + { *type = SOAP_TYPE__ns1__CreateProject; + return soap_in__ns1__CreateProject(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:SetMaterialStatusSResponse")) + { *type = SOAP_TYPE__ns1__SetMaterialStatusSResponse; + return soap_in__ns1__SetMaterialStatusSResponse(soap, NULL, NULL, NULL); + } + if (!soap_match_tag(soap, t, "ns1:SetMaterialStatusS")) + { *type = SOAP_TYPE__ns1__SetMaterialStatusS; + return soap_in__ns1__SetMaterialStatusS(soap, NULL, NULL, NULL); + } +#ifndef WITH_NOIDREF + } +#endif + } + soap->error = SOAP_TAG_MISMATCH; + return NULL; +} + +#ifdef __cplusplus +} +#endif + +SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap) +{ + if (!soap_peek_element(soap)) + { int t; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input at level = %u body = %d)\n", soap->tag, soap->level, soap->body)); + if (soap->mustUnderstand && !soap->other && !soap->fignore) + return soap->error = SOAP_MUSTUNDERSTAND; + if (((soap->mode & SOAP_XML_STRICT) && !soap->fignore && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:")) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag)); + return soap->error = SOAP_TAG_MISMATCH; + } + if (!*soap->id || !soap_getelement(soap, NULL, &t)) + { soap->peeked = 0; + if (soap->fignore) + soap->error = soap->fignore(soap, soap->tag); + else + soap->error = SOAP_OK; + DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag)); + if (!soap->error && soap->body && soap_ignore(soap)) + return soap->error; + } + } + return soap->error; +} + +#ifndef WITH_NOIDREF +SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap) +{ + int i; + struct soap_plist *pp; + if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH))) + for (i = 0; i < SOAP_PTRHASH; i++) + for (pp = soap->pht[i]; pp; pp = pp->next) + if (pp->mark1 == 2 || pp->mark2 == 2) + if (soap_putelement(soap, pp->ptr, SOAP_MULTIREFTAG, pp->id, pp->type)) + return soap->error; + return SOAP_OK; +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif +SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type) +{ (void)tag; + switch (type) + { + case SOAP_TYPE_byte: + return soap_out_byte(soap, tag, id, (const char *)ptr, "xsd:byte"); + case SOAP_TYPE_int: + return soap_out_int(soap, tag, id, (const int *)ptr, "xsd:int"); + case SOAP_TYPE__ns1__DeleteClassResponse: + return ((_ns1__DeleteClassResponse *)ptr)->soap_out(soap, "ns1:DeleteClassResponse", id, ""); + case SOAP_TYPE__ns1__DeleteClass: + return ((_ns1__DeleteClass *)ptr)->soap_out(soap, "ns1:DeleteClass", id, ""); + case SOAP_TYPE__ns1__SendToClassResponse: + return ((_ns1__SendToClassResponse *)ptr)->soap_out(soap, "ns1:SendToClassResponse", id, ""); + case SOAP_TYPE__ns1__SendToClass: + return ((_ns1__SendToClass *)ptr)->soap_out(soap, "ns1:SendToClass", id, ""); + case SOAP_TYPE__ns1__CreateProjectResponse: + return ((_ns1__CreateProjectResponse *)ptr)->soap_out(soap, "ns1:CreateProjectResponse", id, ""); + case SOAP_TYPE__ns1__CreateProject: + return ((_ns1__CreateProject *)ptr)->soap_out(soap, "ns1:CreateProject", id, ""); + case SOAP_TYPE__ns1__SetMaterialStatusSResponse: + return ((_ns1__SetMaterialStatusSResponse *)ptr)->soap_out(soap, "ns1:SetMaterialStatusSResponse", id, ""); + case SOAP_TYPE__ns1__SetMaterialStatusS: + return ((_ns1__SetMaterialStatusS *)ptr)->soap_out(soap, "ns1:SetMaterialStatusS", id, ""); + case SOAP_TYPE_PointerTo_ns1__DeleteClass: + return soap_out_PointerTo_ns1__DeleteClass(soap, tag, id, (_ns1__DeleteClass *const*)ptr, "ns1:DeleteClass"); + case SOAP_TYPE_PointerTo_ns1__SendToClass: + return soap_out_PointerTo_ns1__SendToClass(soap, tag, id, (_ns1__SendToClass *const*)ptr, "ns1:SendToClass"); + case SOAP_TYPE_PointerTo_ns1__CreateProject: + return soap_out_PointerTo_ns1__CreateProject(soap, tag, id, (_ns1__CreateProject *const*)ptr, "ns1:CreateProject"); + case SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS: + return soap_out_PointerTo_ns1__SetMaterialStatusS(soap, tag, id, (_ns1__SetMaterialStatusS *const*)ptr, "ns1:SetMaterialStatusS"); + case SOAP_TYPE_wstring: + return soap_out_wstring(soap, tag, id, (wchar_t*const*)(void*)&ptr, "xsd:string"); + case SOAP_TYPE__QName: + return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:QName"); + case SOAP_TYPE_string: + return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:string"); + case 0: + return SOAP_OK; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_putelement '%s' failed for type %d in soapC.cpp\n", tag ? tag : "", type)); + return soap_element_empty(soap, tag); /* unknown type to serialize */ +} +#ifdef __cplusplus +} +#endif + +#ifndef WITH_NOIDREF + +#ifdef __cplusplus +extern "C" { +#endif +SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, int type) +{ + (void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */ + switch (type) + { + case SOAP_TYPE__ns1__DeleteClassResponse: + ((_ns1__DeleteClassResponse *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__DeleteClass: + ((_ns1__DeleteClass *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__SendToClassResponse: + ((_ns1__SendToClassResponse *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__SendToClass: + ((_ns1__SendToClass *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__CreateProjectResponse: + ((_ns1__CreateProjectResponse *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__CreateProject: + ((_ns1__CreateProject *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__SetMaterialStatusSResponse: + ((_ns1__SetMaterialStatusSResponse *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE__ns1__SetMaterialStatusS: + ((_ns1__SetMaterialStatusS *)ptr)->soap_serialize(soap); + break; + case SOAP_TYPE___ns1__DeleteClass_: + soap_serialize___ns1__DeleteClass_(soap, (const struct __ns1__DeleteClass_ *)ptr); + break; + case SOAP_TYPE___ns1__SendToClass_: + soap_serialize___ns1__SendToClass_(soap, (const struct __ns1__SendToClass_ *)ptr); + break; + case SOAP_TYPE___ns1__CreateProject_: + soap_serialize___ns1__CreateProject_(soap, (const struct __ns1__CreateProject_ *)ptr); + break; + case SOAP_TYPE___ns1__SetMaterialStatusS_: + soap_serialize___ns1__SetMaterialStatusS_(soap, (const struct __ns1__SetMaterialStatusS_ *)ptr); + break; + case SOAP_TYPE___ns1__DeleteClass: + soap_serialize___ns1__DeleteClass(soap, (const struct __ns1__DeleteClass *)ptr); + break; + case SOAP_TYPE___ns1__SendToClass: + soap_serialize___ns1__SendToClass(soap, (const struct __ns1__SendToClass *)ptr); + break; + case SOAP_TYPE___ns1__CreateProject: + soap_serialize___ns1__CreateProject(soap, (const struct __ns1__CreateProject *)ptr); + break; + case SOAP_TYPE___ns1__SetMaterialStatusS: + soap_serialize___ns1__SetMaterialStatusS(soap, (const struct __ns1__SetMaterialStatusS *)ptr); + break; + case SOAP_TYPE_PointerTo_ns1__DeleteClass: + soap_serialize_PointerTo_ns1__DeleteClass(soap, (_ns1__DeleteClass *const*)ptr); + break; + case SOAP_TYPE_PointerTo_ns1__SendToClass: + soap_serialize_PointerTo_ns1__SendToClass(soap, (_ns1__SendToClass *const*)ptr); + break; + case SOAP_TYPE_PointerTo_ns1__CreateProject: + soap_serialize_PointerTo_ns1__CreateProject(soap, (_ns1__CreateProject *const*)ptr); + break; + case SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS: + soap_serialize_PointerTo_ns1__SetMaterialStatusS(soap, (_ns1__SetMaterialStatusS *const*)ptr); + break; + case SOAP_TYPE_wstring: + soap_serialize_wstring(soap, (wchar_t*const*)(void*)&ptr); + break; + case SOAP_TYPE__QName: + soap_serialize_string(soap, (char*const*)(void*)&ptr); + break; + case SOAP_TYPE_string: + soap_serialize_string(soap, (char*const*)(void*)&ptr); + break; + } +} +#ifdef __cplusplus +} +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +SOAP_FMAC3 void * SOAP_FMAC4 soap_dupelement(struct soap *soap, const void *ptr, int type) +{(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */ + return NULL; +} +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void *ptr, int type) +{(void)ptr; (void)type; /* appease -Wall -Werror */ +} +#ifdef __cplusplus +} +#endif + +SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap *soap, int t, const char *type, const char *arrayType, size_t *n) +{ (void)type; + switch (t) + { + case SOAP_TYPE__ns1__SetMaterialStatusS: + return (void*)soap_instantiate__ns1__SetMaterialStatusS(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__SetMaterialStatusSResponse: + return (void*)soap_instantiate__ns1__SetMaterialStatusSResponse(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__CreateProject: + return (void*)soap_instantiate__ns1__CreateProject(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__CreateProjectResponse: + return (void*)soap_instantiate__ns1__CreateProjectResponse(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__SendToClass: + return (void*)soap_instantiate__ns1__SendToClass(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__SendToClassResponse: + return (void*)soap_instantiate__ns1__SendToClassResponse(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__DeleteClass: + return (void*)soap_instantiate__ns1__DeleteClass(soap, -1, type, arrayType, n); + case SOAP_TYPE__ns1__DeleteClassResponse: + return (void*)soap_instantiate__ns1__DeleteClassResponse(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__SetMaterialStatusS: + return (void*)soap_instantiate___ns1__SetMaterialStatusS(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__CreateProject: + return (void*)soap_instantiate___ns1__CreateProject(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__SendToClass: + return (void*)soap_instantiate___ns1__SendToClass(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__DeleteClass: + return (void*)soap_instantiate___ns1__DeleteClass(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__SetMaterialStatusS_: + return (void*)soap_instantiate___ns1__SetMaterialStatusS_(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__CreateProject_: + return (void*)soap_instantiate___ns1__CreateProject_(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__SendToClass_: + return (void*)soap_instantiate___ns1__SendToClass_(soap, -1, type, arrayType, n); + case SOAP_TYPE___ns1__DeleteClass_: + return (void*)soap_instantiate___ns1__DeleteClass_(soap, -1, type, arrayType, n); +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Header: + return (void*)soap_instantiate_SOAP_ENV__Header(soap, -1, type, arrayType, n); +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Code: + return (void*)soap_instantiate_SOAP_ENV__Code(soap, -1, type, arrayType, n); +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Detail: + return (void*)soap_instantiate_SOAP_ENV__Detail(soap, -1, type, arrayType, n); +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Reason: + return (void*)soap_instantiate_SOAP_ENV__Reason(soap, -1, type, arrayType, n); +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Fault: + return (void*)soap_instantiate_SOAP_ENV__Fault(soap, -1, type, arrayType, n); +#endif + } + return NULL; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap *soap, struct soap_clist *p) +{ + (void)soap; /* appease -Wall -Werror */ + if (!p->ptr) + return SOAP_OK; + switch (p->type) + { + case SOAP_TYPE__ns1__SetMaterialStatusS: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__SetMaterialStatusS*>(p->ptr), _ns1__SetMaterialStatusS); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__SetMaterialStatusS*>(p->ptr), _ns1__SetMaterialStatusS); + break; + case SOAP_TYPE__ns1__SetMaterialStatusSResponse: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__SetMaterialStatusSResponse*>(p->ptr), _ns1__SetMaterialStatusSResponse); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__SetMaterialStatusSResponse*>(p->ptr), _ns1__SetMaterialStatusSResponse); + break; + case SOAP_TYPE__ns1__CreateProject: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__CreateProject*>(p->ptr), _ns1__CreateProject); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__CreateProject*>(p->ptr), _ns1__CreateProject); + break; + case SOAP_TYPE__ns1__CreateProjectResponse: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__CreateProjectResponse*>(p->ptr), _ns1__CreateProjectResponse); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__CreateProjectResponse*>(p->ptr), _ns1__CreateProjectResponse); + break; + case SOAP_TYPE__ns1__SendToClass: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__SendToClass*>(p->ptr), _ns1__SendToClass); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__SendToClass*>(p->ptr), _ns1__SendToClass); + break; + case SOAP_TYPE__ns1__SendToClassResponse: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__SendToClassResponse*>(p->ptr), _ns1__SendToClassResponse); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__SendToClassResponse*>(p->ptr), _ns1__SendToClassResponse); + break; + case SOAP_TYPE__ns1__DeleteClass: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__DeleteClass*>(p->ptr), _ns1__DeleteClass); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__DeleteClass*>(p->ptr), _ns1__DeleteClass); + break; + case SOAP_TYPE__ns1__DeleteClassResponse: + if (p->size < 0) + SOAP_DELETE(soap, static_cast<_ns1__DeleteClassResponse*>(p->ptr), _ns1__DeleteClassResponse); + else + SOAP_DELETE_ARRAY(soap, static_cast<_ns1__DeleteClassResponse*>(p->ptr), _ns1__DeleteClassResponse); + break; + case SOAP_TYPE___ns1__SetMaterialStatusS: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__SetMaterialStatusS); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__SetMaterialStatusS); + break; + case SOAP_TYPE___ns1__CreateProject: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__CreateProject); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__CreateProject); + break; + case SOAP_TYPE___ns1__SendToClass: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__SendToClass); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__SendToClass); + break; + case SOAP_TYPE___ns1__DeleteClass: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__DeleteClass); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__DeleteClass); + break; + case SOAP_TYPE___ns1__SetMaterialStatusS_: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__SetMaterialStatusS_); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__SetMaterialStatusS_); + break; + case SOAP_TYPE___ns1__CreateProject_: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__CreateProject_); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__CreateProject_); + break; + case SOAP_TYPE___ns1__SendToClass_: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__SendToClass_); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__SendToClass_); + break; + case SOAP_TYPE___ns1__DeleteClass_: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct __ns1__DeleteClass_); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct __ns1__DeleteClass_); + break; +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Header: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct SOAP_ENV__Header); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct SOAP_ENV__Header); + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Code: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct SOAP_ENV__Code); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct SOAP_ENV__Code); + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Detail: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct SOAP_ENV__Detail); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct SOAP_ENV__Detail); + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Reason: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct SOAP_ENV__Reason); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct SOAP_ENV__Reason); + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Fault: + if (p->size < 0) + SOAP_DELETE(soap, static_cast(p->ptr), struct SOAP_ENV__Fault); + else + SOAP_DELETE_ARRAY(soap, static_cast(p->ptr), struct SOAP_ENV__Fault); + break; +#endif + default: + return SOAP_ERR; + } + return SOAP_OK; +} + +#ifdef WIN32 +#pragma warning(push) +// do not warn on switch w/o cases +#pragma warning(disable:4065) +#endif +SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int t, int b) +{ + (void)t; (void)b; /* appease -Wall -Werror */ + return 0; +} +#ifdef WIN32 +#pragma warning(pop) +#endif + +#ifndef WITH_NOIDREF +#ifdef WIN32 +#pragma warning(push) +// do not warn on switch w/o cases +#pragma warning(disable:4065) +#endif +SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap *soap, int t, int tt, void *p, size_t index, const void *q, void **x) +{ + (void)soap; (void)t; (void)p; (void)index; (void)q; (void)x; /* appease -Wall -Werror */ + switch (tt) + { + case SOAP_TYPE__ns1__SetMaterialStatusS: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__SetMaterialStatusS type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__SetMaterialStatusS*)p = *(_ns1__SetMaterialStatusS*)q; + break; + case SOAP_TYPE__ns1__SetMaterialStatusSResponse: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__SetMaterialStatusSResponse type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__SetMaterialStatusSResponse*)p = *(_ns1__SetMaterialStatusSResponse*)q; + break; + case SOAP_TYPE__ns1__CreateProject: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__CreateProject type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__CreateProject*)p = *(_ns1__CreateProject*)q; + break; + case SOAP_TYPE__ns1__CreateProjectResponse: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__CreateProjectResponse type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__CreateProjectResponse*)p = *(_ns1__CreateProjectResponse*)q; + break; + case SOAP_TYPE__ns1__SendToClass: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__SendToClass type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__SendToClass*)p = *(_ns1__SendToClass*)q; + break; + case SOAP_TYPE__ns1__SendToClassResponse: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__SendToClassResponse type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__SendToClassResponse*)p = *(_ns1__SendToClassResponse*)q; + break; + case SOAP_TYPE__ns1__DeleteClass: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__DeleteClass type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__DeleteClass*)p = *(_ns1__DeleteClass*)q; + break; + case SOAP_TYPE__ns1__DeleteClassResponse: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy _ns1__DeleteClassResponse type=%d location=%p object=%p\n", t, p, q)); + *(_ns1__DeleteClassResponse*)p = *(_ns1__DeleteClassResponse*)q; + break; + case SOAP_TYPE___ns1__SetMaterialStatusS: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__SetMaterialStatusS type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__SetMaterialStatusS*)p = *(struct __ns1__SetMaterialStatusS*)q; + break; + case SOAP_TYPE___ns1__CreateProject: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__CreateProject type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__CreateProject*)p = *(struct __ns1__CreateProject*)q; + break; + case SOAP_TYPE___ns1__SendToClass: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__SendToClass type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__SendToClass*)p = *(struct __ns1__SendToClass*)q; + break; + case SOAP_TYPE___ns1__DeleteClass: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__DeleteClass type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__DeleteClass*)p = *(struct __ns1__DeleteClass*)q; + break; + case SOAP_TYPE___ns1__SetMaterialStatusS_: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__SetMaterialStatusS_ type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__SetMaterialStatusS_*)p = *(struct __ns1__SetMaterialStatusS_*)q; + break; + case SOAP_TYPE___ns1__CreateProject_: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__CreateProject_ type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__CreateProject_*)p = *(struct __ns1__CreateProject_*)q; + break; + case SOAP_TYPE___ns1__SendToClass_: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__SendToClass_ type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__SendToClass_*)p = *(struct __ns1__SendToClass_*)q; + break; + case SOAP_TYPE___ns1__DeleteClass_: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct __ns1__DeleteClass_ type=%d location=%p object=%p\n", t, p, q)); + *(struct __ns1__DeleteClass_*)p = *(struct __ns1__DeleteClass_*)q; + break; +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Header: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Header type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Header*)p = *(struct SOAP_ENV__Header*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Code: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Code type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Code*)p = *(struct SOAP_ENV__Code*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Detail: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Detail type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Detail*)p = *(struct SOAP_ENV__Detail*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Reason: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Reason type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Reason*)p = *(struct SOAP_ENV__Reason*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Fault: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Fault type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Fault*)p = *(struct SOAP_ENV__Fault*)q; + break; +#endif + default: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not insert type=%d in %d\n", t, tt)); + } +} +#ifdef WIN32 +#pragma warning(pop) +#endif +#endif + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type) +{ + return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte); +} + +SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap *soap, const char *tag, char *a, const char *type) +{ + a = soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte); + return a; +} + +SOAP_FMAC3 char * SOAP_FMAC4 soap_new_byte(struct soap *soap, int n) +{ + char *a = static_cast(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(char))); + for (char *p = a; p && n--; ++p) + soap_default_byte(soap, p); + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap *soap, const char *a, const char *tag, const char *type) +{ + if (soap_out_byte(soap, tag ? tag : "byte", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap *soap, char *p, const char *tag, const char *type) +{ + if ((p = soap_in_byte(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type) +{ + return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int); +} + +SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap *soap, const char *tag, int *a, const char *type) +{ + a = soap_inint(soap, tag, a, type, SOAP_TYPE_int); + return a; +} + +SOAP_FMAC3 int * SOAP_FMAC4 soap_new_int(struct soap *soap, int n) +{ + int *a = static_cast(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(int))); + for (int *p = a; p && n--; ++p) + soap_default_int(soap, p); + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap *soap, const int *a, const char *tag, const char *type) +{ + if (soap_out_int(soap, tag ? tag : "int", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap *soap, int *p, const char *tag, const char *type) +{ + if ((p = soap_in_int(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__DeleteClassResponse::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__DeleteClassResponse::DeleteClassResult = NULL; +} + +void _ns1__DeleteClassResponse::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__DeleteClassResponse::DeleteClassResult); +#endif +} + +int _ns1__DeleteClassResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__DeleteClassResponse(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__DeleteClassResponse(struct soap *soap, const char *tag, int id, const _ns1__DeleteClassResponse *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__DeleteClassResponse), type)) + return soap->error; + if (a->DeleteClassResult) + soap_element_result(soap, "ns1:DeleteClassResult"); + if (soap_out_wstring(soap, "ns1:DeleteClassResult", -1, (wchar_t*const*)&a->_ns1__DeleteClassResponse::DeleteClassResult, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__DeleteClassResponse::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__DeleteClassResponse(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__DeleteClassResponse * SOAP_FMAC4 soap_in__ns1__DeleteClassResponse(struct soap *soap, const char *tag, _ns1__DeleteClassResponse *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__DeleteClassResponse*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__DeleteClassResponse, sizeof(_ns1__DeleteClassResponse), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__DeleteClassResponse) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__DeleteClassResponse *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_DeleteClassResult1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_DeleteClassResult1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:DeleteClassResult", (wchar_t**)&a->_ns1__DeleteClassResponse::DeleteClassResult, "xsd:string")) + { soap_flag_DeleteClassResult1--; + continue; + } + } + soap_check_result(soap, "ns1:DeleteClassResult"); + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__DeleteClassResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__DeleteClassResponse, SOAP_TYPE__ns1__DeleteClassResponse, sizeof(_ns1__DeleteClassResponse), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__DeleteClassResponse * SOAP_FMAC2 soap_instantiate__ns1__DeleteClassResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__DeleteClassResponse(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__DeleteClassResponse *p; + size_t k = sizeof(_ns1__DeleteClassResponse); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__DeleteClassResponse, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__DeleteClassResponse); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__DeleteClassResponse, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__DeleteClassResponse location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__DeleteClassResponse::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__DeleteClassResponse(soap, tag ? tag : "ns1:DeleteClassResponse", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__DeleteClassResponse::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__DeleteClassResponse(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__DeleteClassResponse * SOAP_FMAC4 soap_get__ns1__DeleteClassResponse(struct soap *soap, _ns1__DeleteClassResponse *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__DeleteClassResponse(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__DeleteClass::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__DeleteClass::icoPuid = NULL; +} + +void _ns1__DeleteClass::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__DeleteClass::icoPuid); +#endif +} + +int _ns1__DeleteClass::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__DeleteClass(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__DeleteClass(struct soap *soap, const char *tag, int id, const _ns1__DeleteClass *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__DeleteClass), type)) + return soap->error; + if (soap_out_wstring(soap, "ns1:icoPuid", -1, (wchar_t*const*)&a->_ns1__DeleteClass::icoPuid, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__DeleteClass::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__DeleteClass(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__DeleteClass * SOAP_FMAC4 soap_in__ns1__DeleteClass(struct soap *soap, const char *tag, _ns1__DeleteClass *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__DeleteClass*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__DeleteClass, sizeof(_ns1__DeleteClass), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__DeleteClass) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__DeleteClass *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_icoPuid1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_icoPuid1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:icoPuid", (wchar_t**)&a->_ns1__DeleteClass::icoPuid, "xsd:string")) + { soap_flag_icoPuid1--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__DeleteClass *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__DeleteClass, SOAP_TYPE__ns1__DeleteClass, sizeof(_ns1__DeleteClass), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__DeleteClass * SOAP_FMAC2 soap_instantiate__ns1__DeleteClass(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__DeleteClass(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__DeleteClass *p; + size_t k = sizeof(_ns1__DeleteClass); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__DeleteClass, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__DeleteClass); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__DeleteClass, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__DeleteClass location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__DeleteClass::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__DeleteClass(soap, tag ? tag : "ns1:DeleteClass", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__DeleteClass::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__DeleteClass(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__DeleteClass * SOAP_FMAC4 soap_get__ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__DeleteClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__SendToClassResponse::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__SendToClassResponse::SendToClassResult = NULL; +} + +void _ns1__SendToClassResponse::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SendToClassResponse::SendToClassResult); +#endif +} + +int _ns1__SendToClassResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__SendToClassResponse(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SendToClassResponse(struct soap *soap, const char *tag, int id, const _ns1__SendToClassResponse *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__SendToClassResponse), type)) + return soap->error; + if (a->SendToClassResult) + soap_element_result(soap, "ns1:SendToClassResult"); + if (soap_out_wstring(soap, "ns1:SendToClassResult", -1, (wchar_t*const*)&a->_ns1__SendToClassResponse::SendToClassResult, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__SendToClassResponse::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__SendToClassResponse(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__SendToClassResponse * SOAP_FMAC4 soap_in__ns1__SendToClassResponse(struct soap *soap, const char *tag, _ns1__SendToClassResponse *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__SendToClassResponse*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__SendToClassResponse, sizeof(_ns1__SendToClassResponse), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__SendToClassResponse) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__SendToClassResponse *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_SendToClassResult1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_SendToClassResult1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:SendToClassResult", (wchar_t**)&a->_ns1__SendToClassResponse::SendToClassResult, "xsd:string")) + { soap_flag_SendToClassResult1--; + continue; + } + } + soap_check_result(soap, "ns1:SendToClassResult"); + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__SendToClassResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__SendToClassResponse, SOAP_TYPE__ns1__SendToClassResponse, sizeof(_ns1__SendToClassResponse), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__SendToClassResponse * SOAP_FMAC2 soap_instantiate__ns1__SendToClassResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__SendToClassResponse(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__SendToClassResponse *p; + size_t k = sizeof(_ns1__SendToClassResponse); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__SendToClassResponse, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__SendToClassResponse); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__SendToClassResponse, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__SendToClassResponse location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__SendToClassResponse::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__SendToClassResponse(soap, tag ? tag : "ns1:SendToClassResponse", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__SendToClassResponse::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__SendToClassResponse(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__SendToClassResponse * SOAP_FMAC4 soap_get__ns1__SendToClassResponse(struct soap *soap, _ns1__SendToClassResponse *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__SendToClassResponse(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__SendToClass::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__SendToClass::wsoPuiid = NULL; + this->_ns1__SendToClass::classID = NULL; + this->_ns1__SendToClass::JsonContainer = NULL; +} + +void _ns1__SendToClass::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SendToClass::wsoPuiid); + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SendToClass::classID); + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SendToClass::JsonContainer); +#endif +} + +int _ns1__SendToClass::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__SendToClass(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SendToClass(struct soap *soap, const char *tag, int id, const _ns1__SendToClass *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__SendToClass), type)) + return soap->error; + if (soap_out_wstring(soap, "ns1:wsoPuiid", -1, (wchar_t*const*)&a->_ns1__SendToClass::wsoPuiid, "")) + return soap->error; + if (soap_out_wstring(soap, "ns1:classID", -1, (wchar_t*const*)&a->_ns1__SendToClass::classID, "")) + return soap->error; + if (soap_out_wstring(soap, "ns1:JsonContainer", -1, (wchar_t*const*)&a->_ns1__SendToClass::JsonContainer, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__SendToClass::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__SendToClass(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__SendToClass * SOAP_FMAC4 soap_in__ns1__SendToClass(struct soap *soap, const char *tag, _ns1__SendToClass *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__SendToClass*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__SendToClass, sizeof(_ns1__SendToClass), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__SendToClass) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__SendToClass *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_wsoPuiid1 = 1; + size_t soap_flag_classID1 = 1; + size_t soap_flag_JsonContainer1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_wsoPuiid1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:wsoPuiid", (wchar_t**)&a->_ns1__SendToClass::wsoPuiid, "xsd:string")) + { soap_flag_wsoPuiid1--; + continue; + } + } + if (soap_flag_classID1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:classID", (wchar_t**)&a->_ns1__SendToClass::classID, "xsd:string")) + { soap_flag_classID1--; + continue; + } + } + if (soap_flag_JsonContainer1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:JsonContainer", (wchar_t**)&a->_ns1__SendToClass::JsonContainer, "xsd:string")) + { soap_flag_JsonContainer1--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__SendToClass *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__SendToClass, SOAP_TYPE__ns1__SendToClass, sizeof(_ns1__SendToClass), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__SendToClass * SOAP_FMAC2 soap_instantiate__ns1__SendToClass(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__SendToClass(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__SendToClass *p; + size_t k = sizeof(_ns1__SendToClass); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__SendToClass, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__SendToClass); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__SendToClass, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__SendToClass location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__SendToClass::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__SendToClass(soap, tag ? tag : "ns1:SendToClass", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__SendToClass::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__SendToClass(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__SendToClass * SOAP_FMAC4 soap_get__ns1__SendToClass(struct soap *soap, _ns1__SendToClass *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__SendToClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__CreateProjectResponse::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__CreateProjectResponse::CreateProjectResult = NULL; +} + +void _ns1__CreateProjectResponse::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__CreateProjectResponse::CreateProjectResult); +#endif +} + +int _ns1__CreateProjectResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__CreateProjectResponse(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__CreateProjectResponse(struct soap *soap, const char *tag, int id, const _ns1__CreateProjectResponse *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__CreateProjectResponse), type)) + return soap->error; + if (a->CreateProjectResult) + soap_element_result(soap, "ns1:CreateProjectResult"); + if (soap_out_wstring(soap, "ns1:CreateProjectResult", -1, (wchar_t*const*)&a->_ns1__CreateProjectResponse::CreateProjectResult, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__CreateProjectResponse::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__CreateProjectResponse(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__CreateProjectResponse * SOAP_FMAC4 soap_in__ns1__CreateProjectResponse(struct soap *soap, const char *tag, _ns1__CreateProjectResponse *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__CreateProjectResponse*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__CreateProjectResponse, sizeof(_ns1__CreateProjectResponse), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__CreateProjectResponse) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__CreateProjectResponse *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_CreateProjectResult1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_CreateProjectResult1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:CreateProjectResult", (wchar_t**)&a->_ns1__CreateProjectResponse::CreateProjectResult, "xsd:string")) + { soap_flag_CreateProjectResult1--; + continue; + } + } + soap_check_result(soap, "ns1:CreateProjectResult"); + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__CreateProjectResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__CreateProjectResponse, SOAP_TYPE__ns1__CreateProjectResponse, sizeof(_ns1__CreateProjectResponse), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__CreateProjectResponse * SOAP_FMAC2 soap_instantiate__ns1__CreateProjectResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__CreateProjectResponse(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__CreateProjectResponse *p; + size_t k = sizeof(_ns1__CreateProjectResponse); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__CreateProjectResponse, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__CreateProjectResponse); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__CreateProjectResponse, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__CreateProjectResponse location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__CreateProjectResponse::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__CreateProjectResponse(soap, tag ? tag : "ns1:CreateProjectResponse", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__CreateProjectResponse::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__CreateProjectResponse(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__CreateProjectResponse * SOAP_FMAC4 soap_get__ns1__CreateProjectResponse(struct soap *soap, _ns1__CreateProjectResponse *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__CreateProjectResponse(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__CreateProject::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__CreateProject::projJsonString = NULL; +} + +void _ns1__CreateProject::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__CreateProject::projJsonString); +#endif +} + +int _ns1__CreateProject::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__CreateProject(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__CreateProject(struct soap *soap, const char *tag, int id, const _ns1__CreateProject *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__CreateProject), type)) + return soap->error; + if (soap_out_wstring(soap, "ns1:projJsonString", -1, (wchar_t*const*)&a->_ns1__CreateProject::projJsonString, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__CreateProject::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__CreateProject(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__CreateProject * SOAP_FMAC4 soap_in__ns1__CreateProject(struct soap *soap, const char *tag, _ns1__CreateProject *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__CreateProject*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__CreateProject, sizeof(_ns1__CreateProject), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__CreateProject) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__CreateProject *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_projJsonString1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_projJsonString1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:projJsonString", (wchar_t**)&a->_ns1__CreateProject::projJsonString, "xsd:string")) + { soap_flag_projJsonString1--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__CreateProject *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__CreateProject, SOAP_TYPE__ns1__CreateProject, sizeof(_ns1__CreateProject), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__CreateProject * SOAP_FMAC2 soap_instantiate__ns1__CreateProject(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__CreateProject(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__CreateProject *p; + size_t k = sizeof(_ns1__CreateProject); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__CreateProject, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__CreateProject); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__CreateProject, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__CreateProject location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__CreateProject::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__CreateProject(soap, tag ? tag : "ns1:CreateProject", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__CreateProject::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__CreateProject(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__CreateProject * SOAP_FMAC4 soap_get__ns1__CreateProject(struct soap *soap, _ns1__CreateProject *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__CreateProject(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__SetMaterialStatusSResponse::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__SetMaterialStatusSResponse::SetMaterialStatusSResult = NULL; +} + +void _ns1__SetMaterialStatusSResponse::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SetMaterialStatusSResponse::SetMaterialStatusSResult); +#endif +} + +int _ns1__SetMaterialStatusSResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__SetMaterialStatusSResponse(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *tag, int id, const _ns1__SetMaterialStatusSResponse *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__SetMaterialStatusSResponse), type)) + return soap->error; + if (a->SetMaterialStatusSResult) + soap_element_result(soap, "ns1:SetMaterialStatusSResult"); + if (soap_out_wstring(soap, "ns1:SetMaterialStatusSResult", -1, (wchar_t*const*)&a->_ns1__SetMaterialStatusSResponse::SetMaterialStatusSResult, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__SetMaterialStatusSResponse::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__SetMaterialStatusSResponse(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusSResponse * SOAP_FMAC4 soap_in__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *tag, _ns1__SetMaterialStatusSResponse *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__SetMaterialStatusSResponse*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__SetMaterialStatusSResponse, sizeof(_ns1__SetMaterialStatusSResponse), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__SetMaterialStatusSResponse) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__SetMaterialStatusSResponse *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_SetMaterialStatusSResult1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_SetMaterialStatusSResult1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:SetMaterialStatusSResult", (wchar_t**)&a->_ns1__SetMaterialStatusSResponse::SetMaterialStatusSResult, "xsd:string")) + { soap_flag_SetMaterialStatusSResult1--; + continue; + } + } + soap_check_result(soap, "ns1:SetMaterialStatusSResult"); + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__SetMaterialStatusSResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__SetMaterialStatusSResponse, SOAP_TYPE__ns1__SetMaterialStatusSResponse, sizeof(_ns1__SetMaterialStatusSResponse), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__SetMaterialStatusSResponse * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusSResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__SetMaterialStatusSResponse(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__SetMaterialStatusSResponse *p; + size_t k = sizeof(_ns1__SetMaterialStatusSResponse); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__SetMaterialStatusSResponse, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__SetMaterialStatusSResponse); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__SetMaterialStatusSResponse, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__SetMaterialStatusSResponse location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__SetMaterialStatusSResponse::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__SetMaterialStatusSResponse(soap, tag ? tag : "ns1:SetMaterialStatusSResponse", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__SetMaterialStatusSResponse::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__SetMaterialStatusSResponse(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusSResponse * SOAP_FMAC4 soap_get__ns1__SetMaterialStatusSResponse(struct soap *soap, _ns1__SetMaterialStatusSResponse *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__SetMaterialStatusSResponse(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +void _ns1__SetMaterialStatusS::soap_default(struct soap *soap) +{ + this->soap = soap; + this->_ns1__SetMaterialStatusS::fileName = NULL; +} + +void _ns1__SetMaterialStatusS::soap_serialize(struct soap *soap) const +{ + (void)soap; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_wstring(soap, (wchar_t*const*)&this->_ns1__SetMaterialStatusS::fileName); +#endif +} + +int _ns1__SetMaterialStatusS::soap_out(struct soap *soap, const char *tag, int id, const char *type) const +{ + return soap_out__ns1__SetMaterialStatusS(soap, tag, id, this, type); +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SetMaterialStatusS(struct soap *soap, const char *tag, int id, const _ns1__SetMaterialStatusS *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__SetMaterialStatusS), type)) + return soap->error; + if (soap_out_wstring(soap, "ns1:fileName", -1, (wchar_t*const*)&a->_ns1__SetMaterialStatusS::fileName, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +void *_ns1__SetMaterialStatusS::soap_in(struct soap *soap, const char *tag, const char *type) +{ + return soap_in__ns1__SetMaterialStatusS(soap, tag, this, type); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusS * SOAP_FMAC4 soap_in__ns1__SetMaterialStatusS(struct soap *soap, const char *tag, _ns1__SetMaterialStatusS *a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + a = (_ns1__SetMaterialStatusS*)soap_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__SetMaterialStatusS, sizeof(_ns1__SetMaterialStatusS), soap->type, soap->arrayType, soap_instantiate, soap_fbase); + if (!a) + return NULL; + if (soap->alloced && soap->alloced != SOAP_TYPE__ns1__SetMaterialStatusS) + { soap_revert(soap); + *soap->id = '\0'; + return (_ns1__SetMaterialStatusS *)a->soap_in(soap, tag, type); + } + if (soap->alloced) + a->soap_default(soap); + size_t soap_flag_fileName1 = 1; + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_fileName1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_wstring(soap, "ns1:fileName", (wchar_t**)&a->_ns1__SetMaterialStatusS::fileName, "xsd:string")) + { soap_flag_fileName1--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (_ns1__SetMaterialStatusS *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__SetMaterialStatusS, SOAP_TYPE__ns1__SetMaterialStatusS, sizeof(_ns1__SetMaterialStatusS), 0, soap_finsert, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 _ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusS(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__SetMaterialStatusS(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + _ns1__SetMaterialStatusS *p; + size_t k = sizeof(_ns1__SetMaterialStatusS); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE__ns1__SetMaterialStatusS, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, _ns1__SetMaterialStatusS); + if (p) + p->soap = soap; + } + else + { p = SOAP_NEW_ARRAY(soap, _ns1__SetMaterialStatusS, n); + k *= n; + if (p) + for (int i = 0; i < n; i++) + p[i].soap = soap; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated _ns1__SetMaterialStatusS location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +int _ns1__SetMaterialStatusS::soap_put(struct soap *soap, const char *tag, const char *type) const +{ + if (soap_out__ns1__SetMaterialStatusS(soap, tag ? tag : "ns1:SetMaterialStatusS", -2, this, type)) + return soap->error; + return soap_putindependent(soap); +} + +void *_ns1__SetMaterialStatusS::soap_get(struct soap *soap, const char *tag, const char *type) +{ + return soap_get__ns1__SetMaterialStatusS(soap, this, tag, type); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusS * SOAP_FMAC4 soap_get__ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS *p, const char *tag, const char *type) +{ + if ((p = soap_in__ns1__SetMaterialStatusS(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + soap_default__QName(soap, &a->faultcode); + soap_default_string(soap, &a->faultstring); + soap_default_string(soap, &a->faultactor); + a->detail = NULL; + a->SOAP_ENV__Code = NULL; + a->SOAP_ENV__Reason = NULL; + soap_default_string(soap, &a->SOAP_ENV__Node); + soap_default_string(soap, &a->SOAP_ENV__Role); + a->SOAP_ENV__Detail = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize__QName(soap, (char*const*)&a->faultcode); + soap_serialize_string(soap, (char*const*)&a->faultstring); + soap_serialize_string(soap, (char*const*)&a->faultactor); + soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->detail); + soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code); + soap_serialize_PointerToSOAP_ENV__Reason(soap, &a->SOAP_ENV__Reason); + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Node); + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Role); + soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->SOAP_ENV__Detail); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type) +{ + const char *soap_tmp_faultcode; + soap_tmp_faultcode = soap_QName2s(soap, a->faultcode); + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type)) + return soap->error; + if (soap_out__QName(soap, "faultcode", -1, (char*const*)(void*)&soap_tmp_faultcode, "")) + return soap->error; + if (soap_out_string(soap, "faultstring", -1, (char*const*)&a->faultstring, "")) + return soap->error; + if (soap_out_string(soap, "faultactor", -1, (char*const*)&a->faultactor, "")) + return soap->error; + if (soap_out_PointerToSOAP_ENV__Detail(soap, "detail", -1, &a->detail, "")) + return soap->error; + if (soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", -1, &a->SOAP_ENV__Code, "")) + return soap->error; + if (soap_out_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", -1, &a->SOAP_ENV__Reason, "")) + return soap->error; + if (soap_out_string(soap, "SOAP-ENV:Node", -1, (char*const*)&a->SOAP_ENV__Node, "")) + return soap->error; + if (soap_out_string(soap, "SOAP-ENV:Role", -1, (char*const*)&a->SOAP_ENV__Role, "")) + return soap->error; + if (soap_out_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", -1, &a->SOAP_ENV__Detail, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap *soap, const char *tag, struct SOAP_ENV__Fault *a, const char *type) +{ + size_t soap_flag_faultcode = 1; + size_t soap_flag_faultstring = 1; + size_t soap_flag_faultactor = 1; + size_t soap_flag_detail = 1; + size_t soap_flag_SOAP_ENV__Code = 1; + size_t soap_flag_SOAP_ENV__Reason = 1; + size_t soap_flag_SOAP_ENV__Node = 1; + size_t soap_flag_SOAP_ENV__Role = 1; + size_t soap_flag_SOAP_ENV__Detail = 1; + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + (void)type; /* appease -Wall -Werror */ + a = (struct SOAP_ENV__Fault*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default_SOAP_ENV__Fault(soap, a); + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in__QName(soap, "faultcode", (char**)&a->faultcode, "xsd:QName")) + { soap_flag_faultcode--; + continue; + } + } + if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_string(soap, "faultstring", (char**)&a->faultstring, "xsd:string")) + { soap_flag_faultstring--; + continue; + } + } + if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_string(soap, "faultactor", (char**)&a->faultactor, "xsd:string")) + { soap_flag_faultactor--; + continue; + } + } + if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, "")) + { soap_flag_detail--; + continue; + } + } + if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, "")) + { soap_flag_SOAP_ENV__Code--; + continue; + } + } + if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, "")) + { soap_flag_SOAP_ENV__Reason--; + continue; + } + } + if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_string(soap, "SOAP-ENV:Node", (char**)&a->SOAP_ENV__Node, "xsd:string")) + { soap_flag_SOAP_ENV__Node--; + continue; + } + } + if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_string(soap, "SOAP-ENV:Role", (char**)&a->SOAP_ENV__Role, "xsd:string")) + { soap_flag_SOAP_ENV__Role--; + continue; + } + } + if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, "")) + { soap_flag_SOAP_ENV__Detail--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Fault, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0, soap_finsert, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Fault *p; + size_t k = sizeof(struct SOAP_ENV__Fault); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct SOAP_ENV__Fault); + } + else + { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Fault, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Fault location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type) +{ + if (soap_out_SOAP_ENV__Fault(soap, tag ? tag : "SOAP-ENV:Fault", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p, const char *tag, const char *type) +{ + if ((p = soap_in_SOAP_ENV__Fault(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + soap_default_string(soap, &a->SOAP_ENV__Text); +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Text); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Reason *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Reason), type)) + return soap->error; + if (soap->lang) + soap_set_attr(soap, "xml:lang", soap->lang, 1); + if (soap_out_string(soap, "SOAP-ENV:Text", -1, (char*const*)&a->SOAP_ENV__Text, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason *a, const char *type) +{ + size_t soap_flag_SOAP_ENV__Text = 1; + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + (void)type; /* appease -Wall -Werror */ + a = (struct SOAP_ENV__Reason*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default_SOAP_ENV__Reason(soap, a); + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in_string(soap, "SOAP-ENV:Text", (char**)&a->SOAP_ENV__Text, "xsd:string")) + { soap_flag_SOAP_ENV__Text--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (struct SOAP_ENV__Reason *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Reason, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, soap_finsert, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Reason *p; + size_t k = sizeof(struct SOAP_ENV__Reason); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct SOAP_ENV__Reason); + } + else + { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Reason, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Reason location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a, const char *tag, const char *type) +{ + if (soap_out_SOAP_ENV__Reason(soap, tag ? tag : "SOAP-ENV:Reason", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p, const char *tag, const char *type) +{ + if ((p = soap_in_SOAP_ENV__Reason(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->__any = NULL; + a->__type = 0; + a->fault = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_markelement(soap, a->fault, a->__type); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Detail *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type)) + return soap->error; + if (soap_outliteral(soap, "-any", (char*const*)&a->__any, NULL)) + return soap->error; + if (soap_putelement(soap, a->fault, "fault", -1, a->__type)) + return soap->error; + return soap_element_end_out(soap, tag); +} + +SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail *a, const char *type) +{ + size_t soap_flag___any = 1; + size_t soap_flag_fault = 1; + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + (void)type; /* appease -Wall -Werror */ + a = (struct SOAP_ENV__Detail*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default_SOAP_ENV__Detail(soap, a); + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_fault && soap->error == SOAP_TAG_MISMATCH) + { if ((a->fault = soap_getelement(soap, "fault", &a->__type))) + { soap_flag_fault = 0; + continue; + } + } + if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_inliteral(soap, "-any", (char**)&a->__any)) + { soap_flag___any--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (struct SOAP_ENV__Detail *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Detail, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, soap_finsert, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Detail *p; + size_t k = sizeof(struct SOAP_ENV__Detail); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct SOAP_ENV__Detail); + } + else + { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Detail, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Detail location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a, const char *tag, const char *type) +{ + if (soap_out_SOAP_ENV__Detail(soap, tag ? tag : "SOAP-ENV:Detail", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p, const char *tag, const char *type) +{ + if ((p = soap_in_SOAP_ENV__Detail(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + soap_default__QName(soap, &a->SOAP_ENV__Value); + a->SOAP_ENV__Subcode = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize__QName(soap, (char*const*)&a->SOAP_ENV__Value); + soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Subcode); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type) +{ + const char *soap_tmp_SOAP_ENV__Value; + soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value); + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type)) + return soap->error; + if (soap_out__QName(soap, "SOAP-ENV:Value", -1, (char*const*)(void*)&soap_tmp_SOAP_ENV__Value, "")) + return soap->error; + if (soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", -1, &a->SOAP_ENV__Subcode, "")) + return soap->error; + return soap_element_end_out(soap, tag); +} + +SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code *a, const char *type) +{ + size_t soap_flag_SOAP_ENV__Value = 1; + size_t soap_flag_SOAP_ENV__Subcode = 1; + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + (void)type; /* appease -Wall -Werror */ + a = (struct SOAP_ENV__Code*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default_SOAP_ENV__Code(soap, a); + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) + { if (soap_in__QName(soap, "SOAP-ENV:Value", (char**)&a->SOAP_ENV__Value, "xsd:QName")) + { soap_flag_SOAP_ENV__Value--; + continue; + } + } + if (soap_flag_SOAP_ENV__Subcode && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, "")) + { soap_flag_SOAP_ENV__Subcode--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Code, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, soap_finsert, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Code *p; + size_t k = sizeof(struct SOAP_ENV__Code); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct SOAP_ENV__Code); + } + else + { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Code, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Code location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a, const char *tag, const char *type) +{ + if (soap_out_SOAP_ENV__Code(soap, tag ? tag : "SOAP-ENV:Code", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p, const char *tag, const char *type) +{ + if ((p = soap_in_SOAP_ENV__Code(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type)) + return soap->error; + return soap_element_end_out(soap, tag); +} + +SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type) +{ + if (soap_element_begin_in(soap, tag, 0, NULL)) + return NULL; + (void)type; /* appease -Wall -Werror */ + a = (struct SOAP_ENV__Header*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default_SOAP_ENV__Header(soap, a); + if (soap->body && *soap->href != '#') + { + for (;;) + { soap->error = SOAP_TAG_MISMATCH; + if (soap->error == SOAP_TAG_MISMATCH) + soap->error = soap_ignore_element(soap); + if (soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + if (soap_element_end_in(soap, tag)) + return NULL; + } + else + { a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Header, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0, soap_finsert, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Header *p; + size_t k = sizeof(struct SOAP_ENV__Header); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct SOAP_ENV__Header); + } + else + { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Header, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Header location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a, const char *tag, const char *type) +{ + if (soap_out_SOAP_ENV__Header(soap, tag ? tag : "SOAP-ENV:Header", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p, const char *tag, const char *type) +{ + if ((p = soap_in_SOAP_ENV__Header(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__DeleteClass_(struct soap *soap, struct __ns1__DeleteClass_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__DeleteClass = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__DeleteClass_(struct soap *soap, const struct __ns1__DeleteClass_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__DeleteClass(soap, &a->ns1__DeleteClass); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__DeleteClass_(struct soap *soap, const char *tag, int id, const struct __ns1__DeleteClass_ *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__DeleteClass(soap, "ns1:DeleteClass", -1, &a->ns1__DeleteClass, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__DeleteClass_ * SOAP_FMAC4 soap_in___ns1__DeleteClass_(struct soap *soap, const char *tag, struct __ns1__DeleteClass_ *a, const char *type) +{ + size_t soap_flag_ns1__DeleteClass = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__DeleteClass_*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__DeleteClass_, sizeof(struct __ns1__DeleteClass_), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__DeleteClass_(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__DeleteClass && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__DeleteClass(soap, "ns1:DeleteClass", &a->ns1__DeleteClass, "")) + { soap_flag_ns1__DeleteClass--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__DeleteClass_ * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass_(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__DeleteClass_(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__DeleteClass_ *p; + size_t k = sizeof(struct __ns1__DeleteClass_); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__DeleteClass_, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__DeleteClass_); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__DeleteClass_, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__DeleteClass_ location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__DeleteClass_(struct soap *soap, const struct __ns1__DeleteClass_ *a, const char *tag, const char *type) +{ + if (soap_out___ns1__DeleteClass_(soap, tag ? tag : "-ns1:DeleteClass", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__DeleteClass_ * SOAP_FMAC4 soap_get___ns1__DeleteClass_(struct soap *soap, struct __ns1__DeleteClass_ *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__DeleteClass_(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SendToClass_(struct soap *soap, struct __ns1__SendToClass_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__SendToClass = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SendToClass_(struct soap *soap, const struct __ns1__SendToClass_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__SendToClass(soap, &a->ns1__SendToClass); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SendToClass_(struct soap *soap, const char *tag, int id, const struct __ns1__SendToClass_ *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__SendToClass(soap, "ns1:SendToClass", -1, &a->ns1__SendToClass, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SendToClass_ * SOAP_FMAC4 soap_in___ns1__SendToClass_(struct soap *soap, const char *tag, struct __ns1__SendToClass_ *a, const char *type) +{ + size_t soap_flag_ns1__SendToClass = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__SendToClass_*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__SendToClass_, sizeof(struct __ns1__SendToClass_), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__SendToClass_(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__SendToClass && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__SendToClass(soap, "ns1:SendToClass", &a->ns1__SendToClass, "")) + { soap_flag_ns1__SendToClass--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__SendToClass_ * SOAP_FMAC2 soap_instantiate___ns1__SendToClass_(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__SendToClass_(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__SendToClass_ *p; + size_t k = sizeof(struct __ns1__SendToClass_); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__SendToClass_, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__SendToClass_); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__SendToClass_, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__SendToClass_ location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SendToClass_(struct soap *soap, const struct __ns1__SendToClass_ *a, const char *tag, const char *type) +{ + if (soap_out___ns1__SendToClass_(soap, tag ? tag : "-ns1:SendToClass", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SendToClass_ * SOAP_FMAC4 soap_get___ns1__SendToClass_(struct soap *soap, struct __ns1__SendToClass_ *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__SendToClass_(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__CreateProject_(struct soap *soap, struct __ns1__CreateProject_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__CreateProject = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__CreateProject_(struct soap *soap, const struct __ns1__CreateProject_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__CreateProject(soap, &a->ns1__CreateProject); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__CreateProject_(struct soap *soap, const char *tag, int id, const struct __ns1__CreateProject_ *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__CreateProject(soap, "ns1:CreateProject", -1, &a->ns1__CreateProject, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__CreateProject_ * SOAP_FMAC4 soap_in___ns1__CreateProject_(struct soap *soap, const char *tag, struct __ns1__CreateProject_ *a, const char *type) +{ + size_t soap_flag_ns1__CreateProject = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__CreateProject_*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__CreateProject_, sizeof(struct __ns1__CreateProject_), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__CreateProject_(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__CreateProject && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__CreateProject(soap, "ns1:CreateProject", &a->ns1__CreateProject, "")) + { soap_flag_ns1__CreateProject--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__CreateProject_ * SOAP_FMAC2 soap_instantiate___ns1__CreateProject_(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__CreateProject_(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__CreateProject_ *p; + size_t k = sizeof(struct __ns1__CreateProject_); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__CreateProject_, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__CreateProject_); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__CreateProject_, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__CreateProject_ location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__CreateProject_(struct soap *soap, const struct __ns1__CreateProject_ *a, const char *tag, const char *type) +{ + if (soap_out___ns1__CreateProject_(soap, tag ? tag : "-ns1:CreateProject", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__CreateProject_ * SOAP_FMAC4 soap_get___ns1__CreateProject_(struct soap *soap, struct __ns1__CreateProject_ *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__CreateProject_(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SetMaterialStatusS_(struct soap *soap, struct __ns1__SetMaterialStatusS_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__SetMaterialStatusS = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SetMaterialStatusS_(struct soap *soap, const struct __ns1__SetMaterialStatusS_ *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__SetMaterialStatusS(soap, &a->ns1__SetMaterialStatusS); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SetMaterialStatusS_(struct soap *soap, const char *tag, int id, const struct __ns1__SetMaterialStatusS_ *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__SetMaterialStatusS(soap, "ns1:SetMaterialStatusS", -1, &a->ns1__SetMaterialStatusS, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC4 soap_in___ns1__SetMaterialStatusS_(struct soap *soap, const char *tag, struct __ns1__SetMaterialStatusS_ *a, const char *type) +{ + size_t soap_flag_ns1__SetMaterialStatusS = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__SetMaterialStatusS_*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__SetMaterialStatusS_, sizeof(struct __ns1__SetMaterialStatusS_), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__SetMaterialStatusS_(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__SetMaterialStatusS && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__SetMaterialStatusS(soap, "ns1:SetMaterialStatusS", &a->ns1__SetMaterialStatusS, "")) + { soap_flag_ns1__SetMaterialStatusS--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS_(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__SetMaterialStatusS_(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__SetMaterialStatusS_ *p; + size_t k = sizeof(struct __ns1__SetMaterialStatusS_); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__SetMaterialStatusS_, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__SetMaterialStatusS_); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__SetMaterialStatusS_, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__SetMaterialStatusS_ location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SetMaterialStatusS_(struct soap *soap, const struct __ns1__SetMaterialStatusS_ *a, const char *tag, const char *type) +{ + if (soap_out___ns1__SetMaterialStatusS_(soap, tag ? tag : "-ns1:SetMaterialStatusS", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC4 soap_get___ns1__SetMaterialStatusS_(struct soap *soap, struct __ns1__SetMaterialStatusS_ *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__SetMaterialStatusS_(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__DeleteClass(struct soap *soap, struct __ns1__DeleteClass *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__DeleteClass = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__DeleteClass(struct soap *soap, const struct __ns1__DeleteClass *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__DeleteClass(soap, &a->ns1__DeleteClass); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__DeleteClass(struct soap *soap, const char *tag, int id, const struct __ns1__DeleteClass *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__DeleteClass(soap, "ns1:DeleteClass", -1, &a->ns1__DeleteClass, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__DeleteClass * SOAP_FMAC4 soap_in___ns1__DeleteClass(struct soap *soap, const char *tag, struct __ns1__DeleteClass *a, const char *type) +{ + size_t soap_flag_ns1__DeleteClass = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__DeleteClass*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__DeleteClass, sizeof(struct __ns1__DeleteClass), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__DeleteClass(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__DeleteClass && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__DeleteClass(soap, "ns1:DeleteClass", &a->ns1__DeleteClass, "")) + { soap_flag_ns1__DeleteClass--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__DeleteClass * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__DeleteClass(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__DeleteClass *p; + size_t k = sizeof(struct __ns1__DeleteClass); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__DeleteClass, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__DeleteClass); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__DeleteClass, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__DeleteClass location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__DeleteClass(struct soap *soap, const struct __ns1__DeleteClass *a, const char *tag, const char *type) +{ + if (soap_out___ns1__DeleteClass(soap, tag ? tag : "-ns1:DeleteClass", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__DeleteClass * SOAP_FMAC4 soap_get___ns1__DeleteClass(struct soap *soap, struct __ns1__DeleteClass *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__DeleteClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SendToClass(struct soap *soap, struct __ns1__SendToClass *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__SendToClass = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SendToClass(struct soap *soap, const struct __ns1__SendToClass *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__SendToClass(soap, &a->ns1__SendToClass); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SendToClass(struct soap *soap, const char *tag, int id, const struct __ns1__SendToClass *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__SendToClass(soap, "ns1:SendToClass", -1, &a->ns1__SendToClass, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SendToClass * SOAP_FMAC4 soap_in___ns1__SendToClass(struct soap *soap, const char *tag, struct __ns1__SendToClass *a, const char *type) +{ + size_t soap_flag_ns1__SendToClass = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__SendToClass*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__SendToClass, sizeof(struct __ns1__SendToClass), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__SendToClass(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__SendToClass && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__SendToClass(soap, "ns1:SendToClass", &a->ns1__SendToClass, "")) + { soap_flag_ns1__SendToClass--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__SendToClass * SOAP_FMAC2 soap_instantiate___ns1__SendToClass(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__SendToClass(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__SendToClass *p; + size_t k = sizeof(struct __ns1__SendToClass); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__SendToClass, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__SendToClass); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__SendToClass, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__SendToClass location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SendToClass(struct soap *soap, const struct __ns1__SendToClass *a, const char *tag, const char *type) +{ + if (soap_out___ns1__SendToClass(soap, tag ? tag : "-ns1:SendToClass", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SendToClass * SOAP_FMAC4 soap_get___ns1__SendToClass(struct soap *soap, struct __ns1__SendToClass *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__SendToClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__CreateProject(struct soap *soap, struct __ns1__CreateProject *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__CreateProject = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__CreateProject(struct soap *soap, const struct __ns1__CreateProject *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__CreateProject(soap, &a->ns1__CreateProject); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__CreateProject(struct soap *soap, const char *tag, int id, const struct __ns1__CreateProject *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__CreateProject(soap, "ns1:CreateProject", -1, &a->ns1__CreateProject, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__CreateProject * SOAP_FMAC4 soap_in___ns1__CreateProject(struct soap *soap, const char *tag, struct __ns1__CreateProject *a, const char *type) +{ + size_t soap_flag_ns1__CreateProject = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__CreateProject*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__CreateProject, sizeof(struct __ns1__CreateProject), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__CreateProject(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__CreateProject && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__CreateProject(soap, "ns1:CreateProject", &a->ns1__CreateProject, "")) + { soap_flag_ns1__CreateProject--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__CreateProject * SOAP_FMAC2 soap_instantiate___ns1__CreateProject(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__CreateProject(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__CreateProject *p; + size_t k = sizeof(struct __ns1__CreateProject); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__CreateProject, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__CreateProject); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__CreateProject, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__CreateProject location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__CreateProject(struct soap *soap, const struct __ns1__CreateProject *a, const char *tag, const char *type) +{ + if (soap_out___ns1__CreateProject(soap, tag ? tag : "-ns1:CreateProject", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__CreateProject * SOAP_FMAC4 soap_get___ns1__CreateProject(struct soap *soap, struct __ns1__CreateProject *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__CreateProject(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SetMaterialStatusS(struct soap *soap, struct __ns1__SetMaterialStatusS *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ + a->ns1__SetMaterialStatusS = NULL; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SetMaterialStatusS(struct soap *soap, const struct __ns1__SetMaterialStatusS *a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + soap_serialize_PointerTo_ns1__SetMaterialStatusS(soap, &a->ns1__SetMaterialStatusS); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SetMaterialStatusS(struct soap *soap, const char *tag, int id, const struct __ns1__SetMaterialStatusS *a, const char *type) +{ + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ + if (soap_out_PointerTo_ns1__SetMaterialStatusS(soap, "ns1:SetMaterialStatusS", -1, &a->ns1__SetMaterialStatusS, "")) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SetMaterialStatusS * SOAP_FMAC4 soap_in___ns1__SetMaterialStatusS(struct soap *soap, const char *tag, struct __ns1__SetMaterialStatusS *a, const char *type) +{ + size_t soap_flag_ns1__SetMaterialStatusS = 1; + short soap_flag; + (void)tag; (void)type; /* appease -Wall -Werror */ + a = (struct __ns1__SetMaterialStatusS*)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__SetMaterialStatusS, sizeof(struct __ns1__SetMaterialStatusS), NULL, NULL, NULL, NULL); + if (!a) + return NULL; + soap_default___ns1__SetMaterialStatusS(soap, a); + for (soap_flag = 0;; soap_flag = 1) + { soap->error = SOAP_TAG_MISMATCH; + if (soap_flag_ns1__SetMaterialStatusS && soap->error == SOAP_TAG_MISMATCH) + { if (soap_in_PointerTo_ns1__SetMaterialStatusS(soap, "ns1:SetMaterialStatusS", &a->ns1__SetMaterialStatusS, "")) + { soap_flag_ns1__SetMaterialStatusS--; + continue; + } + } + if (soap->error == SOAP_TAG_MISMATCH && soap_flag) + { soap->error = SOAP_OK; + break; + } + if (soap_flag && soap->error == SOAP_NO_TAG) + break; + if (soap->error) + return NULL; + } + return a; +} + +SOAP_FMAC1 struct __ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__SetMaterialStatusS(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct __ns1__SetMaterialStatusS *p; + size_t k = sizeof(struct __ns1__SetMaterialStatusS); + struct soap_clist *cp = soap_link(soap, SOAP_TYPE___ns1__SetMaterialStatusS, n, soap_fdelete); + if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE) + return NULL; + if (n < 0) + { p = SOAP_NEW(soap, struct __ns1__SetMaterialStatusS); + } + else + { p = SOAP_NEW_ARRAY(soap, struct __ns1__SetMaterialStatusS, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct __ns1__SetMaterialStatusS location=%p n=%d\n", (void*)p, n)); + if (size) + *size = k; + if (!p) + soap->error = SOAP_EOM; + else if (cp) + cp->ptr = (void*)p; + return p; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SetMaterialStatusS(struct soap *soap, const struct __ns1__SetMaterialStatusS *a, const char *tag, const char *type) +{ + if (soap_out___ns1__SetMaterialStatusS(soap, tag ? tag : "-ns1:SetMaterialStatusS", -2, a, type)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC3 struct __ns1__SetMaterialStatusS * SOAP_FMAC4 soap_get___ns1__SetMaterialStatusS(struct soap *soap, struct __ns1__SetMaterialStatusS *p, const char *tag, const char *type) +{ + if ((p = soap_in___ns1__SetMaterialStatusS(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Reason)) + soap_serialize_SOAP_ENV__Reason(soap, *a); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Reason *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason, NULL); + if (id < 0) + return soap->error; + return soap_out_SOAP_ENV__Reason(soap, tag, id, *a, type); +} + +SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (struct SOAP_ENV__Reason **)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = soap_in_SOAP_ENV__Reason(soap, tag, *a, type))) + return NULL; + } + else + { a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerToSOAP_ENV__Reason(soap, tag ? tag : "SOAP-ENV:Reason", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerToSOAP_ENV__Reason(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Detail)) + soap_serialize_SOAP_ENV__Detail(soap, *a); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Detail *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail, NULL); + if (id < 0) + return soap->error; + return soap_out_SOAP_ENV__Detail(soap, tag, id, *a, type); +} + +SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (struct SOAP_ENV__Detail **)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = soap_in_SOAP_ENV__Detail(soap, tag, *a, type))) + return NULL; + } + else + { a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerToSOAP_ENV__Detail(soap, tag ? tag : "SOAP-ENV:Detail", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerToSOAP_ENV__Detail(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +#ifndef WITH_NOGLOBAL + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code)) + soap_serialize_SOAP_ENV__Code(soap, *a); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type) +{ + char *mark; + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code, &mark); + if (id < 0) + return soap->error; + (void)soap_out_SOAP_ENV__Code(soap, tag, id, *a, type); + soap_unmark(soap, mark); + return soap->error; +} + +SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (struct SOAP_ENV__Code **)soap_malloc(soap, sizeof(struct SOAP_ENV__Code *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = soap_in_SOAP_ENV__Code(soap, tag, *a, type))) + return NULL; + } + else + { a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, NULL); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerToSOAP_ENV__Code(soap, tag ? tag : "SOAP-ENV:Code", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerToSOAP_ENV__Code(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#endif + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE__ns1__DeleteClass)) + (*a)->soap_serialize(soap); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__DeleteClass(struct soap *soap, const char *tag, int id, _ns1__DeleteClass *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__DeleteClass, NULL); + if (id < 0) + return soap->error; + return (*a)->soap_out(soap, tag, id, (*a)->soap_type() == SOAP_TYPE__ns1__DeleteClass ? type : NULL); +} + +SOAP_FMAC3 _ns1__DeleteClass ** SOAP_FMAC4 soap_in_PointerTo_ns1__DeleteClass(struct soap *soap, const char *tag, _ns1__DeleteClass **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (_ns1__DeleteClass **)soap_malloc(soap, sizeof(_ns1__DeleteClass *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = (_ns1__DeleteClass *)soap_instantiate__ns1__DeleteClass(soap, -1, soap->type, soap->arrayType, NULL))) + return NULL; + (*a)->soap_default(soap); + if (!(*a)->soap_in(soap, tag, NULL)) + { *a = NULL; + return NULL; + } + } + else + { a = (_ns1__DeleteClass **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__DeleteClass, sizeof(_ns1__DeleteClass), 0, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerTo_ns1__DeleteClass(soap, tag ? tag : "ns1:DeleteClass", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 _ns1__DeleteClass ** SOAP_FMAC4 soap_get_PointerTo_ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerTo_ns1__DeleteClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__SendToClass(struct soap *soap, _ns1__SendToClass *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE__ns1__SendToClass)) + (*a)->soap_serialize(soap); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__SendToClass(struct soap *soap, const char *tag, int id, _ns1__SendToClass *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__SendToClass, NULL); + if (id < 0) + return soap->error; + return (*a)->soap_out(soap, tag, id, (*a)->soap_type() == SOAP_TYPE__ns1__SendToClass ? type : NULL); +} + +SOAP_FMAC3 _ns1__SendToClass ** SOAP_FMAC4 soap_in_PointerTo_ns1__SendToClass(struct soap *soap, const char *tag, _ns1__SendToClass **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (_ns1__SendToClass **)soap_malloc(soap, sizeof(_ns1__SendToClass *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = (_ns1__SendToClass *)soap_instantiate__ns1__SendToClass(soap, -1, soap->type, soap->arrayType, NULL))) + return NULL; + (*a)->soap_default(soap); + if (!(*a)->soap_in(soap, tag, NULL)) + { *a = NULL; + return NULL; + } + } + else + { a = (_ns1__SendToClass **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__SendToClass, sizeof(_ns1__SendToClass), 0, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__SendToClass(struct soap *soap, _ns1__SendToClass *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerTo_ns1__SendToClass(soap, tag ? tag : "ns1:SendToClass", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 _ns1__SendToClass ** SOAP_FMAC4 soap_get_PointerTo_ns1__SendToClass(struct soap *soap, _ns1__SendToClass **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerTo_ns1__SendToClass(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__CreateProject(struct soap *soap, _ns1__CreateProject *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE__ns1__CreateProject)) + (*a)->soap_serialize(soap); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__CreateProject(struct soap *soap, const char *tag, int id, _ns1__CreateProject *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__CreateProject, NULL); + if (id < 0) + return soap->error; + return (*a)->soap_out(soap, tag, id, (*a)->soap_type() == SOAP_TYPE__ns1__CreateProject ? type : NULL); +} + +SOAP_FMAC3 _ns1__CreateProject ** SOAP_FMAC4 soap_in_PointerTo_ns1__CreateProject(struct soap *soap, const char *tag, _ns1__CreateProject **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (_ns1__CreateProject **)soap_malloc(soap, sizeof(_ns1__CreateProject *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = (_ns1__CreateProject *)soap_instantiate__ns1__CreateProject(soap, -1, soap->type, soap->arrayType, NULL))) + return NULL; + (*a)->soap_default(soap); + if (!(*a)->soap_in(soap, tag, NULL)) + { *a = NULL; + return NULL; + } + } + else + { a = (_ns1__CreateProject **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__CreateProject, sizeof(_ns1__CreateProject), 0, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__CreateProject(struct soap *soap, _ns1__CreateProject *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerTo_ns1__CreateProject(soap, tag ? tag : "ns1:CreateProject", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 _ns1__CreateProject ** SOAP_FMAC4 soap_get_PointerTo_ns1__CreateProject(struct soap *soap, _ns1__CreateProject **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerTo_ns1__CreateProject(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + if (!soap_reference(soap, *a, SOAP_TYPE__ns1__SetMaterialStatusS)) + (*a)->soap_serialize(soap); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__SetMaterialStatusS(struct soap *soap, const char *tag, int id, _ns1__SetMaterialStatusS *const*a, const char *type) +{ + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__SetMaterialStatusS, NULL); + if (id < 0) + return soap->error; + return (*a)->soap_out(soap, tag, id, (*a)->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusS ? type : NULL); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusS ** SOAP_FMAC4 soap_in_PointerTo_ns1__SetMaterialStatusS(struct soap *soap, const char *tag, _ns1__SetMaterialStatusS **a, const char *type) +{ + (void)type; /* appease -Wall -Werror */ + if (soap_element_begin_in(soap, tag, 1, NULL)) + return NULL; + if (!a) + if (!(a = (_ns1__SetMaterialStatusS **)soap_malloc(soap, sizeof(_ns1__SetMaterialStatusS *)))) + return NULL; + *a = NULL; + if (!soap->null && *soap->href != '#') + { soap_revert(soap); + if (!(*a = (_ns1__SetMaterialStatusS *)soap_instantiate__ns1__SetMaterialStatusS(soap, -1, soap->type, soap->arrayType, NULL))) + return NULL; + (*a)->soap_default(soap); + if (!(*a)->soap_in(soap, tag, NULL)) + { *a = NULL; + return NULL; + } + } + else + { a = (_ns1__SetMaterialStatusS **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__SetMaterialStatusS, sizeof(_ns1__SetMaterialStatusS), 0, soap_fbase); + if (soap->body && soap_element_end_in(soap, tag)) + return NULL; + } + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS *const*a, const char *tag, const char *type) +{ + if (soap_out_PointerTo_ns1__SetMaterialStatusS(soap, tag ? tag : "ns1:SetMaterialStatusS", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 _ns1__SetMaterialStatusS ** SOAP_FMAC4 soap_get_PointerTo_ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS **p, const char *tag, const char *type) +{ + if ((p = soap_in_PointerTo_ns1__SetMaterialStatusS(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_wstring(struct soap *soap, wchar_t *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + (void)soap_reference(soap, *a, SOAP_TYPE_wstring); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_wstring(struct soap *soap, const char *tag, int id, wchar_t *const*a, const char *type) +{ + return soap_outwstring(soap, tag, id, a, type, SOAP_TYPE_wstring); +} + +SOAP_FMAC3 wchar_t * * SOAP_FMAC4 soap_in_wstring(struct soap *soap, const char *tag, wchar_t **a, const char *type) +{ + a = soap_inwstring(soap, tag, a, type, SOAP_TYPE_wstring, 1, 0, -1, NULL); + return a; +} + +SOAP_FMAC3 wchar_t * * SOAP_FMAC4 soap_new_wstring(struct soap *soap, int n) +{ + wchar_t * *a = static_cast(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(wchar_t *))); + for (wchar_t * *p = a; p && n--; ++p) + soap_default_wstring(soap, p); + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_wstring(struct soap *soap, wchar_t *const*a, const char *tag, const char *type) +{ + if (soap_out_wstring(soap, tag ? tag : "string", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 wchar_t ** SOAP_FMAC4 soap_get_wstring(struct soap *soap, wchar_t **p, const char *tag, const char *type) +{ + if ((p = soap_in_wstring(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap *soap, char *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + (void)soap_reference(soap, *a, SOAP_TYPE__QName); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap *soap, const char *tag, int id, char *const*a, const char *type) +{ + return soap_outstring(soap, tag, id, a, type, SOAP_TYPE__QName); +} + +SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type) +{ + a = soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, 0, -1, NULL); + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type) +{ + if (soap_out__QName(soap, tag ? tag : "QName", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap *soap, char **p, const char *tag, const char *type) +{ + if ((p = soap_in__QName(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a) +{ + (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF + (void)soap_reference(soap, *a, SOAP_TYPE_string); +#endif +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap *soap, const char *tag, int id, char *const*a, const char *type) +{ + return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_string); +} + +SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type) +{ + a = soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, 0, -1, NULL); + return a; +} + +SOAP_FMAC3 char * * SOAP_FMAC4 soap_new_string(struct soap *soap, int n) +{ + char * *a = static_cast(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(char *))); + for (char * *p = a; p && n--; ++p) + soap_default_string(soap, p); + return a; +} + +SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type) +{ + if (soap_out_string(soap, tag ? tag : "string", -2, a, type)) + return soap->error; + return soap_putindependent(soap); +} + +SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap *soap, char **p, const char *tag, const char *type) +{ + if ((p = soap_in_string(soap, tag, p, type))) + if (soap_getindependent(soap)) + return NULL; + return p; +} + +#if defined(__BORLANDC__) +#pragma option pop +#pragma option pop +#endif + +/* End of soapC.cpp */ diff --git a/jf_itk/sendTOClass/soapClient.cpp b/jf_itk/sendTOClass/soapClient.cpp new file mode 100644 index 0000000..25c74b7 --- /dev/null +++ b/jf_itk/sendTOClass/soapClient.cpp @@ -0,0 +1,508 @@ +/* soapClient.cpp + Generated by gSOAP 2.8.103 for .\sendToClass.h + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +#if defined(__BORLANDC__) +#pragma option push -w-8060 +#pragma option push -w-8004 +#endif +#include "soapH.h" + +SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.8.103 2020-09-03 08:53:03 GMT") + + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SetMaterialStatusS(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse) +{ if (soap_send___ns1__SetMaterialStatusS(soap, soap_endpoint, soap_action, ns1__SetMaterialStatusS) || soap_recv___ns1__SetMaterialStatusS(soap, ns1__SetMaterialStatusSResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SetMaterialStatusS(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS) +{ struct __ns1__SetMaterialStatusS soap_tmp___ns1__SetMaterialStatusS; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/SetMaterialStatusS"; + soap_tmp___ns1__SetMaterialStatusS.ns1__SetMaterialStatusS = ns1__SetMaterialStatusS; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__SetMaterialStatusS(soap, &soap_tmp___ns1__SetMaterialStatusS); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SetMaterialStatusS(soap, &soap_tmp___ns1__SetMaterialStatusS, "-ns1:SetMaterialStatusS", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SetMaterialStatusS(soap, &soap_tmp___ns1__SetMaterialStatusS, "-ns1:SetMaterialStatusS", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse) +{ + ns1__SetMaterialStatusSResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__SetMaterialStatusSResponse.soap_get(soap, "ns1:SetMaterialStatusSResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__CreateProject(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject, _ns1__CreateProjectResponse &ns1__CreateProjectResponse) +{ if (soap_send___ns1__CreateProject(soap, soap_endpoint, soap_action, ns1__CreateProject) || soap_recv___ns1__CreateProject(soap, ns1__CreateProjectResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__CreateProject(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject) +{ struct __ns1__CreateProject soap_tmp___ns1__CreateProject; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/CreateProject"; + soap_tmp___ns1__CreateProject.ns1__CreateProject = ns1__CreateProject; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__CreateProject(soap, &soap_tmp___ns1__CreateProject); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__CreateProject(soap, &soap_tmp___ns1__CreateProject, "-ns1:CreateProject", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__CreateProject(soap, &soap_tmp___ns1__CreateProject, "-ns1:CreateProject", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__CreateProject(struct soap *soap, _ns1__CreateProjectResponse &ns1__CreateProjectResponse) +{ + ns1__CreateProjectResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__CreateProjectResponse.soap_get(soap, "ns1:CreateProjectResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SendToClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass, _ns1__SendToClassResponse &ns1__SendToClassResponse) +{ if (soap_send___ns1__SendToClass(soap, soap_endpoint, soap_action, ns1__SendToClass) || soap_recv___ns1__SendToClass(soap, ns1__SendToClassResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SendToClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass) +{ struct __ns1__SendToClass soap_tmp___ns1__SendToClass; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/SendToClass"; + soap_tmp___ns1__SendToClass.ns1__SendToClass = ns1__SendToClass; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__SendToClass(soap, &soap_tmp___ns1__SendToClass); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SendToClass(soap, &soap_tmp___ns1__SendToClass, "-ns1:SendToClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SendToClass(soap, &soap_tmp___ns1__SendToClass, "-ns1:SendToClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SendToClass(struct soap *soap, _ns1__SendToClassResponse &ns1__SendToClassResponse) +{ + ns1__SendToClassResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__SendToClassResponse.soap_get(soap, "ns1:SendToClassResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__DeleteClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass, _ns1__DeleteClassResponse &ns1__DeleteClassResponse) +{ if (soap_send___ns1__DeleteClass(soap, soap_endpoint, soap_action, ns1__DeleteClass) || soap_recv___ns1__DeleteClass(soap, ns1__DeleteClassResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__DeleteClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass) +{ struct __ns1__DeleteClass soap_tmp___ns1__DeleteClass; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/DeleteClass"; + soap_tmp___ns1__DeleteClass.ns1__DeleteClass = ns1__DeleteClass; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__DeleteClass(soap, &soap_tmp___ns1__DeleteClass); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__DeleteClass(soap, &soap_tmp___ns1__DeleteClass, "-ns1:DeleteClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__DeleteClass(soap, &soap_tmp___ns1__DeleteClass, "-ns1:DeleteClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__DeleteClass(struct soap *soap, _ns1__DeleteClassResponse &ns1__DeleteClassResponse) +{ + ns1__DeleteClassResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__DeleteClassResponse.soap_get(soap, "ns1:DeleteClassResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SetMaterialStatusS_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse) +{ if (soap_send___ns1__SetMaterialStatusS_(soap, soap_endpoint, soap_action, ns1__SetMaterialStatusS) || soap_recv___ns1__SetMaterialStatusS_(soap, ns1__SetMaterialStatusSResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SetMaterialStatusS_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS) +{ struct __ns1__SetMaterialStatusS_ soap_tmp___ns1__SetMaterialStatusS_; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/SetMaterialStatusS"; + soap_tmp___ns1__SetMaterialStatusS_.ns1__SetMaterialStatusS = ns1__SetMaterialStatusS; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__SetMaterialStatusS_(soap, &soap_tmp___ns1__SetMaterialStatusS_); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SetMaterialStatusS_(soap, &soap_tmp___ns1__SetMaterialStatusS_, "-ns1:SetMaterialStatusS", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SetMaterialStatusS_(soap, &soap_tmp___ns1__SetMaterialStatusS_, "-ns1:SetMaterialStatusS", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SetMaterialStatusS_(struct soap *soap, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse) +{ + ns1__SetMaterialStatusSResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__SetMaterialStatusSResponse.soap_get(soap, "ns1:SetMaterialStatusSResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__CreateProject_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject, _ns1__CreateProjectResponse &ns1__CreateProjectResponse) +{ if (soap_send___ns1__CreateProject_(soap, soap_endpoint, soap_action, ns1__CreateProject) || soap_recv___ns1__CreateProject_(soap, ns1__CreateProjectResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__CreateProject_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject) +{ struct __ns1__CreateProject_ soap_tmp___ns1__CreateProject_; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/CreateProject"; + soap_tmp___ns1__CreateProject_.ns1__CreateProject = ns1__CreateProject; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__CreateProject_(soap, &soap_tmp___ns1__CreateProject_); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__CreateProject_(soap, &soap_tmp___ns1__CreateProject_, "-ns1:CreateProject", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__CreateProject_(soap, &soap_tmp___ns1__CreateProject_, "-ns1:CreateProject", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__CreateProject_(struct soap *soap, _ns1__CreateProjectResponse &ns1__CreateProjectResponse) +{ + ns1__CreateProjectResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__CreateProjectResponse.soap_get(soap, "ns1:CreateProjectResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SendToClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass, _ns1__SendToClassResponse &ns1__SendToClassResponse) +{ if (soap_send___ns1__SendToClass_(soap, soap_endpoint, soap_action, ns1__SendToClass) || soap_recv___ns1__SendToClass_(soap, ns1__SendToClassResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SendToClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass) +{ struct __ns1__SendToClass_ soap_tmp___ns1__SendToClass_; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/SendToClass"; + soap_tmp___ns1__SendToClass_.ns1__SendToClass = ns1__SendToClass; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__SendToClass_(soap, &soap_tmp___ns1__SendToClass_); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SendToClass_(soap, &soap_tmp___ns1__SendToClass_, "-ns1:SendToClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__SendToClass_(soap, &soap_tmp___ns1__SendToClass_, "-ns1:SendToClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SendToClass_(struct soap *soap, _ns1__SendToClassResponse &ns1__SendToClassResponse) +{ + ns1__SendToClassResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__SendToClassResponse.soap_get(soap, "ns1:SendToClassResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__DeleteClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass, _ns1__DeleteClassResponse &ns1__DeleteClassResponse) +{ if (soap_send___ns1__DeleteClass_(soap, soap_endpoint, soap_action, ns1__DeleteClass) || soap_recv___ns1__DeleteClass_(soap, ns1__DeleteClassResponse)) + return soap->error; + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__DeleteClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass) +{ struct __ns1__DeleteClass_ soap_tmp___ns1__DeleteClass_; + if (soap_endpoint == NULL) + soap_endpoint = "http://192.168.1.137:8090/ErpWebService.asmx"; + if (soap_action == NULL) + soap_action = "http://tempuri.org/DeleteClass"; + soap_tmp___ns1__DeleteClass_.ns1__DeleteClass = ns1__DeleteClass; + soap_begin(soap); + soap->encodingStyle = NULL; /* use SOAP literal style */ + soap_serializeheader(soap); + soap_serialize___ns1__DeleteClass_(soap, &soap_tmp___ns1__DeleteClass_); + if (soap_begin_count(soap)) + return soap->error; + if ((soap->mode & SOAP_IO_LENGTH)) + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__DeleteClass_(soap, &soap_tmp___ns1__DeleteClass_, "-ns1:DeleteClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap->error; + } + if (soap_end_count(soap)) + return soap->error; + if (soap_connect(soap, soap_endpoint, soap_action) + || soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_put___ns1__DeleteClass_(soap, &soap_tmp___ns1__DeleteClass_, "-ns1:DeleteClass", "") + || soap_body_end_out(soap) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__DeleteClass_(struct soap *soap, _ns1__DeleteClassResponse &ns1__DeleteClassResponse) +{ + ns1__DeleteClassResponse.soap_default(soap); + if (soap_begin_recv(soap) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + return soap_closesock(soap); + ns1__DeleteClassResponse.soap_get(soap, "ns1:DeleteClassResponse", NULL); + if (soap->error) + return soap_recv_fault(soap, 0); + if (soap_body_end_in(soap) + || soap_envelope_end_in(soap) + || soap_end_recv(soap)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +#if defined(__BORLANDC__) +#pragma option pop +#pragma option pop +#endif + +/* End of soapClient.cpp */ diff --git a/jf_itk/sendTOClass/soapClientLib.cpp b/jf_itk/sendTOClass/soapClientLib.cpp new file mode 100644 index 0000000..ff849e0 --- /dev/null +++ b/jf_itk/sendTOClass/soapClientLib.cpp @@ -0,0 +1,29 @@ +/* soapClientLib.cpp + Generated by gSOAP 2.8.103 for .\sendToClass.h + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +/** Use this file in your project build instead of the two files soapC.cpp and soapClient.cpp. This hides the serializer functions by making them static, avoiding linking problems when linking multiple clients and servers. */ + +/* disable warnings for unused static functions defined in soapC.cpp */ +#if defined(WIN32) +#pragma warning(disable:4505) +#elif defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wunused-function" +#elif defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-function" +#endif +#define WITH_STATIC +#define SOAP_FMAC3 static +#include "soapC.cpp" +#include "soapClient.cpp" + +/* End of soapClientLib.cpp */ diff --git a/jf_itk/sendTOClass/soapH.h b/jf_itk/sendTOClass/soapH.h new file mode 100644 index 0000000..8944eba --- /dev/null +++ b/jf_itk/sendTOClass/soapH.h @@ -0,0 +1,2531 @@ +/* soapH.h + Generated by gSOAP 2.8.103 for .\sendToClass.h + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +#ifndef soapH_H +#define soapH_H +#include "soapStub.h" +#ifndef WITH_NOIDREF + +#ifdef __cplusplus +extern "C" { +#endif +SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int); + +#ifdef __cplusplus +} +#endif +SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*); +SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*); +#endif + +#ifdef __cplusplus +extern "C" { +#endif +SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, const char*, int*); +SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int); +SOAP_FMAC3 void * SOAP_FMAC4 soap_dupelement(struct soap*, const void*, int); +SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void*, int); + +#ifdef __cplusplus +} +#endif +SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*); +SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*); +SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap *soap, struct soap_clist*); +SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int, int); +SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap*, int, int, void*, size_t, const void*, void**); + +#ifndef SOAP_TYPE_byte_DEFINED +#define SOAP_TYPE_byte_DEFINED + +inline void soap_default_byte(struct soap *soap, char *a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT_byte + *a = SOAP_DEFAULT_byte; +#else + *a = (char)0; +#endif +} +SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*); +SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*); + +SOAP_FMAC3 char * SOAP_FMAC4 soap_new_byte(struct soap *soap, int n = -1); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*); + +inline int soap_write_byte(struct soap *soap, char const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_PUT_byte(struct soap *soap, const char *URL, char const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_byte(struct soap *soap, const char *URL, char const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_byte(struct soap *soap, const char *URL, char const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*); + +inline int soap_read_byte(struct soap *soap, char *p) +{ + if (p) + { if (soap_begin_recv(soap) || ::soap_get_byte(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_byte(struct soap *soap, const char *URL, char *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_byte(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_byte(struct soap *soap, char *p) +{ + if (::soap_read_byte(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE_int_DEFINED +#define SOAP_TYPE_int_DEFINED + +inline void soap_default_int(struct soap *soap, int *a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT_int + *a = SOAP_DEFAULT_int; +#else + *a = (int)0; +#endif +} +SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*); +SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*); + +SOAP_FMAC3 int * SOAP_FMAC4 soap_new_int(struct soap *soap, int n = -1); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*); + +inline int soap_write_int(struct soap *soap, int const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_PUT_int(struct soap *soap, const char *URL, int const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_int(struct soap *soap, const char *URL, int const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_int(struct soap *soap, const char *URL, int const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*); + +inline int soap_read_int(struct soap *soap, int *p) +{ + if (p) + { if (soap_begin_recv(soap) || ::soap_get_int(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_int(struct soap *soap, const char *URL, int *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_int(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_int(struct soap *soap, int *p) +{ + if (::soap_read_int(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__DeleteClassResponse_DEFINED +#define SOAP_TYPE__ns1__DeleteClassResponse_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__DeleteClassResponse(struct soap*, const char*, int, const _ns1__DeleteClassResponse *, const char*); +SOAP_FMAC3 _ns1__DeleteClassResponse * SOAP_FMAC4 soap_in__ns1__DeleteClassResponse(struct soap*, const char*, _ns1__DeleteClassResponse *, const char*); +SOAP_FMAC1 _ns1__DeleteClassResponse * SOAP_FMAC2 soap_instantiate__ns1__DeleteClassResponse(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__DeleteClassResponse * soap_new__ns1__DeleteClassResponse(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__DeleteClassResponse(soap, n, NULL, NULL, NULL); +} + +inline _ns1__DeleteClassResponse * soap_new_req__ns1__DeleteClassResponse( + struct soap *soap) +{ + _ns1__DeleteClassResponse *_p = ::soap_new__ns1__DeleteClassResponse(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__DeleteClassResponse * soap_new_set__ns1__DeleteClassResponse( + struct soap *soap, + wchar_t *DeleteClassResult) +{ + _ns1__DeleteClassResponse *_p = ::soap_new__ns1__DeleteClassResponse(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__DeleteClassResponse::DeleteClassResult = DeleteClassResult; + } + return _p; +} + +inline int soap_write__ns1__DeleteClassResponse(struct soap *soap, _ns1__DeleteClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClassResponse", p->soap_type() == SOAP_TYPE__ns1__DeleteClassResponse ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__DeleteClassResponse(struct soap *soap, const char *URL, _ns1__DeleteClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClassResponse", p->soap_type() == SOAP_TYPE__ns1__DeleteClassResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__DeleteClassResponse(struct soap *soap, const char *URL, _ns1__DeleteClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClassResponse", p->soap_type() == SOAP_TYPE__ns1__DeleteClassResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__DeleteClassResponse(struct soap *soap, const char *URL, _ns1__DeleteClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClassResponse", p->soap_type() == SOAP_TYPE__ns1__DeleteClassResponse ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__DeleteClassResponse * SOAP_FMAC4 soap_get__ns1__DeleteClassResponse(struct soap*, _ns1__DeleteClassResponse *, const char*, const char*); + +inline int soap_read__ns1__DeleteClassResponse(struct soap *soap, _ns1__DeleteClassResponse *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__DeleteClassResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__DeleteClassResponse(struct soap *soap, const char *URL, _ns1__DeleteClassResponse *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__DeleteClassResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__DeleteClassResponse(struct soap *soap, _ns1__DeleteClassResponse *p) +{ + if (::soap_read__ns1__DeleteClassResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__DeleteClass_DEFINED +#define SOAP_TYPE__ns1__DeleteClass_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__DeleteClass(struct soap*, const char*, int, const _ns1__DeleteClass *, const char*); +SOAP_FMAC3 _ns1__DeleteClass * SOAP_FMAC4 soap_in__ns1__DeleteClass(struct soap*, const char*, _ns1__DeleteClass *, const char*); +SOAP_FMAC1 _ns1__DeleteClass * SOAP_FMAC2 soap_instantiate__ns1__DeleteClass(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__DeleteClass * soap_new__ns1__DeleteClass(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__DeleteClass(soap, n, NULL, NULL, NULL); +} + +inline _ns1__DeleteClass * soap_new_req__ns1__DeleteClass( + struct soap *soap) +{ + _ns1__DeleteClass *_p = ::soap_new__ns1__DeleteClass(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__DeleteClass * soap_new_set__ns1__DeleteClass( + struct soap *soap, + wchar_t *icoPuid) +{ + _ns1__DeleteClass *_p = ::soap_new__ns1__DeleteClass(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__DeleteClass::icoPuid = icoPuid; + } + return _p; +} + +inline int soap_write__ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClass", p->soap_type() == SOAP_TYPE__ns1__DeleteClass ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__DeleteClass(struct soap *soap, const char *URL, _ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClass", p->soap_type() == SOAP_TYPE__ns1__DeleteClass ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__DeleteClass(struct soap *soap, const char *URL, _ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClass", p->soap_type() == SOAP_TYPE__ns1__DeleteClass ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__DeleteClass(struct soap *soap, const char *URL, _ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:DeleteClass", p->soap_type() == SOAP_TYPE__ns1__DeleteClass ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__DeleteClass * SOAP_FMAC4 soap_get__ns1__DeleteClass(struct soap*, _ns1__DeleteClass *, const char*, const char*); + +inline int soap_read__ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__DeleteClass(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__DeleteClass(struct soap *soap, const char *URL, _ns1__DeleteClass *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__DeleteClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__DeleteClass(struct soap *soap, _ns1__DeleteClass *p) +{ + if (::soap_read__ns1__DeleteClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__SendToClassResponse_DEFINED +#define SOAP_TYPE__ns1__SendToClassResponse_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SendToClassResponse(struct soap*, const char*, int, const _ns1__SendToClassResponse *, const char*); +SOAP_FMAC3 _ns1__SendToClassResponse * SOAP_FMAC4 soap_in__ns1__SendToClassResponse(struct soap*, const char*, _ns1__SendToClassResponse *, const char*); +SOAP_FMAC1 _ns1__SendToClassResponse * SOAP_FMAC2 soap_instantiate__ns1__SendToClassResponse(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__SendToClassResponse * soap_new__ns1__SendToClassResponse(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__SendToClassResponse(soap, n, NULL, NULL, NULL); +} + +inline _ns1__SendToClassResponse * soap_new_req__ns1__SendToClassResponse( + struct soap *soap) +{ + _ns1__SendToClassResponse *_p = ::soap_new__ns1__SendToClassResponse(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__SendToClassResponse * soap_new_set__ns1__SendToClassResponse( + struct soap *soap, + wchar_t *SendToClassResult) +{ + _ns1__SendToClassResponse *_p = ::soap_new__ns1__SendToClassResponse(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__SendToClassResponse::SendToClassResult = SendToClassResult; + } + return _p; +} + +inline int soap_write__ns1__SendToClassResponse(struct soap *soap, _ns1__SendToClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClassResponse", p->soap_type() == SOAP_TYPE__ns1__SendToClassResponse ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__SendToClassResponse(struct soap *soap, const char *URL, _ns1__SendToClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClassResponse", p->soap_type() == SOAP_TYPE__ns1__SendToClassResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__SendToClassResponse(struct soap *soap, const char *URL, _ns1__SendToClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClassResponse", p->soap_type() == SOAP_TYPE__ns1__SendToClassResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__SendToClassResponse(struct soap *soap, const char *URL, _ns1__SendToClassResponse const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClassResponse", p->soap_type() == SOAP_TYPE__ns1__SendToClassResponse ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__SendToClassResponse * SOAP_FMAC4 soap_get__ns1__SendToClassResponse(struct soap*, _ns1__SendToClassResponse *, const char*, const char*); + +inline int soap_read__ns1__SendToClassResponse(struct soap *soap, _ns1__SendToClassResponse *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__SendToClassResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__SendToClassResponse(struct soap *soap, const char *URL, _ns1__SendToClassResponse *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__SendToClassResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__SendToClassResponse(struct soap *soap, _ns1__SendToClassResponse *p) +{ + if (::soap_read__ns1__SendToClassResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__SendToClass_DEFINED +#define SOAP_TYPE__ns1__SendToClass_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SendToClass(struct soap*, const char*, int, const _ns1__SendToClass *, const char*); +SOAP_FMAC3 _ns1__SendToClass * SOAP_FMAC4 soap_in__ns1__SendToClass(struct soap*, const char*, _ns1__SendToClass *, const char*); +SOAP_FMAC1 _ns1__SendToClass * SOAP_FMAC2 soap_instantiate__ns1__SendToClass(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__SendToClass * soap_new__ns1__SendToClass(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__SendToClass(soap, n, NULL, NULL, NULL); +} + +inline _ns1__SendToClass * soap_new_req__ns1__SendToClass( + struct soap *soap) +{ + _ns1__SendToClass *_p = ::soap_new__ns1__SendToClass(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__SendToClass * soap_new_set__ns1__SendToClass( + struct soap *soap, + wchar_t *wsoPuiid, + wchar_t *classID, + wchar_t *JsonContainer) +{ + _ns1__SendToClass *_p = ::soap_new__ns1__SendToClass(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__SendToClass::wsoPuiid = wsoPuiid; + _p->_ns1__SendToClass::classID = classID; + _p->_ns1__SendToClass::JsonContainer = JsonContainer; + } + return _p; +} + +inline int soap_write__ns1__SendToClass(struct soap *soap, _ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClass", p->soap_type() == SOAP_TYPE__ns1__SendToClass ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__SendToClass(struct soap *soap, const char *URL, _ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClass", p->soap_type() == SOAP_TYPE__ns1__SendToClass ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__SendToClass(struct soap *soap, const char *URL, _ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClass", p->soap_type() == SOAP_TYPE__ns1__SendToClass ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__SendToClass(struct soap *soap, const char *URL, _ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SendToClass", p->soap_type() == SOAP_TYPE__ns1__SendToClass ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__SendToClass * SOAP_FMAC4 soap_get__ns1__SendToClass(struct soap*, _ns1__SendToClass *, const char*, const char*); + +inline int soap_read__ns1__SendToClass(struct soap *soap, _ns1__SendToClass *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__SendToClass(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__SendToClass(struct soap *soap, const char *URL, _ns1__SendToClass *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__SendToClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__SendToClass(struct soap *soap, _ns1__SendToClass *p) +{ + if (::soap_read__ns1__SendToClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__CreateProjectResponse_DEFINED +#define SOAP_TYPE__ns1__CreateProjectResponse_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__CreateProjectResponse(struct soap*, const char*, int, const _ns1__CreateProjectResponse *, const char*); +SOAP_FMAC3 _ns1__CreateProjectResponse * SOAP_FMAC4 soap_in__ns1__CreateProjectResponse(struct soap*, const char*, _ns1__CreateProjectResponse *, const char*); +SOAP_FMAC1 _ns1__CreateProjectResponse * SOAP_FMAC2 soap_instantiate__ns1__CreateProjectResponse(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__CreateProjectResponse * soap_new__ns1__CreateProjectResponse(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__CreateProjectResponse(soap, n, NULL, NULL, NULL); +} + +inline _ns1__CreateProjectResponse * soap_new_req__ns1__CreateProjectResponse( + struct soap *soap) +{ + _ns1__CreateProjectResponse *_p = ::soap_new__ns1__CreateProjectResponse(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__CreateProjectResponse * soap_new_set__ns1__CreateProjectResponse( + struct soap *soap, + wchar_t *CreateProjectResult) +{ + _ns1__CreateProjectResponse *_p = ::soap_new__ns1__CreateProjectResponse(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__CreateProjectResponse::CreateProjectResult = CreateProjectResult; + } + return _p; +} + +inline int soap_write__ns1__CreateProjectResponse(struct soap *soap, _ns1__CreateProjectResponse const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProjectResponse", p->soap_type() == SOAP_TYPE__ns1__CreateProjectResponse ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__CreateProjectResponse(struct soap *soap, const char *URL, _ns1__CreateProjectResponse const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProjectResponse", p->soap_type() == SOAP_TYPE__ns1__CreateProjectResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__CreateProjectResponse(struct soap *soap, const char *URL, _ns1__CreateProjectResponse const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProjectResponse", p->soap_type() == SOAP_TYPE__ns1__CreateProjectResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__CreateProjectResponse(struct soap *soap, const char *URL, _ns1__CreateProjectResponse const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProjectResponse", p->soap_type() == SOAP_TYPE__ns1__CreateProjectResponse ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__CreateProjectResponse * SOAP_FMAC4 soap_get__ns1__CreateProjectResponse(struct soap*, _ns1__CreateProjectResponse *, const char*, const char*); + +inline int soap_read__ns1__CreateProjectResponse(struct soap *soap, _ns1__CreateProjectResponse *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__CreateProjectResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__CreateProjectResponse(struct soap *soap, const char *URL, _ns1__CreateProjectResponse *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__CreateProjectResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__CreateProjectResponse(struct soap *soap, _ns1__CreateProjectResponse *p) +{ + if (::soap_read__ns1__CreateProjectResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__CreateProject_DEFINED +#define SOAP_TYPE__ns1__CreateProject_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__CreateProject(struct soap*, const char*, int, const _ns1__CreateProject *, const char*); +SOAP_FMAC3 _ns1__CreateProject * SOAP_FMAC4 soap_in__ns1__CreateProject(struct soap*, const char*, _ns1__CreateProject *, const char*); +SOAP_FMAC1 _ns1__CreateProject * SOAP_FMAC2 soap_instantiate__ns1__CreateProject(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__CreateProject * soap_new__ns1__CreateProject(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__CreateProject(soap, n, NULL, NULL, NULL); +} + +inline _ns1__CreateProject * soap_new_req__ns1__CreateProject( + struct soap *soap) +{ + _ns1__CreateProject *_p = ::soap_new__ns1__CreateProject(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__CreateProject * soap_new_set__ns1__CreateProject( + struct soap *soap, + wchar_t *projJsonString) +{ + _ns1__CreateProject *_p = ::soap_new__ns1__CreateProject(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__CreateProject::projJsonString = projJsonString; + } + return _p; +} + +inline int soap_write__ns1__CreateProject(struct soap *soap, _ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProject", p->soap_type() == SOAP_TYPE__ns1__CreateProject ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__CreateProject(struct soap *soap, const char *URL, _ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProject", p->soap_type() == SOAP_TYPE__ns1__CreateProject ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__CreateProject(struct soap *soap, const char *URL, _ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProject", p->soap_type() == SOAP_TYPE__ns1__CreateProject ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__CreateProject(struct soap *soap, const char *URL, _ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:CreateProject", p->soap_type() == SOAP_TYPE__ns1__CreateProject ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__CreateProject * SOAP_FMAC4 soap_get__ns1__CreateProject(struct soap*, _ns1__CreateProject *, const char*, const char*); + +inline int soap_read__ns1__CreateProject(struct soap *soap, _ns1__CreateProject *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__CreateProject(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__CreateProject(struct soap *soap, const char *URL, _ns1__CreateProject *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__CreateProject(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__CreateProject(struct soap *soap, _ns1__CreateProject *p) +{ + if (::soap_read__ns1__CreateProject(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__SetMaterialStatusSResponse_DEFINED +#define SOAP_TYPE__ns1__SetMaterialStatusSResponse_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SetMaterialStatusSResponse(struct soap*, const char*, int, const _ns1__SetMaterialStatusSResponse *, const char*); +SOAP_FMAC3 _ns1__SetMaterialStatusSResponse * SOAP_FMAC4 soap_in__ns1__SetMaterialStatusSResponse(struct soap*, const char*, _ns1__SetMaterialStatusSResponse *, const char*); +SOAP_FMAC1 _ns1__SetMaterialStatusSResponse * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusSResponse(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__SetMaterialStatusSResponse * soap_new__ns1__SetMaterialStatusSResponse(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__SetMaterialStatusSResponse(soap, n, NULL, NULL, NULL); +} + +inline _ns1__SetMaterialStatusSResponse * soap_new_req__ns1__SetMaterialStatusSResponse( + struct soap *soap) +{ + _ns1__SetMaterialStatusSResponse *_p = ::soap_new__ns1__SetMaterialStatusSResponse(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__SetMaterialStatusSResponse * soap_new_set__ns1__SetMaterialStatusSResponse( + struct soap *soap, + wchar_t *SetMaterialStatusSResult) +{ + _ns1__SetMaterialStatusSResponse *_p = ::soap_new__ns1__SetMaterialStatusSResponse(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__SetMaterialStatusSResponse::SetMaterialStatusSResult = SetMaterialStatusSResult; + } + return _p; +} + +inline int soap_write__ns1__SetMaterialStatusSResponse(struct soap *soap, _ns1__SetMaterialStatusSResponse const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusSResponse", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusSResponse ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *URL, _ns1__SetMaterialStatusSResponse const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusSResponse", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusSResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *URL, _ns1__SetMaterialStatusSResponse const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusSResponse", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusSResponse ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *URL, _ns1__SetMaterialStatusSResponse const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusSResponse", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusSResponse ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__SetMaterialStatusSResponse * SOAP_FMAC4 soap_get__ns1__SetMaterialStatusSResponse(struct soap*, _ns1__SetMaterialStatusSResponse *, const char*, const char*); + +inline int soap_read__ns1__SetMaterialStatusSResponse(struct soap *soap, _ns1__SetMaterialStatusSResponse *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__SetMaterialStatusSResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__SetMaterialStatusSResponse(struct soap *soap, const char *URL, _ns1__SetMaterialStatusSResponse *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__SetMaterialStatusSResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__SetMaterialStatusSResponse(struct soap *soap, _ns1__SetMaterialStatusSResponse *p) +{ + if (::soap_read__ns1__SetMaterialStatusSResponse(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__ns1__SetMaterialStatusS_DEFINED +#define SOAP_TYPE__ns1__SetMaterialStatusS_DEFINED +SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SetMaterialStatusS(struct soap*, const char*, int, const _ns1__SetMaterialStatusS *, const char*); +SOAP_FMAC3 _ns1__SetMaterialStatusS * SOAP_FMAC4 soap_in__ns1__SetMaterialStatusS(struct soap*, const char*, _ns1__SetMaterialStatusS *, const char*); +SOAP_FMAC1 _ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusS(struct soap*, int, const char*, const char*, size_t*); + +inline _ns1__SetMaterialStatusS * soap_new__ns1__SetMaterialStatusS(struct soap *soap, int n = -1) +{ + return soap_instantiate__ns1__SetMaterialStatusS(soap, n, NULL, NULL, NULL); +} + +inline _ns1__SetMaterialStatusS * soap_new_req__ns1__SetMaterialStatusS( + struct soap *soap) +{ + _ns1__SetMaterialStatusS *_p = ::soap_new__ns1__SetMaterialStatusS(soap); + if (_p) + { _p->soap_default(soap); + } + return _p; +} + +inline _ns1__SetMaterialStatusS * soap_new_set__ns1__SetMaterialStatusS( + struct soap *soap, + wchar_t *fileName) +{ + _ns1__SetMaterialStatusS *_p = ::soap_new__ns1__SetMaterialStatusS(soap); + if (_p) + { _p->soap_default(soap); + _p->_ns1__SetMaterialStatusS::fileName = fileName; + } + return _p; +} + +inline int soap_write__ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusS", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusS ? "" : NULL) || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT__ns1__SetMaterialStatusS(struct soap *soap, const char *URL, _ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusS", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusS ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__ns1__SetMaterialStatusS(struct soap *soap, const char *URL, _ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusS", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusS ? "" : NULL) || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__ns1__SetMaterialStatusS(struct soap *soap, const char *URL, _ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (p->soap_serialize(soap), 0) || p->soap_put(soap, "ns1:SetMaterialStatusS", p->soap_type() == SOAP_TYPE__ns1__SetMaterialStatusS ? "" : NULL) || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 _ns1__SetMaterialStatusS * SOAP_FMAC4 soap_get__ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS *, const char*, const char*); + +inline int soap_read__ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS *p) +{ + if (p) + { p->soap_default(soap); + if (soap_begin_recv(soap) || ::soap_get__ns1__SetMaterialStatusS(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__ns1__SetMaterialStatusS(struct soap *soap, const char *URL, _ns1__SetMaterialStatusS *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__ns1__SetMaterialStatusS(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusS *p) +{ + if (::soap_read__ns1__SetMaterialStatusS(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_SOAP_ENV__Fault_DEFINED +#define SOAP_TYPE_SOAP_ENV__Fault_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*); +SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*); +SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*); + +inline struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Fault(soap, n, NULL, NULL, NULL); +} + +inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault( + struct soap *soap) +{ + struct SOAP_ENV__Fault *_p = ::soap_new_SOAP_ENV__Fault(soap); + if (_p) + { ::soap_default_SOAP_ENV__Fault(soap, _p); + } + return _p; +} + +inline struct SOAP_ENV__Fault * soap_new_set_SOAP_ENV__Fault( + struct soap *soap, + char *faultcode, + char *faultstring, + char *faultactor, + struct SOAP_ENV__Detail *detail, + struct SOAP_ENV__Code *SOAP_ENV__Code, + struct SOAP_ENV__Reason *SOAP_ENV__Reason, + char *SOAP_ENV__Node, + char *SOAP_ENV__Role, + struct SOAP_ENV__Detail *SOAP_ENV__Detail) +{ + struct SOAP_ENV__Fault *_p = ::soap_new_SOAP_ENV__Fault(soap); + if (_p) + { ::soap_default_SOAP_ENV__Fault(soap, _p); + _p->faultcode = faultcode; + _p->faultstring = faultstring; + _p->faultactor = faultactor; + _p->detail = detail; + _p->SOAP_ENV__Code = SOAP_ENV__Code; + _p->SOAP_ENV__Reason = SOAP_ENV__Reason; + _p->SOAP_ENV__Node = SOAP_ENV__Node; + _p->SOAP_ENV__Role = SOAP_ENV__Role; + _p->SOAP_ENV__Detail = SOAP_ENV__Detail; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*); + +inline int soap_write_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*); + +inline int soap_read_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) +{ + if (p) + { ::soap_default_SOAP_ENV__Fault(soap, p); + if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Fault(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Fault(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) +{ + if (::soap_read_SOAP_ENV__Fault(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_SOAP_ENV__Reason_DEFINED +#define SOAP_TYPE_SOAP_ENV__Reason_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap*, const char*, int, const struct SOAP_ENV__Reason *, const char*); +SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason *, const char*); +SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*); + +inline struct SOAP_ENV__Reason * soap_new_SOAP_ENV__Reason(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Reason(soap, n, NULL, NULL, NULL); +} + +inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason( + struct soap *soap) +{ + struct SOAP_ENV__Reason *_p = ::soap_new_SOAP_ENV__Reason(soap); + if (_p) + { ::soap_default_SOAP_ENV__Reason(soap, _p); + } + return _p; +} + +inline struct SOAP_ENV__Reason * soap_new_set_SOAP_ENV__Reason( + struct soap *soap, + char *SOAP_ENV__Text) +{ + struct SOAP_ENV__Reason *_p = ::soap_new_SOAP_ENV__Reason(soap); + if (_p) + { ::soap_default_SOAP_ENV__Reason(soap, _p); + _p->SOAP_ENV__Text = SOAP_ENV__Text; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *, const char*, const char*); + +inline int soap_write_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*); + +inline int soap_read_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) +{ + if (p) + { ::soap_default_SOAP_ENV__Reason(soap, p); + if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Reason(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Reason(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) +{ + if (::soap_read_SOAP_ENV__Reason(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_SOAP_ENV__Detail_DEFINED +#define SOAP_TYPE_SOAP_ENV__Detail_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*); +SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*); +SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*); + +inline struct SOAP_ENV__Detail * soap_new_SOAP_ENV__Detail(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Detail(soap, n, NULL, NULL, NULL); +} + +inline struct SOAP_ENV__Detail * soap_new_req_SOAP_ENV__Detail( + struct soap *soap, + int __type, + void *fault) +{ + struct SOAP_ENV__Detail *_p = ::soap_new_SOAP_ENV__Detail(soap); + if (_p) + { ::soap_default_SOAP_ENV__Detail(soap, _p); + _p->__type = __type; + _p->fault = fault; + } + return _p; +} + +inline struct SOAP_ENV__Detail * soap_new_set_SOAP_ENV__Detail( + struct soap *soap, + char *__any, + int __type, + void *fault) +{ + struct SOAP_ENV__Detail *_p = ::soap_new_SOAP_ENV__Detail(soap); + if (_p) + { ::soap_default_SOAP_ENV__Detail(soap, _p); + _p->__any = __any; + _p->__type = __type; + _p->fault = fault; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*); + +inline int soap_write_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*); + +inline int soap_read_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) +{ + if (p) + { ::soap_default_SOAP_ENV__Detail(soap, p); + if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Detail(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Detail(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) +{ + if (::soap_read_SOAP_ENV__Detail(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_SOAP_ENV__Code_DEFINED +#define SOAP_TYPE_SOAP_ENV__Code_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*); +SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*); +SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*); + +inline struct SOAP_ENV__Code * soap_new_SOAP_ENV__Code(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Code(soap, n, NULL, NULL, NULL); +} + +inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code( + struct soap *soap) +{ + struct SOAP_ENV__Code *_p = ::soap_new_SOAP_ENV__Code(soap); + if (_p) + { ::soap_default_SOAP_ENV__Code(soap, _p); + } + return _p; +} + +inline struct SOAP_ENV__Code * soap_new_set_SOAP_ENV__Code( + struct soap *soap, + char *SOAP_ENV__Value, + struct SOAP_ENV__Code *SOAP_ENV__Subcode) +{ + struct SOAP_ENV__Code *_p = ::soap_new_SOAP_ENV__Code(soap); + if (_p) + { ::soap_default_SOAP_ENV__Code(soap, _p); + _p->SOAP_ENV__Value = SOAP_ENV__Value; + _p->SOAP_ENV__Subcode = SOAP_ENV__Subcode; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*); + +inline int soap_write_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*); + +inline int soap_read_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) +{ + if (p) + { ::soap_default_SOAP_ENV__Code(soap, p); + if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Code(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Code(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) +{ + if (::soap_read_SOAP_ENV__Code(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_SOAP_ENV__Header_DEFINED +#define SOAP_TYPE_SOAP_ENV__Header_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*); +SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*); +SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*); + +inline struct SOAP_ENV__Header * soap_new_SOAP_ENV__Header(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Header(soap, n, NULL, NULL, NULL); +} + +inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header( + struct soap *soap) +{ + struct SOAP_ENV__Header *_p = ::soap_new_SOAP_ENV__Header(soap); + if (_p) + { ::soap_default_SOAP_ENV__Header(soap, _p); + } + return _p; +} + +inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header( + struct soap *soap) +{ + struct SOAP_ENV__Header *_p = ::soap_new_SOAP_ENV__Header(soap); + if (_p) + { ::soap_default_SOAP_ENV__Header(soap, _p); + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*); + +inline int soap_write_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*); + +inline int soap_read_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) +{ + if (p) + { ::soap_default_SOAP_ENV__Header(soap, p); + if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Header(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Header(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) +{ + if (::soap_read_SOAP_ENV__Header(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +#ifndef SOAP_TYPE___ns1__DeleteClass__DEFINED +#define SOAP_TYPE___ns1__DeleteClass__DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__DeleteClass_(struct soap*, struct __ns1__DeleteClass_ *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__DeleteClass_(struct soap*, const struct __ns1__DeleteClass_ *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__DeleteClass_(struct soap*, const char*, int, const struct __ns1__DeleteClass_ *, const char*); +SOAP_FMAC3 struct __ns1__DeleteClass_ * SOAP_FMAC4 soap_in___ns1__DeleteClass_(struct soap*, const char*, struct __ns1__DeleteClass_ *, const char*); +SOAP_FMAC1 struct __ns1__DeleteClass_ * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass_(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__DeleteClass_ * soap_new___ns1__DeleteClass_(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__DeleteClass_(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__DeleteClass_ * soap_new_req___ns1__DeleteClass_( + struct soap *soap) +{ + struct __ns1__DeleteClass_ *_p = ::soap_new___ns1__DeleteClass_(soap); + if (_p) + { ::soap_default___ns1__DeleteClass_(soap, _p); + } + return _p; +} + +inline struct __ns1__DeleteClass_ * soap_new_set___ns1__DeleteClass_( + struct soap *soap, + _ns1__DeleteClass *ns1__DeleteClass) +{ + struct __ns1__DeleteClass_ *_p = ::soap_new___ns1__DeleteClass_(soap); + if (_p) + { ::soap_default___ns1__DeleteClass_(soap, _p); + _p->ns1__DeleteClass = ns1__DeleteClass; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__DeleteClass_(struct soap*, const struct __ns1__DeleteClass_ *, const char*, const char*); + +inline int soap_write___ns1__DeleteClass_(struct soap *soap, struct __ns1__DeleteClass_ const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__DeleteClass_(soap, p), 0) || ::soap_put___ns1__DeleteClass_(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__DeleteClass_(struct soap *soap, const char *URL, struct __ns1__DeleteClass_ const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass_(soap, p), 0) || ::soap_put___ns1__DeleteClass_(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__DeleteClass_(struct soap *soap, const char *URL, struct __ns1__DeleteClass_ const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass_(soap, p), 0) || ::soap_put___ns1__DeleteClass_(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__DeleteClass_(struct soap *soap, const char *URL, struct __ns1__DeleteClass_ const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass_(soap, p), 0) || ::soap_put___ns1__DeleteClass_(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__DeleteClass_ * SOAP_FMAC4 soap_get___ns1__DeleteClass_(struct soap*, struct __ns1__DeleteClass_ *, const char*, const char*); + +inline int soap_read___ns1__DeleteClass_(struct soap *soap, struct __ns1__DeleteClass_ *p) +{ + if (p) + { ::soap_default___ns1__DeleteClass_(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__DeleteClass_(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__DeleteClass_(struct soap *soap, const char *URL, struct __ns1__DeleteClass_ *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__DeleteClass_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__DeleteClass_(struct soap *soap, struct __ns1__DeleteClass_ *p) +{ + if (::soap_read___ns1__DeleteClass_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__SendToClass__DEFINED +#define SOAP_TYPE___ns1__SendToClass__DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SendToClass_(struct soap*, struct __ns1__SendToClass_ *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SendToClass_(struct soap*, const struct __ns1__SendToClass_ *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SendToClass_(struct soap*, const char*, int, const struct __ns1__SendToClass_ *, const char*); +SOAP_FMAC3 struct __ns1__SendToClass_ * SOAP_FMAC4 soap_in___ns1__SendToClass_(struct soap*, const char*, struct __ns1__SendToClass_ *, const char*); +SOAP_FMAC1 struct __ns1__SendToClass_ * SOAP_FMAC2 soap_instantiate___ns1__SendToClass_(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__SendToClass_ * soap_new___ns1__SendToClass_(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__SendToClass_(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__SendToClass_ * soap_new_req___ns1__SendToClass_( + struct soap *soap) +{ + struct __ns1__SendToClass_ *_p = ::soap_new___ns1__SendToClass_(soap); + if (_p) + { ::soap_default___ns1__SendToClass_(soap, _p); + } + return _p; +} + +inline struct __ns1__SendToClass_ * soap_new_set___ns1__SendToClass_( + struct soap *soap, + _ns1__SendToClass *ns1__SendToClass) +{ + struct __ns1__SendToClass_ *_p = ::soap_new___ns1__SendToClass_(soap); + if (_p) + { ::soap_default___ns1__SendToClass_(soap, _p); + _p->ns1__SendToClass = ns1__SendToClass; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SendToClass_(struct soap*, const struct __ns1__SendToClass_ *, const char*, const char*); + +inline int soap_write___ns1__SendToClass_(struct soap *soap, struct __ns1__SendToClass_ const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__SendToClass_(soap, p), 0) || ::soap_put___ns1__SendToClass_(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__SendToClass_(struct soap *soap, const char *URL, struct __ns1__SendToClass_ const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass_(soap, p), 0) || ::soap_put___ns1__SendToClass_(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__SendToClass_(struct soap *soap, const char *URL, struct __ns1__SendToClass_ const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass_(soap, p), 0) || ::soap_put___ns1__SendToClass_(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__SendToClass_(struct soap *soap, const char *URL, struct __ns1__SendToClass_ const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass_(soap, p), 0) || ::soap_put___ns1__SendToClass_(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__SendToClass_ * SOAP_FMAC4 soap_get___ns1__SendToClass_(struct soap*, struct __ns1__SendToClass_ *, const char*, const char*); + +inline int soap_read___ns1__SendToClass_(struct soap *soap, struct __ns1__SendToClass_ *p) +{ + if (p) + { ::soap_default___ns1__SendToClass_(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__SendToClass_(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__SendToClass_(struct soap *soap, const char *URL, struct __ns1__SendToClass_ *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__SendToClass_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__SendToClass_(struct soap *soap, struct __ns1__SendToClass_ *p) +{ + if (::soap_read___ns1__SendToClass_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__CreateProject__DEFINED +#define SOAP_TYPE___ns1__CreateProject__DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__CreateProject_(struct soap*, struct __ns1__CreateProject_ *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__CreateProject_(struct soap*, const struct __ns1__CreateProject_ *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__CreateProject_(struct soap*, const char*, int, const struct __ns1__CreateProject_ *, const char*); +SOAP_FMAC3 struct __ns1__CreateProject_ * SOAP_FMAC4 soap_in___ns1__CreateProject_(struct soap*, const char*, struct __ns1__CreateProject_ *, const char*); +SOAP_FMAC1 struct __ns1__CreateProject_ * SOAP_FMAC2 soap_instantiate___ns1__CreateProject_(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__CreateProject_ * soap_new___ns1__CreateProject_(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__CreateProject_(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__CreateProject_ * soap_new_req___ns1__CreateProject_( + struct soap *soap) +{ + struct __ns1__CreateProject_ *_p = ::soap_new___ns1__CreateProject_(soap); + if (_p) + { ::soap_default___ns1__CreateProject_(soap, _p); + } + return _p; +} + +inline struct __ns1__CreateProject_ * soap_new_set___ns1__CreateProject_( + struct soap *soap, + _ns1__CreateProject *ns1__CreateProject) +{ + struct __ns1__CreateProject_ *_p = ::soap_new___ns1__CreateProject_(soap); + if (_p) + { ::soap_default___ns1__CreateProject_(soap, _p); + _p->ns1__CreateProject = ns1__CreateProject; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__CreateProject_(struct soap*, const struct __ns1__CreateProject_ *, const char*, const char*); + +inline int soap_write___ns1__CreateProject_(struct soap *soap, struct __ns1__CreateProject_ const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__CreateProject_(soap, p), 0) || ::soap_put___ns1__CreateProject_(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__CreateProject_(struct soap *soap, const char *URL, struct __ns1__CreateProject_ const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject_(soap, p), 0) || ::soap_put___ns1__CreateProject_(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__CreateProject_(struct soap *soap, const char *URL, struct __ns1__CreateProject_ const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject_(soap, p), 0) || ::soap_put___ns1__CreateProject_(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__CreateProject_(struct soap *soap, const char *URL, struct __ns1__CreateProject_ const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject_(soap, p), 0) || ::soap_put___ns1__CreateProject_(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__CreateProject_ * SOAP_FMAC4 soap_get___ns1__CreateProject_(struct soap*, struct __ns1__CreateProject_ *, const char*, const char*); + +inline int soap_read___ns1__CreateProject_(struct soap *soap, struct __ns1__CreateProject_ *p) +{ + if (p) + { ::soap_default___ns1__CreateProject_(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__CreateProject_(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__CreateProject_(struct soap *soap, const char *URL, struct __ns1__CreateProject_ *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__CreateProject_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__CreateProject_(struct soap *soap, struct __ns1__CreateProject_ *p) +{ + if (::soap_read___ns1__CreateProject_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__SetMaterialStatusS__DEFINED +#define SOAP_TYPE___ns1__SetMaterialStatusS__DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SetMaterialStatusS_(struct soap*, struct __ns1__SetMaterialStatusS_ *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SetMaterialStatusS_(struct soap*, const struct __ns1__SetMaterialStatusS_ *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SetMaterialStatusS_(struct soap*, const char*, int, const struct __ns1__SetMaterialStatusS_ *, const char*); +SOAP_FMAC3 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC4 soap_in___ns1__SetMaterialStatusS_(struct soap*, const char*, struct __ns1__SetMaterialStatusS_ *, const char*); +SOAP_FMAC1 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS_(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__SetMaterialStatusS_ * soap_new___ns1__SetMaterialStatusS_(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__SetMaterialStatusS_(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__SetMaterialStatusS_ * soap_new_req___ns1__SetMaterialStatusS_( + struct soap *soap) +{ + struct __ns1__SetMaterialStatusS_ *_p = ::soap_new___ns1__SetMaterialStatusS_(soap); + if (_p) + { ::soap_default___ns1__SetMaterialStatusS_(soap, _p); + } + return _p; +} + +inline struct __ns1__SetMaterialStatusS_ * soap_new_set___ns1__SetMaterialStatusS_( + struct soap *soap, + _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS) +{ + struct __ns1__SetMaterialStatusS_ *_p = ::soap_new___ns1__SetMaterialStatusS_(soap); + if (_p) + { ::soap_default___ns1__SetMaterialStatusS_(soap, _p); + _p->ns1__SetMaterialStatusS = ns1__SetMaterialStatusS; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SetMaterialStatusS_(struct soap*, const struct __ns1__SetMaterialStatusS_ *, const char*, const char*); + +inline int soap_write___ns1__SetMaterialStatusS_(struct soap *soap, struct __ns1__SetMaterialStatusS_ const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__SetMaterialStatusS_(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS_(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__SetMaterialStatusS_(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS_ const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS_(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS_(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__SetMaterialStatusS_(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS_ const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS_(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS_(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__SetMaterialStatusS_(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS_ const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS_(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS_(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__SetMaterialStatusS_ * SOAP_FMAC4 soap_get___ns1__SetMaterialStatusS_(struct soap*, struct __ns1__SetMaterialStatusS_ *, const char*, const char*); + +inline int soap_read___ns1__SetMaterialStatusS_(struct soap *soap, struct __ns1__SetMaterialStatusS_ *p) +{ + if (p) + { ::soap_default___ns1__SetMaterialStatusS_(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__SetMaterialStatusS_(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__SetMaterialStatusS_(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS_ *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__SetMaterialStatusS_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__SetMaterialStatusS_(struct soap *soap, struct __ns1__SetMaterialStatusS_ *p) +{ + if (::soap_read___ns1__SetMaterialStatusS_(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__DeleteClass_DEFINED +#define SOAP_TYPE___ns1__DeleteClass_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__DeleteClass(struct soap*, struct __ns1__DeleteClass *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__DeleteClass(struct soap*, const struct __ns1__DeleteClass *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__DeleteClass(struct soap*, const char*, int, const struct __ns1__DeleteClass *, const char*); +SOAP_FMAC3 struct __ns1__DeleteClass * SOAP_FMAC4 soap_in___ns1__DeleteClass(struct soap*, const char*, struct __ns1__DeleteClass *, const char*); +SOAP_FMAC1 struct __ns1__DeleteClass * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__DeleteClass * soap_new___ns1__DeleteClass(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__DeleteClass(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__DeleteClass * soap_new_req___ns1__DeleteClass( + struct soap *soap) +{ + struct __ns1__DeleteClass *_p = ::soap_new___ns1__DeleteClass(soap); + if (_p) + { ::soap_default___ns1__DeleteClass(soap, _p); + } + return _p; +} + +inline struct __ns1__DeleteClass * soap_new_set___ns1__DeleteClass( + struct soap *soap, + _ns1__DeleteClass *ns1__DeleteClass) +{ + struct __ns1__DeleteClass *_p = ::soap_new___ns1__DeleteClass(soap); + if (_p) + { ::soap_default___ns1__DeleteClass(soap, _p); + _p->ns1__DeleteClass = ns1__DeleteClass; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__DeleteClass(struct soap*, const struct __ns1__DeleteClass *, const char*, const char*); + +inline int soap_write___ns1__DeleteClass(struct soap *soap, struct __ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__DeleteClass(soap, p), 0) || ::soap_put___ns1__DeleteClass(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__DeleteClass(struct soap *soap, const char *URL, struct __ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass(soap, p), 0) || ::soap_put___ns1__DeleteClass(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__DeleteClass(struct soap *soap, const char *URL, struct __ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass(soap, p), 0) || ::soap_put___ns1__DeleteClass(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__DeleteClass(struct soap *soap, const char *URL, struct __ns1__DeleteClass const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__DeleteClass(soap, p), 0) || ::soap_put___ns1__DeleteClass(soap, p, "-ns1:DeleteClass", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__DeleteClass * SOAP_FMAC4 soap_get___ns1__DeleteClass(struct soap*, struct __ns1__DeleteClass *, const char*, const char*); + +inline int soap_read___ns1__DeleteClass(struct soap *soap, struct __ns1__DeleteClass *p) +{ + if (p) + { ::soap_default___ns1__DeleteClass(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__DeleteClass(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__DeleteClass(struct soap *soap, const char *URL, struct __ns1__DeleteClass *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__DeleteClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__DeleteClass(struct soap *soap, struct __ns1__DeleteClass *p) +{ + if (::soap_read___ns1__DeleteClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__SendToClass_DEFINED +#define SOAP_TYPE___ns1__SendToClass_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SendToClass(struct soap*, struct __ns1__SendToClass *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SendToClass(struct soap*, const struct __ns1__SendToClass *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SendToClass(struct soap*, const char*, int, const struct __ns1__SendToClass *, const char*); +SOAP_FMAC3 struct __ns1__SendToClass * SOAP_FMAC4 soap_in___ns1__SendToClass(struct soap*, const char*, struct __ns1__SendToClass *, const char*); +SOAP_FMAC1 struct __ns1__SendToClass * SOAP_FMAC2 soap_instantiate___ns1__SendToClass(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__SendToClass * soap_new___ns1__SendToClass(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__SendToClass(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__SendToClass * soap_new_req___ns1__SendToClass( + struct soap *soap) +{ + struct __ns1__SendToClass *_p = ::soap_new___ns1__SendToClass(soap); + if (_p) + { ::soap_default___ns1__SendToClass(soap, _p); + } + return _p; +} + +inline struct __ns1__SendToClass * soap_new_set___ns1__SendToClass( + struct soap *soap, + _ns1__SendToClass *ns1__SendToClass) +{ + struct __ns1__SendToClass *_p = ::soap_new___ns1__SendToClass(soap); + if (_p) + { ::soap_default___ns1__SendToClass(soap, _p); + _p->ns1__SendToClass = ns1__SendToClass; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SendToClass(struct soap*, const struct __ns1__SendToClass *, const char*, const char*); + +inline int soap_write___ns1__SendToClass(struct soap *soap, struct __ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__SendToClass(soap, p), 0) || ::soap_put___ns1__SendToClass(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__SendToClass(struct soap *soap, const char *URL, struct __ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass(soap, p), 0) || ::soap_put___ns1__SendToClass(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__SendToClass(struct soap *soap, const char *URL, struct __ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass(soap, p), 0) || ::soap_put___ns1__SendToClass(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__SendToClass(struct soap *soap, const char *URL, struct __ns1__SendToClass const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SendToClass(soap, p), 0) || ::soap_put___ns1__SendToClass(soap, p, "-ns1:SendToClass", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__SendToClass * SOAP_FMAC4 soap_get___ns1__SendToClass(struct soap*, struct __ns1__SendToClass *, const char*, const char*); + +inline int soap_read___ns1__SendToClass(struct soap *soap, struct __ns1__SendToClass *p) +{ + if (p) + { ::soap_default___ns1__SendToClass(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__SendToClass(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__SendToClass(struct soap *soap, const char *URL, struct __ns1__SendToClass *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__SendToClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__SendToClass(struct soap *soap, struct __ns1__SendToClass *p) +{ + if (::soap_read___ns1__SendToClass(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__CreateProject_DEFINED +#define SOAP_TYPE___ns1__CreateProject_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__CreateProject(struct soap*, struct __ns1__CreateProject *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__CreateProject(struct soap*, const struct __ns1__CreateProject *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__CreateProject(struct soap*, const char*, int, const struct __ns1__CreateProject *, const char*); +SOAP_FMAC3 struct __ns1__CreateProject * SOAP_FMAC4 soap_in___ns1__CreateProject(struct soap*, const char*, struct __ns1__CreateProject *, const char*); +SOAP_FMAC1 struct __ns1__CreateProject * SOAP_FMAC2 soap_instantiate___ns1__CreateProject(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__CreateProject * soap_new___ns1__CreateProject(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__CreateProject(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__CreateProject * soap_new_req___ns1__CreateProject( + struct soap *soap) +{ + struct __ns1__CreateProject *_p = ::soap_new___ns1__CreateProject(soap); + if (_p) + { ::soap_default___ns1__CreateProject(soap, _p); + } + return _p; +} + +inline struct __ns1__CreateProject * soap_new_set___ns1__CreateProject( + struct soap *soap, + _ns1__CreateProject *ns1__CreateProject) +{ + struct __ns1__CreateProject *_p = ::soap_new___ns1__CreateProject(soap); + if (_p) + { ::soap_default___ns1__CreateProject(soap, _p); + _p->ns1__CreateProject = ns1__CreateProject; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__CreateProject(struct soap*, const struct __ns1__CreateProject *, const char*, const char*); + +inline int soap_write___ns1__CreateProject(struct soap *soap, struct __ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__CreateProject(soap, p), 0) || ::soap_put___ns1__CreateProject(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__CreateProject(struct soap *soap, const char *URL, struct __ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject(soap, p), 0) || ::soap_put___ns1__CreateProject(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__CreateProject(struct soap *soap, const char *URL, struct __ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject(soap, p), 0) || ::soap_put___ns1__CreateProject(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__CreateProject(struct soap *soap, const char *URL, struct __ns1__CreateProject const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__CreateProject(soap, p), 0) || ::soap_put___ns1__CreateProject(soap, p, "-ns1:CreateProject", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__CreateProject * SOAP_FMAC4 soap_get___ns1__CreateProject(struct soap*, struct __ns1__CreateProject *, const char*, const char*); + +inline int soap_read___ns1__CreateProject(struct soap *soap, struct __ns1__CreateProject *p) +{ + if (p) + { ::soap_default___ns1__CreateProject(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__CreateProject(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__CreateProject(struct soap *soap, const char *URL, struct __ns1__CreateProject *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__CreateProject(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__CreateProject(struct soap *soap, struct __ns1__CreateProject *p) +{ + if (::soap_read___ns1__CreateProject(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE___ns1__SetMaterialStatusS_DEFINED +#define SOAP_TYPE___ns1__SetMaterialStatusS_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__SetMaterialStatusS(struct soap*, struct __ns1__SetMaterialStatusS *); +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__SetMaterialStatusS(struct soap*, const struct __ns1__SetMaterialStatusS *); +SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__SetMaterialStatusS(struct soap*, const char*, int, const struct __ns1__SetMaterialStatusS *, const char*); +SOAP_FMAC3 struct __ns1__SetMaterialStatusS * SOAP_FMAC4 soap_in___ns1__SetMaterialStatusS(struct soap*, const char*, struct __ns1__SetMaterialStatusS *, const char*); +SOAP_FMAC1 struct __ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS(struct soap*, int, const char*, const char*, size_t*); + +inline struct __ns1__SetMaterialStatusS * soap_new___ns1__SetMaterialStatusS(struct soap *soap, int n = -1) +{ + return soap_instantiate___ns1__SetMaterialStatusS(soap, n, NULL, NULL, NULL); +} + +inline struct __ns1__SetMaterialStatusS * soap_new_req___ns1__SetMaterialStatusS( + struct soap *soap) +{ + struct __ns1__SetMaterialStatusS *_p = ::soap_new___ns1__SetMaterialStatusS(soap); + if (_p) + { ::soap_default___ns1__SetMaterialStatusS(soap, _p); + } + return _p; +} + +inline struct __ns1__SetMaterialStatusS * soap_new_set___ns1__SetMaterialStatusS( + struct soap *soap, + _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS) +{ + struct __ns1__SetMaterialStatusS *_p = ::soap_new___ns1__SetMaterialStatusS(soap); + if (_p) + { ::soap_default___ns1__SetMaterialStatusS(soap, _p); + _p->ns1__SetMaterialStatusS = ns1__SetMaterialStatusS; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__SetMaterialStatusS(struct soap*, const struct __ns1__SetMaterialStatusS *, const char*, const char*); + +inline int soap_write___ns1__SetMaterialStatusS(struct soap *soap, struct __ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_begin_send(soap) || (::soap_serialize___ns1__SetMaterialStatusS(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap)) + return soap->error; + return SOAP_OK; +} + +inline int soap_PUT___ns1__SetMaterialStatusS(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH___ns1__SetMaterialStatusS(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send___ns1__SetMaterialStatusS(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize___ns1__SetMaterialStatusS(soap, p), 0) || ::soap_put___ns1__SetMaterialStatusS(soap, p, "-ns1:SetMaterialStatusS", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 struct __ns1__SetMaterialStatusS * SOAP_FMAC4 soap_get___ns1__SetMaterialStatusS(struct soap*, struct __ns1__SetMaterialStatusS *, const char*, const char*); + +inline int soap_read___ns1__SetMaterialStatusS(struct soap *soap, struct __ns1__SetMaterialStatusS *p) +{ + if (p) + { ::soap_default___ns1__SetMaterialStatusS(soap, p); + if (soap_begin_recv(soap) || ::soap_get___ns1__SetMaterialStatusS(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET___ns1__SetMaterialStatusS(struct soap *soap, const char *URL, struct __ns1__SetMaterialStatusS *p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read___ns1__SetMaterialStatusS(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv___ns1__SetMaterialStatusS(struct soap *soap, struct __ns1__SetMaterialStatusS *p) +{ + if (::soap_read___ns1__SetMaterialStatusS(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap*, const char *, int, struct SOAP_ENV__Reason *const*, const char *); +SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*, const char*, const char*); +SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason **, const char*, const char*); +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *); +SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*); +SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*); +#endif + +#endif + +#ifndef WITH_NOGLOBAL + +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *); +SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*); +SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*); +#endif + +#endif + +#ifndef SOAP_TYPE_PointerTo_ns1__DeleteClass_DEFINED +#define SOAP_TYPE_PointerTo_ns1__DeleteClass_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__DeleteClass(struct soap*, _ns1__DeleteClass *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__DeleteClass(struct soap*, const char *, int, _ns1__DeleteClass *const*, const char *); +SOAP_FMAC3 _ns1__DeleteClass ** SOAP_FMAC4 soap_in_PointerTo_ns1__DeleteClass(struct soap*, const char*, _ns1__DeleteClass **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__DeleteClass(struct soap*, _ns1__DeleteClass *const*, const char*, const char*); +SOAP_FMAC3 _ns1__DeleteClass ** SOAP_FMAC4 soap_get_PointerTo_ns1__DeleteClass(struct soap*, _ns1__DeleteClass **, const char*, const char*); +#endif + +#ifndef SOAP_TYPE_PointerTo_ns1__SendToClass_DEFINED +#define SOAP_TYPE_PointerTo_ns1__SendToClass_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__SendToClass(struct soap*, _ns1__SendToClass *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__SendToClass(struct soap*, const char *, int, _ns1__SendToClass *const*, const char *); +SOAP_FMAC3 _ns1__SendToClass ** SOAP_FMAC4 soap_in_PointerTo_ns1__SendToClass(struct soap*, const char*, _ns1__SendToClass **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__SendToClass(struct soap*, _ns1__SendToClass *const*, const char*, const char*); +SOAP_FMAC3 _ns1__SendToClass ** SOAP_FMAC4 soap_get_PointerTo_ns1__SendToClass(struct soap*, _ns1__SendToClass **, const char*, const char*); +#endif + +#ifndef SOAP_TYPE_PointerTo_ns1__CreateProject_DEFINED +#define SOAP_TYPE_PointerTo_ns1__CreateProject_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__CreateProject(struct soap*, _ns1__CreateProject *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__CreateProject(struct soap*, const char *, int, _ns1__CreateProject *const*, const char *); +SOAP_FMAC3 _ns1__CreateProject ** SOAP_FMAC4 soap_in_PointerTo_ns1__CreateProject(struct soap*, const char*, _ns1__CreateProject **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__CreateProject(struct soap*, _ns1__CreateProject *const*, const char*, const char*); +SOAP_FMAC3 _ns1__CreateProject ** SOAP_FMAC4 soap_get_PointerTo_ns1__CreateProject(struct soap*, _ns1__CreateProject **, const char*, const char*); +#endif + +#ifndef SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS_DEFINED +#define SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS *const*); +SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__SetMaterialStatusS(struct soap*, const char *, int, _ns1__SetMaterialStatusS *const*, const char *); +SOAP_FMAC3 _ns1__SetMaterialStatusS ** SOAP_FMAC4 soap_in_PointerTo_ns1__SetMaterialStatusS(struct soap*, const char*, _ns1__SetMaterialStatusS **, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS *const*, const char*, const char*); +SOAP_FMAC3 _ns1__SetMaterialStatusS ** SOAP_FMAC4 soap_get_PointerTo_ns1__SetMaterialStatusS(struct soap*, _ns1__SetMaterialStatusS **, const char*, const char*); +#endif + +#ifndef SOAP_TYPE_wstring_DEFINED +#define SOAP_TYPE_wstring_DEFINED + +inline void soap_default_wstring(struct soap *soap, wchar_t **a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT_wstring + *a = SOAP_DEFAULT_wstring; +#else + *a = (wchar_t *)0; +#endif +} +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_wstring(struct soap*, wchar_t *const*); + +#define soap_wstring2s(soap, a) soap_wchar2s((soap), (a)) +SOAP_FMAC3 int SOAP_FMAC4 soap_out_wstring(struct soap*, const char*, int, wchar_t*const*, const char*); + +#define soap_s2wstring(soap, s, a) soap_s2wchar((soap), (s), (wchar_t**)(a), 1, 0, -1, NULL) +SOAP_FMAC3 wchar_t * * SOAP_FMAC4 soap_in_wstring(struct soap*, const char*, wchar_t **, const char*); + +SOAP_FMAC3 wchar_t * * SOAP_FMAC4 soap_new_wstring(struct soap *soap, int n = -1); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_wstring(struct soap*, wchar_t *const*, const char*, const char*); + +inline int soap_write_wstring(struct soap *soap, wchar_t *const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || ::soap_put_wstring(soap, p, "string", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_PUT_wstring(struct soap *soap, const char *URL, wchar_t *const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_wstring(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_wstring(struct soap *soap, const char *URL, wchar_t *const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_wstring(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_wstring(struct soap *soap, const char *URL, wchar_t *const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_wstring(soap, p, "string", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 wchar_t ** SOAP_FMAC4 soap_get_wstring(struct soap*, wchar_t **, const char*, const char*); + +inline int soap_read_wstring(struct soap *soap, wchar_t **p) +{ + if (p) + { if (soap_begin_recv(soap) || ::soap_get_wstring(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_wstring(struct soap *soap, const char *URL, wchar_t **p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_wstring(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_wstring(struct soap *soap, wchar_t **p) +{ + if (::soap_read_wstring(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__QName_DEFINED +#define SOAP_TYPE__QName_DEFINED + +inline void soap_default__QName(struct soap *soap, char **a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT__QName + *a = SOAP_DEFAULT__QName; +#else + *a = (char *)0; +#endif +} +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*); + +#define soap__QName2s(soap, a) soap_QName2s(soap, (a)) +SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*); + +#define soap_s2_QName(soap, s, a) soap_s2QName((soap), (s), (char**)(a), 0, -1, NULL) +SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*); + +#define soap_instantiate__QName soap_instantiate_string + + +#define soap_new__QName soap_new_string + +SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*); + +inline int soap_write__QName(struct soap *soap, char *const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_PUT__QName(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH__QName(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send__QName(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*); + +inline int soap_read__QName(struct soap *soap, char **p) +{ + if (p) + { if (soap_begin_recv(soap) || ::soap_get__QName(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET__QName(struct soap *soap, const char *URL, char **p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read__QName(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv__QName(struct soap *soap, char **p) +{ + if (::soap_read__QName(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#ifndef SOAP_TYPE__XML_DEFINED +#define SOAP_TYPE__XML_DEFINED +#endif + +#ifndef SOAP_TYPE_string_DEFINED +#define SOAP_TYPE_string_DEFINED + +inline void soap_default_string(struct soap *soap, char **a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT_string + *a = SOAP_DEFAULT_string; +#else + *a = (char *)0; +#endif +} +SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*); + +#define soap_string2s(soap, a) (a) +SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*); + +#define soap_s2string(soap, s, a) soap_s2char((soap), (s), (char**)(a), 1, 0, -1, NULL) +SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*); + +SOAP_FMAC3 char * * SOAP_FMAC4 soap_new_string(struct soap *soap, int n = -1); +SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*); + +inline int soap_write_string(struct soap *soap, char *const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_PUT_string(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_PATCH_string(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) + return soap_closesock(soap); + return SOAP_OK; +} + +inline int soap_POST_send_string(struct soap *soap, const char *URL, char *const*p) +{ + soap_free_temp(soap); + if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap)) + return soap_closesock(soap); + return SOAP_OK; +} +SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*); + +inline int soap_read_string(struct soap *soap, char **p) +{ + if (p) + { if (soap_begin_recv(soap) || ::soap_get_string(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} + +inline int soap_GET_string(struct soap *soap, const char *URL, char **p) +{ + if (soap_GET(soap, URL, NULL) || ::soap_read_string(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} + +inline int soap_POST_recv_string(struct soap *soap, char **p) +{ + if (::soap_read_string(soap, p)) + return soap_closesock(soap); + return soap_closesock(soap); +} +#endif + +#endif + +/* End of soapH.h */ diff --git a/jf_itk/sendTOClass/soapStub.h b/jf_itk/sendTOClass/soapStub.h new file mode 100644 index 0000000..54393bd --- /dev/null +++ b/jf_itk/sendTOClass/soapStub.h @@ -0,0 +1,838 @@ +/* soapStub.h + Generated by gSOAP 2.8.103 for .\sendToClass.h + +gSOAP XML Web services tools +Copyright (C) 2000-2020, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. +This program is released under the GPL with the additional exemption that +compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- +*/ + +#include +#define SOAP_NAMESPACE_OF_ns1 "http://tempuri.org/" + +#ifndef soapStub_H +#define soapStub_H +#include "stdsoap2.h" +#if GSOAP_VERSION != 208103 +# error "GSOAP VERSION 208103 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE" +#endif + + +/******************************************************************************\ + * * + * Types with Custom Serializers * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Classes, Structs and Unions * + * * +\******************************************************************************/ + +class _ns1__SetMaterialStatusS; /* .\sendToClass.h:159 */ +class _ns1__SetMaterialStatusSResponse; /* .\sendToClass.h:161 */ +class _ns1__CreateProject; /* .\sendToClass.h:163 */ +class _ns1__CreateProjectResponse; /* .\sendToClass.h:165 */ +class _ns1__SendToClass; /* .\sendToClass.h:167 */ +class _ns1__SendToClassResponse; /* .\sendToClass.h:169 */ +class _ns1__DeleteClass; /* .\sendToClass.h:171 */ +class _ns1__DeleteClassResponse; /* .\sendToClass.h:173 */ +struct __ns1__SetMaterialStatusS; /* .\sendToClass.h:528 */ +struct __ns1__CreateProject; /* .\sendToClass.h:599 */ +struct __ns1__SendToClass; /* .\sendToClass.h:670 */ +struct __ns1__DeleteClass; /* .\sendToClass.h:741 */ +struct __ns1__SetMaterialStatusS_; /* .\sendToClass.h:812 */ +struct __ns1__CreateProject_; /* .\sendToClass.h:883 */ +struct __ns1__SendToClass_; /* .\sendToClass.h:954 */ +struct __ns1__DeleteClass_; /* .\sendToClass.h:1025 */ + +/* .\sendToClass.h:159 */ +#ifndef SOAP_TYPE__ns1__SetMaterialStatusS +#define SOAP_TYPE__ns1__SetMaterialStatusS (8) +/* complex XML schema type 'ns1:SetMaterialStatusS': */ +class SOAP_CMAC _ns1__SetMaterialStatusS { + public: + /// Optional element 'ns1:fileName' of XML schema type 'xsd:string' + wchar_t *fileName; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__SetMaterialStatusS + virtual long soap_type(void) const { return SOAP_TYPE__ns1__SetMaterialStatusS; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__SetMaterialStatusS, default initialized and not managed by a soap context + virtual _ns1__SetMaterialStatusS *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__SetMaterialStatusS); } + public: + /// Constructor with default initializations + _ns1__SetMaterialStatusS() : fileName(), soap() { } + virtual ~_ns1__SetMaterialStatusS() { } + /// Friend allocator used by soap_new__ns1__SetMaterialStatusS(struct soap*, int) + friend SOAP_FMAC1 _ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusS(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:161 */ +#ifndef SOAP_TYPE__ns1__SetMaterialStatusSResponse +#define SOAP_TYPE__ns1__SetMaterialStatusSResponse (9) +/* complex XML schema type 'ns1:SetMaterialStatusSResponse': */ +class SOAP_CMAC _ns1__SetMaterialStatusSResponse { + public: + /// Optional element 'ns1:SetMaterialStatusSResult' of XML schema type 'xsd:string' + wchar_t *SetMaterialStatusSResult; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__SetMaterialStatusSResponse + virtual long soap_type(void) const { return SOAP_TYPE__ns1__SetMaterialStatusSResponse; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__SetMaterialStatusSResponse, default initialized and not managed by a soap context + virtual _ns1__SetMaterialStatusSResponse *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__SetMaterialStatusSResponse); } + public: + /// Constructor with default initializations + _ns1__SetMaterialStatusSResponse() : SetMaterialStatusSResult(), soap() { } + virtual ~_ns1__SetMaterialStatusSResponse() { } + /// Friend allocator used by soap_new__ns1__SetMaterialStatusSResponse(struct soap*, int) + friend SOAP_FMAC1 _ns1__SetMaterialStatusSResponse * SOAP_FMAC2 soap_instantiate__ns1__SetMaterialStatusSResponse(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:163 */ +#ifndef SOAP_TYPE__ns1__CreateProject +#define SOAP_TYPE__ns1__CreateProject (10) +/* complex XML schema type 'ns1:CreateProject': */ +class SOAP_CMAC _ns1__CreateProject { + public: + /// Optional element 'ns1:projJsonString' of XML schema type 'xsd:string' + wchar_t *projJsonString; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__CreateProject + virtual long soap_type(void) const { return SOAP_TYPE__ns1__CreateProject; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__CreateProject, default initialized and not managed by a soap context + virtual _ns1__CreateProject *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__CreateProject); } + public: + /// Constructor with default initializations + _ns1__CreateProject() : projJsonString(), soap() { } + virtual ~_ns1__CreateProject() { } + /// Friend allocator used by soap_new__ns1__CreateProject(struct soap*, int) + friend SOAP_FMAC1 _ns1__CreateProject * SOAP_FMAC2 soap_instantiate__ns1__CreateProject(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:165 */ +#ifndef SOAP_TYPE__ns1__CreateProjectResponse +#define SOAP_TYPE__ns1__CreateProjectResponse (11) +/* complex XML schema type 'ns1:CreateProjectResponse': */ +class SOAP_CMAC _ns1__CreateProjectResponse { + public: + /// Optional element 'ns1:CreateProjectResult' of XML schema type 'xsd:string' + wchar_t *CreateProjectResult; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__CreateProjectResponse + virtual long soap_type(void) const { return SOAP_TYPE__ns1__CreateProjectResponse; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__CreateProjectResponse, default initialized and not managed by a soap context + virtual _ns1__CreateProjectResponse *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__CreateProjectResponse); } + public: + /// Constructor with default initializations + _ns1__CreateProjectResponse() : CreateProjectResult(), soap() { } + virtual ~_ns1__CreateProjectResponse() { } + /// Friend allocator used by soap_new__ns1__CreateProjectResponse(struct soap*, int) + friend SOAP_FMAC1 _ns1__CreateProjectResponse * SOAP_FMAC2 soap_instantiate__ns1__CreateProjectResponse(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:167 */ +#ifndef SOAP_TYPE__ns1__SendToClass +#define SOAP_TYPE__ns1__SendToClass (12) +/* complex XML schema type 'ns1:SendToClass': */ +class SOAP_CMAC _ns1__SendToClass { + public: + /// Optional element 'ns1:wsoPuiid' of XML schema type 'xsd:string' + wchar_t *wsoPuiid; + /// Optional element 'ns1:classID' of XML schema type 'xsd:string' + wchar_t *classID; + /// Optional element 'ns1:JsonContainer' of XML schema type 'xsd:string' + wchar_t *JsonContainer; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__SendToClass + virtual long soap_type(void) const { return SOAP_TYPE__ns1__SendToClass; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__SendToClass, default initialized and not managed by a soap context + virtual _ns1__SendToClass *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__SendToClass); } + public: + /// Constructor with default initializations + _ns1__SendToClass() : wsoPuiid(), classID(), JsonContainer(), soap() { } + virtual ~_ns1__SendToClass() { } + /// Friend allocator used by soap_new__ns1__SendToClass(struct soap*, int) + friend SOAP_FMAC1 _ns1__SendToClass * SOAP_FMAC2 soap_instantiate__ns1__SendToClass(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:169 */ +#ifndef SOAP_TYPE__ns1__SendToClassResponse +#define SOAP_TYPE__ns1__SendToClassResponse (13) +/* complex XML schema type 'ns1:SendToClassResponse': */ +class SOAP_CMAC _ns1__SendToClassResponse { + public: + /// Optional element 'ns1:SendToClassResult' of XML schema type 'xsd:string' + wchar_t *SendToClassResult; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__SendToClassResponse + virtual long soap_type(void) const { return SOAP_TYPE__ns1__SendToClassResponse; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__SendToClassResponse, default initialized and not managed by a soap context + virtual _ns1__SendToClassResponse *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__SendToClassResponse); } + public: + /// Constructor with default initializations + _ns1__SendToClassResponse() : SendToClassResult(), soap() { } + virtual ~_ns1__SendToClassResponse() { } + /// Friend allocator used by soap_new__ns1__SendToClassResponse(struct soap*, int) + friend SOAP_FMAC1 _ns1__SendToClassResponse * SOAP_FMAC2 soap_instantiate__ns1__SendToClassResponse(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:171 */ +#ifndef SOAP_TYPE__ns1__DeleteClass +#define SOAP_TYPE__ns1__DeleteClass (14) +/* complex XML schema type 'ns1:DeleteClass': */ +class SOAP_CMAC _ns1__DeleteClass { + public: + /// Optional element 'ns1:icoPuid' of XML schema type 'xsd:string' + wchar_t *icoPuid; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__DeleteClass + virtual long soap_type(void) const { return SOAP_TYPE__ns1__DeleteClass; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__DeleteClass, default initialized and not managed by a soap context + virtual _ns1__DeleteClass *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__DeleteClass); } + public: + /// Constructor with default initializations + _ns1__DeleteClass() : icoPuid(), soap() { } + virtual ~_ns1__DeleteClass() { } + /// Friend allocator used by soap_new__ns1__DeleteClass(struct soap*, int) + friend SOAP_FMAC1 _ns1__DeleteClass * SOAP_FMAC2 soap_instantiate__ns1__DeleteClass(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:173 */ +#ifndef SOAP_TYPE__ns1__DeleteClassResponse +#define SOAP_TYPE__ns1__DeleteClassResponse (15) +/* complex XML schema type 'ns1:DeleteClassResponse': */ +class SOAP_CMAC _ns1__DeleteClassResponse { + public: + /// Optional element 'ns1:DeleteClassResult' of XML schema type 'xsd:string' + wchar_t *DeleteClassResult; + /// Context that manages this object + struct soap *soap; + public: + /// Return unique type id SOAP_TYPE__ns1__DeleteClassResponse + virtual long soap_type(void) const { return SOAP_TYPE__ns1__DeleteClassResponse; } + /// (Re)set members to default values + virtual void soap_default(struct soap*); + /// Serialize object to prepare for SOAP 1.1/1.2 encoded output (or with SOAP_XML_GRAPH) by analyzing its (cyclic) structures + virtual void soap_serialize(struct soap*) const; + /// Output object in XML, compliant with SOAP 1.1 encoding style, return error code or SOAP_OK + virtual int soap_put(struct soap*, const char *tag, const char *type) const; + /// Output object in XML, with tag and optional id attribute and xsi:type, return error code or SOAP_OK + virtual int soap_out(struct soap*, const char *tag, int id, const char *type) const; + /// Get object from XML, compliant with SOAP 1.1 encoding style, return pointer to object or NULL on error + virtual void *soap_get(struct soap*, const char *tag, const char *type); + /// Get object from XML, with matching tag and type (NULL matches any tag and type), return pointer to object or NULL on error + virtual void *soap_in(struct soap*, const char *tag, const char *type); + /// Return a new object of type _ns1__DeleteClassResponse, default initialized and not managed by a soap context + virtual _ns1__DeleteClassResponse *soap_alloc(void) const { return SOAP_NEW_UNMANAGED(_ns1__DeleteClassResponse); } + public: + /// Constructor with default initializations + _ns1__DeleteClassResponse() : DeleteClassResult(), soap() { } + virtual ~_ns1__DeleteClassResponse() { } + /// Friend allocator used by soap_new__ns1__DeleteClassResponse(struct soap*, int) + friend SOAP_FMAC1 _ns1__DeleteClassResponse * SOAP_FMAC2 soap_instantiate__ns1__DeleteClassResponse(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:528 */ +#ifndef SOAP_TYPE___ns1__SetMaterialStatusS +#define SOAP_TYPE___ns1__SetMaterialStatusS (22) +/* Wrapper: */ +struct SOAP_CMAC __ns1__SetMaterialStatusS { + public: + /** Optional element 'ns1:SetMaterialStatusS' of XML schema type 'ns1:SetMaterialStatusS' */ + _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS; + public: + /** Return unique type id SOAP_TYPE___ns1__SetMaterialStatusS */ + long soap_type() const { return SOAP_TYPE___ns1__SetMaterialStatusS; } + /** Constructor with member initializations */ + __ns1__SetMaterialStatusS() : ns1__SetMaterialStatusS() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__SetMaterialStatusS * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:599 */ +#ifndef SOAP_TYPE___ns1__CreateProject +#define SOAP_TYPE___ns1__CreateProject (26) +/* Wrapper: */ +struct SOAP_CMAC __ns1__CreateProject { + public: + /** Optional element 'ns1:CreateProject' of XML schema type 'ns1:CreateProject' */ + _ns1__CreateProject *ns1__CreateProject; + public: + /** Return unique type id SOAP_TYPE___ns1__CreateProject */ + long soap_type() const { return SOAP_TYPE___ns1__CreateProject; } + /** Constructor with member initializations */ + __ns1__CreateProject() : ns1__CreateProject() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__CreateProject * SOAP_FMAC2 soap_instantiate___ns1__CreateProject(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:670 */ +#ifndef SOAP_TYPE___ns1__SendToClass +#define SOAP_TYPE___ns1__SendToClass (30) +/* Wrapper: */ +struct SOAP_CMAC __ns1__SendToClass { + public: + /** Optional element 'ns1:SendToClass' of XML schema type 'ns1:SendToClass' */ + _ns1__SendToClass *ns1__SendToClass; + public: + /** Return unique type id SOAP_TYPE___ns1__SendToClass */ + long soap_type() const { return SOAP_TYPE___ns1__SendToClass; } + /** Constructor with member initializations */ + __ns1__SendToClass() : ns1__SendToClass() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__SendToClass * SOAP_FMAC2 soap_instantiate___ns1__SendToClass(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:741 */ +#ifndef SOAP_TYPE___ns1__DeleteClass +#define SOAP_TYPE___ns1__DeleteClass (34) +/* Wrapper: */ +struct SOAP_CMAC __ns1__DeleteClass { + public: + /** Optional element 'ns1:DeleteClass' of XML schema type 'ns1:DeleteClass' */ + _ns1__DeleteClass *ns1__DeleteClass; + public: + /** Return unique type id SOAP_TYPE___ns1__DeleteClass */ + long soap_type() const { return SOAP_TYPE___ns1__DeleteClass; } + /** Constructor with member initializations */ + __ns1__DeleteClass() : ns1__DeleteClass() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__DeleteClass * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:812 */ +#ifndef SOAP_TYPE___ns1__SetMaterialStatusS_ +#define SOAP_TYPE___ns1__SetMaterialStatusS_ (36) +/* Wrapper: */ +struct SOAP_CMAC __ns1__SetMaterialStatusS_ { + public: + /** Optional element 'ns1:SetMaterialStatusS' of XML schema type 'ns1:SetMaterialStatusS' */ + _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS; + public: + /** Return unique type id SOAP_TYPE___ns1__SetMaterialStatusS_ */ + long soap_type() const { return SOAP_TYPE___ns1__SetMaterialStatusS_; } + /** Constructor with member initializations */ + __ns1__SetMaterialStatusS_() : ns1__SetMaterialStatusS() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__SetMaterialStatusS_ * SOAP_FMAC2 soap_instantiate___ns1__SetMaterialStatusS_(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:883 */ +#ifndef SOAP_TYPE___ns1__CreateProject_ +#define SOAP_TYPE___ns1__CreateProject_ (38) +/* Wrapper: */ +struct SOAP_CMAC __ns1__CreateProject_ { + public: + /** Optional element 'ns1:CreateProject' of XML schema type 'ns1:CreateProject' */ + _ns1__CreateProject *ns1__CreateProject; + public: + /** Return unique type id SOAP_TYPE___ns1__CreateProject_ */ + long soap_type() const { return SOAP_TYPE___ns1__CreateProject_; } + /** Constructor with member initializations */ + __ns1__CreateProject_() : ns1__CreateProject() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__CreateProject_ * SOAP_FMAC2 soap_instantiate___ns1__CreateProject_(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:954 */ +#ifndef SOAP_TYPE___ns1__SendToClass_ +#define SOAP_TYPE___ns1__SendToClass_ (40) +/* Wrapper: */ +struct SOAP_CMAC __ns1__SendToClass_ { + public: + /** Optional element 'ns1:SendToClass' of XML schema type 'ns1:SendToClass' */ + _ns1__SendToClass *ns1__SendToClass; + public: + /** Return unique type id SOAP_TYPE___ns1__SendToClass_ */ + long soap_type() const { return SOAP_TYPE___ns1__SendToClass_; } + /** Constructor with member initializations */ + __ns1__SendToClass_() : ns1__SendToClass() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__SendToClass_ * SOAP_FMAC2 soap_instantiate___ns1__SendToClass_(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:1025 */ +#ifndef SOAP_TYPE___ns1__DeleteClass_ +#define SOAP_TYPE___ns1__DeleteClass_ (42) +/* Wrapper: */ +struct SOAP_CMAC __ns1__DeleteClass_ { + public: + /** Optional element 'ns1:DeleteClass' of XML schema type 'ns1:DeleteClass' */ + _ns1__DeleteClass *ns1__DeleteClass; + public: + /** Return unique type id SOAP_TYPE___ns1__DeleteClass_ */ + long soap_type() const { return SOAP_TYPE___ns1__DeleteClass_; } + /** Constructor with member initializations */ + __ns1__DeleteClass_() : ns1__DeleteClass() { } + /** Friend allocator */ + friend SOAP_FMAC1 __ns1__DeleteClass_ * SOAP_FMAC2 soap_instantiate___ns1__DeleteClass_(struct soap*, int, const char*, const char*, size_t*); +}; +#endif + +/* .\sendToClass.h:1206 */ +#ifndef WITH_NOGLOBAL +#ifndef SOAP_TYPE_SOAP_ENV__Header +#define SOAP_TYPE_SOAP_ENV__Header (43) +/* SOAP_ENV__Header: */ +struct SOAP_CMAC SOAP_ENV__Header { + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Header */ + long soap_type() const { return SOAP_TYPE_SOAP_ENV__Header; } + /** Constructor with member initializations */ + SOAP_ENV__Header() { } + /** Friend allocator */ + friend SOAP_FMAC1 SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*); +}; +#endif +#endif + +/* .\sendToClass.h:1206 */ +#ifndef WITH_NOGLOBAL +#ifndef SOAP_TYPE_SOAP_ENV__Code +#define SOAP_TYPE_SOAP_ENV__Code (44) +/* Type SOAP_ENV__Code is a recursive data type, (in)directly referencing itself through its (base or derived class) members */ +/* SOAP_ENV__Code: */ +struct SOAP_CMAC SOAP_ENV__Code { + public: + /** Optional element 'SOAP-ENV:Value' of XML schema type 'xsd:QName' */ + char *SOAP_ENV__Value; + /** Optional element 'SOAP-ENV:Subcode' of XML schema type 'SOAP-ENV:Code' */ + struct SOAP_ENV__Code *SOAP_ENV__Subcode; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Code */ + long soap_type() const { return SOAP_TYPE_SOAP_ENV__Code; } + /** Constructor with member initializations */ + SOAP_ENV__Code() : SOAP_ENV__Value(), SOAP_ENV__Subcode() { } + /** Friend allocator */ + friend SOAP_FMAC1 SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*); +}; +#endif +#endif + +/* .\sendToClass.h:1206 */ +#ifndef WITH_NOGLOBAL +#ifndef SOAP_TYPE_SOAP_ENV__Detail +#define SOAP_TYPE_SOAP_ENV__Detail (46) +/* SOAP_ENV__Detail: */ +struct SOAP_CMAC SOAP_ENV__Detail { + public: + char *__any; + /** Any type of element 'fault' assigned to fault with its SOAP_TYPE_ assigned to __type */ + /** Do not create a cyclic data structure through this member unless SOAP encoding or SOAP_XML_GRAPH are used for id-ref serialization */ + int __type; + void *fault; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Detail */ + long soap_type() const { return SOAP_TYPE_SOAP_ENV__Detail; } + /** Constructor with member initializations */ + SOAP_ENV__Detail() : __any(), __type(), fault() { } + /** Friend allocator */ + friend SOAP_FMAC1 SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*); +}; +#endif +#endif + +/* .\sendToClass.h:1206 */ +#ifndef WITH_NOGLOBAL +#ifndef SOAP_TYPE_SOAP_ENV__Reason +#define SOAP_TYPE_SOAP_ENV__Reason (49) +/* SOAP_ENV__Reason: */ +struct SOAP_CMAC SOAP_ENV__Reason { + public: + /** Optional element 'SOAP-ENV:Text' of XML schema type 'xsd:string' */ + char *SOAP_ENV__Text; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Reason */ + long soap_type() const { return SOAP_TYPE_SOAP_ENV__Reason; } + /** Constructor with member initializations */ + SOAP_ENV__Reason() : SOAP_ENV__Text() { } + /** Friend allocator */ + friend SOAP_FMAC1 SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*); +}; +#endif +#endif + +/* .\sendToClass.h:1206 */ +#ifndef WITH_NOGLOBAL +#ifndef SOAP_TYPE_SOAP_ENV__Fault +#define SOAP_TYPE_SOAP_ENV__Fault (50) +/* SOAP_ENV__Fault: */ +struct SOAP_CMAC SOAP_ENV__Fault { + public: + /** Optional element 'faultcode' of XML schema type 'xsd:QName' */ + char *faultcode; + /** Optional element 'faultstring' of XML schema type 'xsd:string' */ + char *faultstring; + /** Optional element 'faultactor' of XML schema type 'xsd:string' */ + char *faultactor; + /** Optional element 'detail' of XML schema type 'SOAP-ENV:Detail' */ + struct SOAP_ENV__Detail *detail; + /** Optional element 'SOAP-ENV:Code' of XML schema type 'SOAP-ENV:Code' */ + struct SOAP_ENV__Code *SOAP_ENV__Code; + /** Optional element 'SOAP-ENV:Reason' of XML schema type 'SOAP-ENV:Reason' */ + struct SOAP_ENV__Reason *SOAP_ENV__Reason; + /** Optional element 'SOAP-ENV:Node' of XML schema type 'xsd:string' */ + char *SOAP_ENV__Node; + /** Optional element 'SOAP-ENV:Role' of XML schema type 'xsd:string' */ + char *SOAP_ENV__Role; + /** Optional element 'SOAP-ENV:Detail' of XML schema type 'SOAP-ENV:Detail' */ + struct SOAP_ENV__Detail *SOAP_ENV__Detail; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Fault */ + long soap_type() const { return SOAP_TYPE_SOAP_ENV__Fault; } + /** Constructor with member initializations */ + SOAP_ENV__Fault() : faultcode(), faultstring(), faultactor(), detail(), SOAP_ENV__Code(), SOAP_ENV__Reason(), SOAP_ENV__Node(), SOAP_ENV__Role(), SOAP_ENV__Detail() { } + /** Friend allocator */ + friend SOAP_FMAC1 SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*); +}; +#endif +#endif + +/******************************************************************************\ + * * + * Typedefs * + * * +\******************************************************************************/ + + +/* (built-in):0 */ +#ifndef SOAP_TYPE__XML +#define SOAP_TYPE__XML (5) +typedef char *_XML; +#endif + +/* (built-in):0 */ +#ifndef SOAP_TYPE__QName +#define SOAP_TYPE__QName (6) +typedef char *_QName; +#endif + +/******************************************************************************\ + * * + * Serializable Types * + * * +\******************************************************************************/ + + +/* char has binding name 'byte' for type 'xsd:byte' */ +#ifndef SOAP_TYPE_byte +#define SOAP_TYPE_byte (3) +#endif + +/* int has binding name 'int' for type 'xsd:int' */ +#ifndef SOAP_TYPE_int +#define SOAP_TYPE_int (1) +#endif + +/* _ns1__DeleteClassResponse has binding name '_ns1__DeleteClassResponse' for type '' */ +#ifndef SOAP_TYPE__ns1__DeleteClassResponse +#define SOAP_TYPE__ns1__DeleteClassResponse (15) +#endif + +/* _ns1__DeleteClass has binding name '_ns1__DeleteClass' for type '' */ +#ifndef SOAP_TYPE__ns1__DeleteClass +#define SOAP_TYPE__ns1__DeleteClass (14) +#endif + +/* _ns1__SendToClassResponse has binding name '_ns1__SendToClassResponse' for type '' */ +#ifndef SOAP_TYPE__ns1__SendToClassResponse +#define SOAP_TYPE__ns1__SendToClassResponse (13) +#endif + +/* _ns1__SendToClass has binding name '_ns1__SendToClass' for type '' */ +#ifndef SOAP_TYPE__ns1__SendToClass +#define SOAP_TYPE__ns1__SendToClass (12) +#endif + +/* _ns1__CreateProjectResponse has binding name '_ns1__CreateProjectResponse' for type '' */ +#ifndef SOAP_TYPE__ns1__CreateProjectResponse +#define SOAP_TYPE__ns1__CreateProjectResponse (11) +#endif + +/* _ns1__CreateProject has binding name '_ns1__CreateProject' for type '' */ +#ifndef SOAP_TYPE__ns1__CreateProject +#define SOAP_TYPE__ns1__CreateProject (10) +#endif + +/* _ns1__SetMaterialStatusSResponse has binding name '_ns1__SetMaterialStatusSResponse' for type '' */ +#ifndef SOAP_TYPE__ns1__SetMaterialStatusSResponse +#define SOAP_TYPE__ns1__SetMaterialStatusSResponse (9) +#endif + +/* _ns1__SetMaterialStatusS has binding name '_ns1__SetMaterialStatusS' for type '' */ +#ifndef SOAP_TYPE__ns1__SetMaterialStatusS +#define SOAP_TYPE__ns1__SetMaterialStatusS (8) +#endif + +/* struct SOAP_ENV__Fault has binding name 'SOAP_ENV__Fault' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Fault +#define SOAP_TYPE_SOAP_ENV__Fault (50) +#endif + +/* struct SOAP_ENV__Reason has binding name 'SOAP_ENV__Reason' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Reason +#define SOAP_TYPE_SOAP_ENV__Reason (49) +#endif + +/* struct SOAP_ENV__Detail has binding name 'SOAP_ENV__Detail' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Detail +#define SOAP_TYPE_SOAP_ENV__Detail (46) +#endif + +/* struct SOAP_ENV__Code has binding name 'SOAP_ENV__Code' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Code +#define SOAP_TYPE_SOAP_ENV__Code (44) +#endif + +/* struct SOAP_ENV__Header has binding name 'SOAP_ENV__Header' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Header +#define SOAP_TYPE_SOAP_ENV__Header (43) +#endif + +/* struct SOAP_ENV__Reason * has binding name 'PointerToSOAP_ENV__Reason' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason +#define SOAP_TYPE_PointerToSOAP_ENV__Reason (52) +#endif + +/* struct SOAP_ENV__Detail * has binding name 'PointerToSOAP_ENV__Detail' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail +#define SOAP_TYPE_PointerToSOAP_ENV__Detail (51) +#endif + +/* struct SOAP_ENV__Code * has binding name 'PointerToSOAP_ENV__Code' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code +#define SOAP_TYPE_PointerToSOAP_ENV__Code (45) +#endif + +/* _ns1__DeleteClass * has binding name 'PointerTo_ns1__DeleteClass' for type '' */ +#ifndef SOAP_TYPE_PointerTo_ns1__DeleteClass +#define SOAP_TYPE_PointerTo_ns1__DeleteClass (31) +#endif + +/* _ns1__SendToClass * has binding name 'PointerTo_ns1__SendToClass' for type '' */ +#ifndef SOAP_TYPE_PointerTo_ns1__SendToClass +#define SOAP_TYPE_PointerTo_ns1__SendToClass (27) +#endif + +/* _ns1__CreateProject * has binding name 'PointerTo_ns1__CreateProject' for type '' */ +#ifndef SOAP_TYPE_PointerTo_ns1__CreateProject +#define SOAP_TYPE_PointerTo_ns1__CreateProject (23) +#endif + +/* _ns1__SetMaterialStatusS * has binding name 'PointerTo_ns1__SetMaterialStatusS' for type '' */ +#ifndef SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS +#define SOAP_TYPE_PointerTo_ns1__SetMaterialStatusS (19) +#endif + +/* wchar_t * has binding name 'wstring' for type 'xsd:string' */ +#ifndef SOAP_TYPE_wstring +#define SOAP_TYPE_wstring (17) +#endif + +/* _QName has binding name '_QName' for type 'xsd:QName' */ +#ifndef SOAP_TYPE__QName +#define SOAP_TYPE__QName (6) +#endif + +/* _XML has binding name '_XML' for type '' */ +#ifndef SOAP_TYPE__XML +#define SOAP_TYPE__XML (5) +#endif + +/* char * has binding name 'string' for type 'xsd:string' */ +#ifndef SOAP_TYPE_string +#define SOAP_TYPE_string (4) +#endif + +/******************************************************************************\ + * * + * Externals * + * * +\******************************************************************************/ + + +/******************************************************************************\ + * * + * Client-Side Call Stub Functions * + * * +\******************************************************************************/ + + + /** Web service synchronous operation 'soap_call___ns1__SetMaterialStatusS' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SetMaterialStatusS(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse); + /** Web service asynchronous operation 'soap_send___ns1__SetMaterialStatusS' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SetMaterialStatusS(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS); + /** Web service asynchronous operation 'soap_recv___ns1__SetMaterialStatusS' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SetMaterialStatusS(struct soap *soap, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse); + + /** Web service synchronous operation 'soap_call___ns1__CreateProject' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__CreateProject(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject, _ns1__CreateProjectResponse &ns1__CreateProjectResponse); + /** Web service asynchronous operation 'soap_send___ns1__CreateProject' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__CreateProject(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject); + /** Web service asynchronous operation 'soap_recv___ns1__CreateProject' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__CreateProject(struct soap *soap, _ns1__CreateProjectResponse &ns1__CreateProjectResponse); + + /** Web service synchronous operation 'soap_call___ns1__SendToClass' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SendToClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass, _ns1__SendToClassResponse &ns1__SendToClassResponse); + /** Web service asynchronous operation 'soap_send___ns1__SendToClass' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SendToClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass); + /** Web service asynchronous operation 'soap_recv___ns1__SendToClass' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SendToClass(struct soap *soap, _ns1__SendToClassResponse &ns1__SendToClassResponse); + + /** Web service synchronous operation 'soap_call___ns1__DeleteClass' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__DeleteClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass, _ns1__DeleteClassResponse &ns1__DeleteClassResponse); + /** Web service asynchronous operation 'soap_send___ns1__DeleteClass' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__DeleteClass(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass); + /** Web service asynchronous operation 'soap_recv___ns1__DeleteClass' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__DeleteClass(struct soap *soap, _ns1__DeleteClassResponse &ns1__DeleteClassResponse); + + /** Web service synchronous operation 'soap_call___ns1__SetMaterialStatusS_' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SetMaterialStatusS_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse); + /** Web service asynchronous operation 'soap_send___ns1__SetMaterialStatusS_' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SetMaterialStatusS_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SetMaterialStatusS *ns1__SetMaterialStatusS); + /** Web service asynchronous operation 'soap_recv___ns1__SetMaterialStatusS_' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SetMaterialStatusS_(struct soap *soap, _ns1__SetMaterialStatusSResponse &ns1__SetMaterialStatusSResponse); + + /** Web service synchronous operation 'soap_call___ns1__CreateProject_' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__CreateProject_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject, _ns1__CreateProjectResponse &ns1__CreateProjectResponse); + /** Web service asynchronous operation 'soap_send___ns1__CreateProject_' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__CreateProject_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__CreateProject *ns1__CreateProject); + /** Web service asynchronous operation 'soap_recv___ns1__CreateProject_' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__CreateProject_(struct soap *soap, _ns1__CreateProjectResponse &ns1__CreateProjectResponse); + + /** Web service synchronous operation 'soap_call___ns1__SendToClass_' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__SendToClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass, _ns1__SendToClassResponse &ns1__SendToClassResponse); + /** Web service asynchronous operation 'soap_send___ns1__SendToClass_' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__SendToClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__SendToClass *ns1__SendToClass); + /** Web service asynchronous operation 'soap_recv___ns1__SendToClass_' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__SendToClass_(struct soap *soap, _ns1__SendToClassResponse &ns1__SendToClassResponse); + + /** Web service synchronous operation 'soap_call___ns1__DeleteClass_' to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__DeleteClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass, _ns1__DeleteClassResponse &ns1__DeleteClassResponse); + /** Web service asynchronous operation 'soap_send___ns1__DeleteClass_' to send a request message to the specified endpoint and SOAP Action header, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_send___ns1__DeleteClass_(struct soap *soap, const char *soap_endpoint, const char *soap_action, _ns1__DeleteClass *ns1__DeleteClass); + /** Web service asynchronous operation 'soap_recv___ns1__DeleteClass_' to receive a response message from the connected endpoint, returns SOAP_OK or error code */ + SOAP_FMAC5 int SOAP_FMAC6 soap_recv___ns1__DeleteClass_(struct soap *soap, _ns1__DeleteClassResponse &ns1__DeleteClassResponse); + +#endif + +/* End of soapStub.h */ diff --git a/jf_itk/signoff_rev.cpp b/jf_itk/signoff_rev.cpp new file mode 100644 index 0000000..0061ce9 --- /dev/null +++ b/jf_itk/signoff_rev.cpp @@ -0,0 +1,669 @@ +#include "signoff_rev.h" +#include "tccore\iman_msg.h" + + +//̽ڵϢ +struct FLOWNODEINFOS +{ + char taskname[128]; + char username[128]; + char timeinfo[128]; + char group[128]; + char comments[1024]; +}flownode_s[64]; + +//ԱϢ +struct USERINFOS +{ + char taskname[128]; + char propertyname[128]; + char group[128]; +}userinfo_s[64]; + +//Ϣ +struct TIMEINFOS +{ + char taskname[128]; + char propertyname[128]; + char group[128]; +}timeinfo_s[64]; + + + +int nodecount = 0; +int userinfoscount = 0; +int timeinfoscount = 0; + + + + +extern "C" int POM_AM__set_application_bypass(logical bypass); + +int ORIGIN_ask_sign_info(tag_t task_node, char *output_str,char *task_name,char *arg3value) +{ + int ifail = ITK_ok; + tag_t cur_perform_task = NULLTAG,tempTask = NULLTAG; + //char cur_task_name[WSO_name_size_c+1]="",buf[128] = ""; + char* cur_task_name; + //жϱ + int s = 0; + EPM_decision_t decision = EPM_nogo; + char* userName; + char *timeinfo1 = "",* person_name,*group_name="",*prop_name = "last_mod_date"; + tag_t aUserTag = NULLTAG,responsibleParty = NULLTAG; + date_t decision_date; + //ڵ + int perform_count = 0; + int *attach_type; + tag_t *perform_attaches = NULLTAG; + tag_t memberTag = NULLTAG; + SIGNOFF_TYPE_t memberType; + //CR_signoff_decision_t signoff_decision; + EPM_signoff_decision_t signoff_decision; + char *comments,*timeinfo="",*group_full_name = NULL; + tag_t user_tag=NULLTAG, group_tag = NULLTAG; + //ѭжϱ + int i=0; + + EPM_ask_name2( task_node, &cur_task_name ) ; + ECHO("cur_task_name = %s\n",cur_task_name); + if ( stricmp( cur_task_name, "perform-signoffs" ) == 0 ) + { + cur_perform_task = task_node; + //õڵ + EPM_ask_parent_task( cur_perform_task, &tempTask ); + EPM_ask_name2( tempTask, &cur_task_name ); + } + else if( strstr( cur_task_name, "" )!=NULL || strcmp( cur_task_name, "" ) == 0) + { + cur_perform_task = task_node; + } + else + { + EPM_ask_sub_task(task_node, "perform-signoffs", &cur_perform_task) ; + if ( cur_perform_task != NULLTAG ) + { + EPM_ask_name2( task_node, &cur_task_name ); + + } + } + if(cur_perform_task != NULLTAG ) + { + if( strstr(cur_task_name,"") !=NULL||strcmp( cur_task_name, "" ) == 0 ) + { + tag_t owner = NULLTAG; + s = EPM_ask_responsible_party(cur_perform_task,&responsibleParty); + if(responsibleParty != NULLTAG) + { + decision = EPM_go; + } + AOM_ask_owner( cur_perform_task, &owner); + //s = POM_get_user(&userName,&aUserTag); + if( owner != NULLTAG ) + SA_ask_user_person_name2(owner, &person_name); + AOM_ask_value_date(cur_perform_task,prop_name,&decision_date); + DATE_date_to_string(decision_date,arg3value,&timeinfo1); + //ITK_date_to_string (decision_date, &timeinfo1); + strcpy(flownode_s[nodecount].taskname,cur_task_name); + strcpy(flownode_s[nodecount].username,person_name); + strcpy(flownode_s[nodecount].timeinfo,timeinfo1); + + nodecount = nodecount + 1; + //MEM_free(userName); + } + else + { + //˼ + tag_t owner = NULLTAG; + date_t date; + logical is_valid; + char *d_value = NULL; + AOM_ask_owner( cur_perform_task, &owner); + if( owner != NULLTAG ) + SA_ask_user_person_name2(owner, &person_name); + AOM_ask_value_date(cur_perform_task,"creation_date", &date);//fnd0StartDate + DATE_date_to_string(date,arg3value,&d_value); + //ITKCALL(AOM_UIF_ask_value( cur_perform_task, "fnd0StartDate", &d_value));; + + //CALL(DATE_date_to_string(date,arg3value,&timeinfo)); + //ITKCALL(DATE_string_to_date_t(d_value, &is_valid,&date)); + //CALL(DATE_date_to_string(date,arg3value,&timeinfo)); + //ECHO("timeinfo : %s",timeinfo); + //vector ans; + //if( d_value != NULL ) + //{ + // Split(d_value, ' ', ans); + // if(ans.size() > 1) + // strcat(output_str,ans[0].c_str()); + //} + EPM_ask_all_attachments(cur_perform_task,&perform_count,&perform_attaches,&attach_type); + + for(i=0;i 0) + { + for (i=0;i type_vec; + + //Split(exclude_type,";",type_vec); + + ECHO("1%d\n",userinfoscount); + ECHO("2%d\n",timeinfoscount); + + //õhandlerĽڵ + msg.task; + //ͨڵȡ + EPM_ask_root_task( msg.task, &root_task ); + //õµеһڵ + EPM_ask_sub_tasks(root_task, &sub_task_count, &sub_tasks); + //õ̵ + EPM_ask_name2( root_task, &root_task_name ); + // + ECHO("root_task_name=%s\n",root_task_name); + EPM_ask_name2( current_task, &task_name ); + ECHO( "sub_task_count = %d\n", sub_task_count ); + + //test========================== + //tag_t user = NULLTAG, *tasks = NULL; + //int n_task= 0; + //ITKCALL(SA_find_user( "admin", &user )); + //ITKCALL(SA_ask_user_work_contexts ( user, &n_task, &tasks)); + //ECHO("==========n_task=%d",n_task); + //============================== + + //DOڵ doڵ + if(strstr(task_name,"") !=NULL||strcmp(task_name,"") == 0) + { + ECHO("task_name:%s",task_name); + //ȡ + s = EPM_ask_responsible_party(current_task,&responsibleParty); + if(responsibleParty != NULLTAG) + { + decision = EPM_go; + } + //ȡǰû + s = POM_get_user(&userName,&aUserTag); + //ȡpersonname + SA_ask_user_person_name2(aUserTag,&person_name); + strcat(sign_info,task_name); + strcat(sign_info,"="); + strcat(sign_info,person_name); + strcat(sign_info,"|"); + strcat(sign_info,task_name); + strcat(sign_info,"="); + //POM_ask_v + //ȡʱԣ1󣬲2ƣ3ȡʱֵ + AOM_ask_value_date(current_task,prop_name,&decision_date); + //AOM_UIF_ask_value(current_task,prop_name, &timeinfo2); + //ʱṹתΪijʱʽַ + DATE_date_to_string(decision_date,arg3value,&timeinfo2); + ECHO("\n--------------\n timeinfo2=%s\n------------\n",timeinfo2); + strcat(sign_info,timeinfo2); + strcat(sign_info,"|"); + strcpy(flownode_s[nodecount].taskname,task_name); + strcpy(flownode_s[nodecount].username,person_name); + strcpy(flownode_s[nodecount].timeinfo,timeinfo2); + nodecount = nodecount + 1; + + } + else //performڵ + { + for(i=0;i +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int HS_signoff_rev(EPM_action_message_t msg); \ No newline at end of file diff --git a/jf_itk/string_helper.cpp b/jf_itk/string_helper.cpp new file mode 100644 index 0000000..553e6f3 --- /dev/null +++ b/jf_itk/string_helper.cpp @@ -0,0 +1,146 @@ +/** +* @file string_helper.cpp +* @brief string utility functions' implemention +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +* 14-Jau-2009 James modify Split functions, add trim blank characters +*/ +#pragma warning(disable:4996) +// +//#include +//#include +//#include +#include "string_helper.h" + +string TrimString( string strArg ) +{ + size_t index1 = 0; + index1 = strArg.find_first_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin(), strArg.begin()+index1 ); + index1 = strArg.find_last_not_of( ' '); + if( index1 != string::npos ) + strArg.erase( strArg.begin() + index1 + 1 ); + return strArg; +} + +void Split( string strArg, char spliter, vector &ans ) +{ + ans.clear(); + size_t index0 = 0; + string one_arg; + if ( strArg.find_first_not_of(' ') == string::npos ) + strArg = ""; + while( strArg.size()>0 ) + { + index0 = strArg.find_first_of( spliter ); + if( index0 != string::npos ) + { + one_arg = strArg.substr( 0,index0 ); + strArg = strArg.substr( index0 + 1 ); + ans.push_back( one_arg ); + } + else + { + ans.push_back( strArg ); + break; + } + } +} + +void Split( string strArg, string spliter, vector &ans ) +{ + + ans.clear(); + + size_t index0; + string one_arg; + + if ( strArg.find_first_not_of(" ") == string::npos ) + strArg = ""; + + + while( strArg.size()>0 ) + { + + index0 = strArg.find(spliter); + + if( index0 != string::npos ) + { + + one_arg = strArg.substr( 0, index0 ); + strArg = strArg.substr( index0 + spliter.size() ); + + ans.push_back( one_arg ); + } + else + { + + ans.push_back( strArg ); + break; + } + } +} + + +void RemoveLiner( string &in, string &out ) +{ + char buf[BUFSIZ] = ""; + for( int i=0; i<(int)in.size(); i++ ) + { + if( in[i] == '\n') + continue; + else + sprintf( buf,"%s%c", buf, in[i] ); + } + out.assign(buf); +} + +////Converting a WChar string to a Ansi string +//std::string WChar2Ansi(LPCWSTR pwszSrc) +//{ +// int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL); +// +// if (nLen<= 0) return std::string(""); +// +// char* pszDst = new char[nLen]; +// if (NULL == pszDst) return std::string(""); +// +// WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL); +// pszDst[nLen -1] = 0; +// +// std::string strTemp(pszDst); +// delete [] pszDst; +// +// return strTemp; +//} +// +//string ws2s(wstring& inputws){ return WChar2Ansi(inputws.c_str()); } +// +////Converting a Ansi string to WChar string +//std::wstring Ansi2WChar(LPCSTR pszSrc, int nLen) +//{ +// int nSize = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszSrc, nLen, 0, 0); +// if(nSize <= 0) return NULL; +// +// WCHAR *pwszDst = new WCHAR[nSize+1]; +// if( NULL == pwszDst) return NULL; +// +// MultiByteToWideChar(CP_ACP, 0,(LPCSTR)pszSrc, nLen, pwszDst, nSize); +// pwszDst[nSize] = 0; +// +// if( pwszDst[0] == 0xFEFF) // skip Oxfeff +// for(int i = 0; i < nSize; i ++) +// pwszDst[i] = pwszDst[i+1]; +// +// wstring wcharString(pwszDst); +// delete pwszDst; +// +// return wcharString; +//} +// +//std::wstring s2ws(const string& s){ return Ansi2WChar(s.c_str(),s.size());} + diff --git a/jf_itk/string_helper.h b/jf_itk/string_helper.h new file mode 100644 index 0000000..b4f7532 --- /dev/null +++ b/jf_itk/string_helper.h @@ -0,0 +1,25 @@ +/** +* @file string_helper.h +* @brief string utilities to help dealing with string +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 James +*/ + +#ifndef STRING_HELPER +#define STRING_HELPER + +#include +#include +using namespace std; + +string TrimString( string strArg ); +void Split( string strArg, char spliter, vector &ans ); +void Split( string strArg, string spliter, vector &ans ); +void RemoveLiner( string &in, string &out ); +//string ws2s(wstring& inputws); +//wstring s2ws(const string& s); + +#endif \ No newline at end of file diff --git a/jf_itk/string_utils.cxx b/jf_itk/string_utils.cxx new file mode 100644 index 0000000..9f6b79a --- /dev/null +++ b/jf_itk/string_utils.cxx @@ -0,0 +1,253 @@ +/*================================================================================================================== + Copyright(c) 2012 ORIGIN. + Unpublished - All rights reserved +==================================================================================================================== +File description: + Filename: string_utils.c + Module : Common module. + + This file includes some operations of the string. + +==================================================================================================================== +Date Name Description of Change +3-Feb-2015 Ray li Initialize creation +$HISTORY$ +===================================================================================================================*/ +#ifndef _cplusplus +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE +#endif +#endif + +#include +#include +#include +#include +#include +#include + +#include "string_utils.h" + +void Split( string strArg, string spliter, vector &ans ) +{ + ans.clear(); + size_t index0; + string one_arg; + if ( strArg.find_first_not_of(' ') == string::npos ) + strArg = ""; + while( strArg.size()>0 ) + { + index0 = strArg.find(spliter); + if( index0 != string::npos ) + { + one_arg = strArg.substr( 0, index0 ); + strArg = strArg.substr( index0 + spliter.size() ); + ans.push_back( one_arg ); + } + else + { + ans.push_back( strArg ); + break; + } + } +} +char* GSTR_clone( char **dst, const char *src ) +{ + char *retVal = NULL; + int srcLen = 0; + + *dst = NULL; + if (src == NULL) + return NULL; + + srcLen = (int)tc_strlen( src ) + 1; + *dst = (char*)MEM_alloc( srcLen * sizeof(char) ); + retVal = tc_strncpy( *dst, src, srcLen ); + (*dst)[srcLen - 1] = '\0'; + + return retVal; +} + +char* GSTR_copy( char *dst, const char *src, int dstSize ) +{ + char *retVal = tc_strncpy( dst, src, dstSize ); + dst[dstSize - 1] = '\0'; + return retVal; +} + +char* GSTR_int_to_string( char **dst, int value ) +{ + char strVal[128 + 1]; + + *dst = NULL; + memset( strVal, 0, sizeof(strVal)/sizeof(char) ); + sprintf( strVal, "%d", value ); + + return GSTR_clone( dst, strVal ); +} + +void GSTR_format_int_to_string( char *dst, int digitNum, int value ) +{ + char sNum[WSO_desc_size_c + 1]; + sprintf( sNum, "%%0%dd", digitNum ); + sprintf( dst, sNum, value ); +} + +void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ) +{ + char sNum[WSO_name_size_c + 1] = {0}; + char sNew[WSO_name_size_c + 1] = {0}; + sprintf( sNum, "%%%d.%ds", m, m ); + sprintf( sNew, sNum, dst ); + STRNG_replace_str( sNew, " ", fill_char, out ); +} + + +char* GSTR_string_append( const char *s1, const char *s2 ) +{ + char *s = NULL; + if (s1 == NULL || s2 == NULL) + { + GSTR_clone(&s, s1 == NULL ? (s2 == NULL ? "" : s2) : s1 ); + } + else + { + int size = (int)tc_strlen(s1) + (int)tc_strlen(s2) + 1; + s = (char *)MEM_alloc( size ); + tc_strcpy( s, s1 ); + tc_strcat( s, s2 ); + s[size - 1] = '\0'; + } + return s; +} + +logical GSTR_is_float(const char *str) +{ + logical isfloat = true; + char *pStr = (char *)str; + logical hasPositive = false; + logical hasMinus = false; + logical hasDot = false; + + if (str == NULL) + return false; + + while (*pStr != '\0' && isfloat == true) + { + if ( (*pStr >= '0' && *pStr <= '9')) + { + //continue; + } + else if ( *pStr == '+' ) + { + isfloat = (hasPositive ? false : (hasPositive = true)); + } + else if ( *pStr == '-' ) + { + isfloat = (hasMinus ? false : (hasMinus = true)); + } + else if ( *pStr == '.' ) + { + isfloat = (hasDot ? false : (hasDot = true)); + } + else + isfloat = false; + + pStr ++; + } + return isfloat; +} + +logical GSTR_is_number(const char *str) +{ + logical is_number = true; + char *pStr = (char *)str; + if (str == NULL) + return false; + + while (*pStr != '\0') + { + if ( !( (*pStr >= '0' && *pStr <= '9') || *pStr == '-' ) ) + { + is_number = false; + break; + } + pStr ++; + } + return is_number; +} + +logical GSTR_is_ascii(char ch) +{ + return ((unsigned int)ch) < 128; +} + +int GSTR_trim_l( char *str, char s ) +{ + int count = 0; + char *pointer = str, *poffset = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + while ( *pointer != '\0' ) + { + if ( *pointer != s ) + { + break; + } + count++; + pointer++; + } + if (count == 0) + return 0; + + poffset = str + count; + pointer = str; + while ( *poffset != '\0' ) + { + *pointer = *poffset; + pointer ++; + poffset ++; + } + *pointer = '\0'; + + return count; +} + +int GSTR_trim_r( char *str, char s ) +{ + int count = 0; + char *pointer = NULL; + if (str == NULL || str[0] == '\0') + return 0; + + pointer = str + ((int) strlen(str) - 1); + + while ( pointer != str ) + { + if ( *pointer != s ) + { + break; + } + + *pointer = '\0'; + + count++; + pointer--; + } + + return count; +} + +void GSTR_trim_float( char *floatValue ) +{ + if ( !IS_EMPTY(floatValue) && tc_strstr(floatValue, ".") != NULL ) + { + int len = 0; + GSTR_trim_r(floatValue, '0'); + len = (int)tc_strlen(floatValue); + if (floatValue[ len - 1 ] == '.') + floatValue[ len - 1 ] = '\0'; + } +} + diff --git a/jf_itk/string_utils.h b/jf_itk/string_utils.h new file mode 100644 index 0000000..4b379cc --- /dev/null +++ b/jf_itk/string_utils.h @@ -0,0 +1,125 @@ +/*===================================================================================================================== + Copyright(c) 2005 ORIGIN PLM Software Corp. All rights reserved. + Unpublished - All rights reserved +======================================================================================================================= +File description: + Filename: string_utils.h + Module : Common module. + + This file includes some operations of the string. + +======================================================================================================================= +Date Name Description of Change +14-Jul-2009 Ray Li Initialize creation +$HISTORY$ +=====================================================================================================================*/ +#ifndef STRING_UTILS_H +#define STRING_UTILS_H +#include +#include +#include +using namespace std; +#ifdef __cplusplus + extern "C" + { +#endif + +// @{{ String assister +#define IS_NULL(S) ((S)==NULL) +#define IS_EMPTY(S) (((S)==NULL) || !(*(S))) +// @}} + void Split( string strArg, string spliter, vector &ans ); + /** + * Clones the string. + * @param dst - the output string. + * @param src - the string to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_clone( char **dst, const char *src ); + + /** + * Copy safely the string with null end. + * @param dst - the output string. + * @param src - the string to be cloned. + * @param dstSize - the size of output string. + * @return - the destinatin string pointer. + */ + extern char *GSTR_copy( char *dst, const char *src, int dstSize ); + + /** + * Converts int to string. + * @param dst - the output string. + * @param value - the int to be cloned. + * @return - the destinatin string pointer. + */ + extern char* GSTR_int_to_string( char **dst, int value ); + + /** + * Formats the int/string value as string. + * @param dst - the destination string. + * @param digitNum - the digit number of the value. + * @param value - the value to be converted. + * @return - N/A. + */ + extern void GSTR_format_int_to_string( char *dst, int digitNum, int value ); + extern void GSTR_format_string( const char *dst, int m, const char *fill_char, char **out ); + + /** + * Appends the strings( never null returned ) + * @param s1 - string 1 + * @param s2 - string 2 + * @return - new string + */ + extern char* GSTR_string_append( const char *s1, const char *s2 ); + + /** + * Whether the string is float type + * @param str - The string + * + * NOTE: it's only check whether each word is in "+-.0123456789", not care the float with "E" or the float rule, + * like "00-1.+01", it will return true. + * @return - return true if it is one. + */ + extern logical GSTR_is_float(const char *str); + + /** + * Whether all char of the string are number + * @param str - The string + * + * NOTE: it's only check whether each word is in "0123456789" + * @return - return true if it is one. + */ + extern logical GSTR_is_number(const char *str); + + /** + * Is ascii char + * @param ch - ascii char + * @return - return true if it is. + */ + extern logical GSTR_is_ascii(char ch); + + /** + * Trims the string's prefix. + * @param str - The string + * @param s - The char + * + * @return - count. + */ + extern int GSTR_trim_l( char *str, char s ); + extern int GSTR_trim_r( char *str, char s ); + + /** + * Remove the zero. + * For Example: + * floatValue="50.00" -> = "50" + * floatValue="50.0100" -> = "50.01" + * @return - count. + */ + extern void GSTR_trim_float( char *floatValue ); + +#ifdef __cplusplus + } +#endif + + +#endif //STRING_UTILS_H diff --git a/jf_itk/tc_log.cxx b/jf_itk/tc_log.cxx new file mode 100644 index 0000000..8c4d149 --- /dev/null +++ b/jf_itk/tc_log.cxx @@ -0,0 +1,103 @@ +/** +* @file common_itk_util.cpp +* @brief itk warpper utility function +* @author James +* @history +* =================================================================================== +* Date Name Description of Change +* 18-July-2008 Ray +*/ +#include +#include +#include + +#include +#include +#include +#include +// +#ifdef WIN32 +#include +#include +#else +#include +#endif +// +#include "tc_log.h" + +#define ARGS_LENGTH 200 +#define MAX_PRINTLINE_LENGTH 2000 +#define MAX_PATH_LENGTH 2000 +#define MAX_ARGUMENT_LENGTH 400 +#define MAX_PARAMNAME_LENGTH 50 +#define MAX_FILE_EXT_LENGTH 10 +#define TRUE_FLAG 1 +#define FALSE_FLAG 0 +#define DETAILLOG 1 + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + + +FILE* logFile = NULL; + +void CreateLogFile(char* logFileName) +{ + int i=0; + + logFile = NULL; + + + //get logFileName + sprintf(logFileName, "%s", logFileName); + printf("log file name: %s\n", logFileName); + + + //create log file + if((logFile = fopen(logFileName, "w"))==NULL) + { + printf("log file create failed\n"); + } + +} + +void WriteLog(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + + if(logFile) + { + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + + //----------print to command window for trace--------// + printf("%s\n", tmp); + + //print message to log file + fprintf(logFile, "%s\n", tmp); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} + +void CloseLog(void) +{ + if(logFile) + { + fclose(logFile); + logFile = NULL; + } +} diff --git a/jf_itk/tc_log.h b/jf_itk/tc_log.h new file mode 100644 index 0000000..8dc0a0a --- /dev/null +++ b/jf_itk/tc_log.h @@ -0,0 +1,30 @@ +/** +* @file common_itk_util.h +* @brief itk warpper utility function +* @author Ray +* @history +* =================================================================================== +* Date Name Description of Change +* 09-July-2008 Ray +*/ + +#ifndef TC_LOG_H +#define TC_LOG_H + +#ifdef __cplusplus +extern "C" { +#endif + +void CreateLogFile(char* logFileName); +void WriteLog(const char* format, ...); +void CloseLog(void); +//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] ); +//int CompareDate( date_t date1, date_t date2 ); +//int GetRandomTempFile( char tempFile[256] ); +//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] ); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/jf_itk/tinystr.cpp b/jf_itk/tinystr.cpp new file mode 100644 index 0000000..0665768 --- /dev/null +++ b/jf_itk/tinystr.cpp @@ -0,0 +1,111 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#include "tinystr.h" + +// Error value for find primitive +const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1); + + +// Null rep. +TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; + + +void TiXmlString::reserve (size_type cap) +{ + if (cap > capacity()) + { + TiXmlString tmp; + tmp.init(length(), cap); + memcpy(tmp.start(), data(), length()); + swap(tmp); + } +} + + +TiXmlString& TiXmlString::assign(const char* str, size_type len) +{ + size_type cap = capacity(); + if (len > cap || cap > 3*(len + 8)) + { + TiXmlString tmp; + tmp.init(len); + memcpy(tmp.start(), str, len); + swap(tmp); + } + else + { + memmove(start(), str, len); + set_size(len); + } + return *this; +} + + +TiXmlString& TiXmlString::append(const char* str, size_type len) +{ + size_type newsize = length() + len; + if (newsize > capacity()) + { + reserve (newsize + capacity()); + } + memmove(finish(), str, len); + set_size(newsize); + return *this; +} + + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) +{ + TiXmlString tmp; + tmp.reserve(a.length() + b.length()); + tmp += a; + tmp += b; + return tmp; +} + +TiXmlString operator + (const TiXmlString & a, const char* b) +{ + TiXmlString tmp; + TiXmlString::size_type b_len = static_cast( strlen(b) ); + tmp.reserve(a.length() + b_len); + tmp += a; + tmp.append(b, b_len); + return tmp; +} + +TiXmlString operator + (const char* a, const TiXmlString & b) +{ + TiXmlString tmp; + TiXmlString::size_type a_len = static_cast( strlen(a) ); + tmp.reserve(a_len + b.length()); + tmp.append(a, a_len); + tmp += b; + return tmp; +} + + +#endif // TIXML_USE_STL diff --git a/jf_itk/tinystr.h b/jf_itk/tinystr.h new file mode 100644 index 0000000..89cca33 --- /dev/null +++ b/jf_itk/tinystr.h @@ -0,0 +1,305 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#ifndef TIXML_STRING_INCLUDED +#define TIXML_STRING_INCLUDED + +#include +#include + +/* The support for explicit isn't that universal, and it isn't really + required - it is used to check that the TiXmlString class isn't incorrectly + used. Be nice to old compilers and macro it here: +*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + #define TIXML_EXPLICIT explicit +#elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + #define TIXML_EXPLICIT explicit +#else + #define TIXML_EXPLICIT +#endif + + +/* + TiXmlString is an emulation of a subset of the std::string template. + Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. + Only the member functions relevant to the TinyXML project have been implemented. + The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase + a string and there's no more room, we allocate a buffer twice as big as we need. +*/ +class TiXmlString +{ + public : + // The size type used + typedef size_t size_type; + + // Error value for find primitive + static const size_type npos; // = -1; + + + // TiXmlString empty constructor + TiXmlString () : rep_(&nullrep_) + { + } + + // TiXmlString copy constructor + TiXmlString ( const TiXmlString & copy) : rep_(0) + { + init(copy.length()); + memcpy(start(), copy.data(), length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) + { + init( static_cast( strlen(copy) )); + memcpy(start(), copy, length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) + { + init(len); + memcpy(start(), str, len); + } + + // TiXmlString destructor + ~TiXmlString () + { + quit(); + } + + TiXmlString& operator = (const char * copy) + { + return assign( copy, (size_type)strlen(copy)); + } + + TiXmlString& operator = (const TiXmlString & copy) + { + return assign(copy.start(), copy.length()); + } + + + // += operator. Maps to append + TiXmlString& operator += (const char * suffix) + { + return append(suffix, static_cast( strlen(suffix) )); + } + + // += operator. Maps to append + TiXmlString& operator += (char single) + { + return append(&single, 1); + } + + // += operator. Maps to append + TiXmlString& operator += (const TiXmlString & suffix) + { + return append(suffix.data(), suffix.length()); + } + + + // Convert a TiXmlString into a null-terminated char * + const char * c_str () const { return rep_->str; } + + // Convert a TiXmlString into a char * (need not be null terminated). + const char * data () const { return rep_->str; } + + // Return the length of a TiXmlString + size_type length () const { return rep_->size; } + + // Alias for length() + size_type size () const { return rep_->size; } + + // Checks if a TiXmlString is empty + bool empty () const { return rep_->size == 0; } + + // Return capacity of string + size_type capacity () const { return rep_->capacity; } + + + // single char extraction + const char& at (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // [] operator + char& operator [] (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // find a char in a string. Return TiXmlString::npos if not found + size_type find (char lookup) const + { + return find(lookup, 0); + } + + // find a char in a string from an offset. Return TiXmlString::npos if not found + size_type find (char tofind, size_type offset) const + { + if (offset >= length()) return npos; + + for (const char* p = c_str() + offset; *p != '\0'; ++p) + { + if (*p == tofind) return static_cast< size_type >( p - c_str() ); + } + return npos; + } + + void clear () + { + //Lee: + //The original was just too strange, though correct: + // TiXmlString().swap(*this); + //Instead use the quit & re-init: + quit(); + init(0,0); + } + + /* Function to reserve a big amount of data when we know we'll need it. Be aware that this + function DOES NOT clear the content of the TiXmlString if any exists. + */ + void reserve (size_type cap); + + TiXmlString& assign (const char* str, size_type len); + + TiXmlString& append (const char* str, size_type len); + + void swap (TiXmlString& other) + { + Rep* r = rep_; + rep_ = other.rep_; + other.rep_ = r; + } + + private: + + void init(size_type sz) { init(sz, sz); } + void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } + char* start() const { return rep_->str; } + char* finish() const { return rep_->str + rep_->size; } + + struct Rep + { + size_type size, capacity; + char str[1]; + }; + + void init(size_type sz, size_type cap) + { + if (cap) + { + // Lee: the original form: + // rep_ = static_cast(operator new(sizeof(Rep) + cap)); + // doesn't work in some cases of new being overloaded. Switching + // to the normal allocation, although use an 'int' for systems + // that are overly picky about structure alignment. + const size_type bytesNeeded = sizeof(Rep) + cap; + const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); + rep_ = reinterpret_cast( new int[ intsNeeded ] ); + + rep_->str[ rep_->size = sz ] = '\0'; + rep_->capacity = cap; + } + else + { + rep_ = &nullrep_; + } + } + + void quit() + { + if (rep_ != &nullrep_) + { + // The rep_ is really an array of ints. (see the allocator, above). + // Cast it back before delete, so the compiler won't incorrectly call destructors. + delete [] ( reinterpret_cast( rep_ ) ); + } + } + + Rep * rep_; + static Rep nullrep_; + +} ; + + +inline bool operator == (const TiXmlString & a, const TiXmlString & b) +{ + return ( a.length() == b.length() ) // optimization on some platforms + && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare +} +inline bool operator < (const TiXmlString & a, const TiXmlString & b) +{ + return strcmp(a.c_str(), b.c_str()) < 0; +} + +inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } +inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } +inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } +inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } + +inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } +inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } +inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); +TiXmlString operator + (const TiXmlString & a, const char* b); +TiXmlString operator + (const char* a, const TiXmlString & b); + + +/* + TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. + Only the operators that we need for TinyXML have been developped. +*/ +class TiXmlOutStream : public TiXmlString +{ +public : + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const TiXmlString & in) + { + *this += in; + return *this; + } + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const char * in) + { + *this += in; + return *this; + } + +} ; + +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff --git a/jf_itk/tinyxml.cpp b/jf_itk/tinyxml.cpp new file mode 100644 index 0000000..fb3ed5a --- /dev/null +++ b/jf_itk/tinyxml.cpp @@ -0,0 +1,1886 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include + +#ifdef TIXML_USE_STL +#include +#include +#endif + +#include "tinyxml.h" + +FILE* TiXmlFOpen( const char* filename, const char* mode ); + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; + target->location = location; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + delete node; + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( !replaceThis ) + return 0; + + if ( replaceThis->parent != this ) + return 0; + + if ( withThis.ToDocument() ) { + // A document can never be a child. Thanks to Noam. + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( !removeThis ) { + return false; + } + + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + //delete removeThis; kk Ҫɾ + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + #else + TiXmlAttribute* node = attributeSet.Find( name ); + #endif + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +TiXmlElement& TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); + return *this; +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( attrib ) + return &attrib->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} + + +int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int ival = 0; + int result = node->QueryIntValue( &ival ); + *value = (unsigned)ival; + return result; +} + + +int TiXmlElement::QueryBoolAttribute( const char* name, bool* bval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int result = TIXML_WRONG_TYPE; + if ( StringEqual( node->Value(), "true", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "yes", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "1", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = true; + result = TIXML_SUCCESS; + } + else if ( StringEqual( node->Value(), "false", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "no", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "0", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = false; + result = TIXML_SUCCESS; + } + return result; +} + + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetDoubleAttribute( const std::string& name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} +#endif + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname ); + if ( attrib ) { + attrib->SetValue( cvalue ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name ); + if ( attrib ) { + attrib->SetValue( _value ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; iNext() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a node + // 2) An element with only a text child is printed as text + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = true; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = true; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = true; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlDocument& TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // + // + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Process the buffer in place to normalize new lines. (See comment above.) + // Copies from the 'p' to 'q' pointer, where p can advance faster if + // a newline-carriage return is hit. + // + // Wikipedia: + // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or + // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)... + // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others + // * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS + // * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9 + + const char* p = buf; // the read head + char* q = buf; // the write head + const char CR = 0x0d; + const char LF = 0x0a; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + assert( q <= (buf+length) ); + assert( q <= p ); + + if ( *p == CR ) { + *q++ = LF; + p++; + if ( *p == LF ) { // check for CR+LF (and skip LF) + p++; + } + } + else { + *q++ = *p++; + } + } + assert( q <= (buf+length) ); + *q = 0; + + Parse( buf, 0, encoding ); + + delete [] buf; + return !Error(); +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + target->errorId = errorId; + target->errorDesc = errorDesc; + target->tabsize = tabsize; + target->errorLocation = errorLocation; + target->useMicrosoftBOM = useMicrosoftBOM; + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + + +TiXmlNode* TiXmlDocument::Clone() const +{ + TiXmlDocument* clone = new TiXmlDocument(); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlDocument::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + node->Print( cfile, depth ); + fprintf( cfile, "\n" ); + } +} + + +bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +const TiXmlAttribute* TiXmlAttribute::Next() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} + +/* +TiXmlAttribute* TiXmlAttribute::Next() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} +*/ + +const TiXmlAttribute* TiXmlAttribute::Previous() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} + +/* +TiXmlAttribute* TiXmlAttribute::Previous() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} +*/ + +void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + TIXML_STRING n, v; + + EncodeString( name, &n ); + EncodeString( value, &v ); + + if (value.find ('\"') == TIXML_STRING::npos) { + if ( cfile ) { + fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\""; + } + } + else { + if ( cfile ) { + fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'"; + } + } +} + + +int TiXmlAttribute::QueryIntValue( int* ival ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +int TiXmlAttribute::QueryDoubleValue( double* dval ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +void TiXmlAttribute::SetIntValue( int _value ) +{ + char buf [64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value); + #else + sprintf (buf, "%d", _value); + #endif + SetValue (buf); +} + +void TiXmlAttribute::SetDoubleValue( double _value ) +{ + char buf [256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value); + #else + sprintf (buf, "%g", _value); + #endif + SetValue (buf); +} + +int TiXmlAttribute::IntValue() const +{ + return atoi (value.c_str ()); +} + +double TiXmlAttribute::DoubleValue() const +{ + return atof (value.c_str ()); +} + + +TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlComment& TiXmlComment::operator=( const TiXmlComment& base ) +{ + Clear(); + base.CopyTo( this ); + return *this; +} + + +void TiXmlComment::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlComment::CopyTo( TiXmlComment* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlComment::Clone() const +{ + TiXmlComment* clone = new TiXmlComment(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlText::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + if ( cdata ) + { + int i; + fprintf( cfile, "\n" ); + for ( i=0; i\n", value.c_str() ); // unformatted output + } + else + { + TIXML_STRING buffer; + EncodeString( value, &buffer ); + fprintf( cfile, "%s", buffer.c_str() ); + } +} + + +void TiXmlText::CopyTo( TiXmlText* target ) const +{ + TiXmlNode::CopyTo( target ); + target->cdata = cdata; +} + + +bool TiXmlText::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlText::Clone() const +{ + TiXmlText* clone = 0; + clone = new TiXmlText( "" ); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlDeclaration::TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} + + +#ifdef TIXML_USE_STL +TiXmlDeclaration::TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} +#endif + + +TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + copy.CopyTo( this ); +} + + +TiXmlDeclaration& TiXmlDeclaration::operator=( const TiXmlDeclaration& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + if ( cfile ) fprintf( cfile, "" ); + if ( str ) (*str) += "?>"; +} + + +void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->version = version; + target->encoding = encoding; + target->standalone = standalone; +} + + +bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlDeclaration::Clone() const +{ + TiXmlDeclaration* clone = new TiXmlDeclaration(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlUnknown::Print( FILE* cfile, int depth ) const +{ + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlUnknown::Clone() const +{ + TiXmlUnknown* clone = new TiXmlUnknown(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlAttributeSet::TiXmlAttributeSet() +{ + sentinel.next = &sentinel; + sentinel.prev = &sentinel; +} + + +TiXmlAttributeSet::~TiXmlAttributeSet() +{ + assert( sentinel.next == &sentinel ); + assert( sentinel.prev == &sentinel ); +} + + +void TiXmlAttributeSet::Add( TiXmlAttribute* addMe ) +{ + #ifdef TIXML_USE_STL + assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. + #else + assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. + #endif + + addMe->next = &sentinel; + addMe->prev = sentinel.prev; + + sentinel.prev->next = addMe; + sentinel.prev = addMe; +} + +void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe ) +{ + TiXmlAttribute* node; + + for( node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node == removeMe ) + { + node->prev->next = node->next; + node->next->prev = node->prev; + node->next = 0; + node->prev = 0; + return; + } + } + assert( 0 ); // we tried to remove a non-linked attribute. +} + + +#ifdef TIXML_USE_STL +TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node->name == name ) + return node; + } + return 0; +} + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} +#endif + + +TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( strcmp( node->name.c_str(), name ) == 0 ) + return node; + } + return 0; +} + + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} + + +#ifdef TIXML_USE_STL +std::istream& operator>> (std::istream & in, TiXmlNode & base) +{ + TIXML_STRING tag; + tag.reserve( 8 * 1000 ); + base.StreamIn( &in, &tag ); + + base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); + return in; +} +#endif + + +#ifdef TIXML_USE_STL +std::ostream& operator<< (std::ostream & out, const TiXmlNode & base) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out << printer.Str(); + + return out; +} + + +std::string& operator<< (std::string& out, const TiXmlNode& base ) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out.append( printer.Str() ); + + return out; +} +#endif + + +TiXmlHandle TiXmlHandle::FirstChild() const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement() const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild(); + for ( i=0; + child && iNextSibling(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild( value ); + for ( i=0; + child && iNextSibling( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement(); + for ( i=0; + child && iNextSiblingElement(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement( value ); + for ( i=0; + child && iNextSiblingElement( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +bool TiXmlPrinter::VisitEnter( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitExit( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) +{ + DoIndent(); + buffer += "<"; + buffer += element.Value(); + + for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ) + { + buffer += " "; + attrib->Print( 0, 0, &buffer ); + } + + if ( !element.FirstChild() ) + { + buffer += " />"; + DoLineBreak(); + } + else + { + buffer += ">"; + if ( element.FirstChild()->ToText() + && element.LastChild() == element.FirstChild() + && element.FirstChild()->ToText()->CDATA() == false ) + { + simpleTextPrint = true; + // no DoLineBreak()! + } + else + { + DoLineBreak(); + } + } + ++depth; + return true; +} + + +bool TiXmlPrinter::VisitExit( const TiXmlElement& element ) +{ + --depth; + if ( !element.FirstChild() ) + { + // nothing. + } + else + { + if ( simpleTextPrint ) + { + simpleTextPrint = false; + } + else + { + DoIndent(); + } + buffer += ""; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlText& text ) +{ + if ( text.CDATA() ) + { + DoIndent(); + buffer += ""; + DoLineBreak(); + } + else if ( simpleTextPrint ) + { + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + } + else + { + DoIndent(); + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) +{ + DoIndent(); + declaration.Print( 0, 0, &buffer ); + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlComment& comment ) +{ + DoIndent(); + buffer += ""; + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown ) +{ + DoIndent(); + buffer += "<"; + buffer += unknown.Value(); + buffer += ">"; + DoLineBreak(); + return true; +} + diff --git a/jf_itk/tinyxml.h b/jf_itk/tinyxml.h new file mode 100644 index 0000000..a3589e5 --- /dev/null +++ b/jf_itk/tinyxml.h @@ -0,0 +1,1805 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TINYXML_INCLUDED +#define TINYXML_INCLUDED + +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4786 ) +#endif + +#include +#include +#include +#include +#include + +// Help out windows: +#if defined( _DEBUG ) && !defined( DEBUG ) +#define DEBUG +#endif + +#ifdef TIXML_USE_STL + #include + #include + #include + #define TIXML_STRING std::string +#else + #include "tinystr.h" + #define TIXML_STRING TiXmlString +#endif + +// Deprecated library function hell. Compilers want to use the +// new safe versions. This probably doesn't fully address the problem, +// but it gets closer. There are too many compilers for me to fully +// test. If you get compilation troubles, undefine TIXML_SAFE +#define TIXML_SAFE + +#ifdef TIXML_SAFE + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + // Microsoft visual studio, version 2005 and higher. + #define TIXML_SNPRINTF _snprintf_s + #define TIXML_SSCANF sscanf_s + #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + //#pragma message( "Using _sn* functions." ) + #define TIXML_SNPRINTF _snprintf + #define TIXML_SSCANF sscanf + #elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + //#warning( "Using sn* functions." ) + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #else + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #endif +#endif + +class TiXmlDocument; +class TiXmlElement; +class TiXmlComment; +class TiXmlUnknown; +class TiXmlAttribute; +class TiXmlText; +class TiXmlDeclaration; +class TiXmlParsingData; + +const int TIXML_MAJOR_VERSION = 2; +const int TIXML_MINOR_VERSION = 6; +const int TIXML_PATCH_VERSION = 2; + +/* Internal structure for tracking location of items + in the XML file. +*/ +struct TiXmlCursor +{ + TiXmlCursor() { Clear(); } + void Clear() { row = col = -1; } + + int row; // 0 based. + int col; // 0 based. +}; + + +/** + Implements the interface to the "Visitor pattern" (see the Accept() method.) + If you call the Accept() method, it requires being passed a TiXmlVisitor + class to handle callbacks. For nodes that contain other nodes (Document, Element) + you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves + are simply called with Visit(). + + If you return 'true' from a Visit method, recursive parsing will continue. If you return + false, no children of this node or its sibilings will be Visited. + + All flavors of Visit methods have a default implementation that returns 'true' (continue + visiting). You need to only override methods that are interesting to you. + + Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting. + + You should never change the document from a callback. + + @sa TiXmlNode::Accept() +*/ +class TiXmlVisitor +{ +public: + virtual ~TiXmlVisitor() {} + + /// Visit a document. + virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; } + /// Visit a document. + virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; } + + /// Visit an element. + virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; } + /// Visit an element. + virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; } + + /// Visit a declaration + virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; } + /// Visit a text node + virtual bool Visit( const TiXmlText& /*text*/ ) { return true; } + /// Visit a comment node + virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; } + /// Visit an unknown node + virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; } +}; + +// Only used by Attribute::Query functions +enum +{ + TIXML_SUCCESS, + TIXML_NO_ATTRIBUTE, + TIXML_WRONG_TYPE +}; + + +// Used by the parsing routines. +enum TiXmlEncoding +{ + TIXML_ENCODING_UNKNOWN, + TIXML_ENCODING_UTF8, + TIXML_ENCODING_LEGACY +}; + +const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; + +/** TiXmlBase is a base class for every class in TinyXml. + It does little except to establish that TinyXml classes + can be printed and provide some utility functions. + + In XML, the document and elements can contain + other elements and other types of nodes. + + @verbatim + A Document can contain: Element (container or leaf) + Comment (leaf) + Unknown (leaf) + Declaration( leaf ) + + An Element can contain: Element (container or leaf) + Text (leaf) + Attributes (not on tree) + Comment (leaf) + Unknown (leaf) + + A Decleration contains: Attributes (not on tree) + @endverbatim +*/ +class TiXmlBase +{ + friend class TiXmlNode; + friend class TiXmlElement; + friend class TiXmlDocument; + +public: + TiXmlBase() : userData(0) {} + virtual ~TiXmlBase() {} + + /** All TinyXml classes can print themselves to a filestream + or the string class (TiXmlString in non-STL mode, std::string + in STL mode.) Either or both cfile and str can be null. + + This is a formatted print, and will insert + tabs and newlines. + + (For an unformatted stream, use the << operator.) + */ + virtual void Print( FILE* cfile, int depth ) const = 0; + + /** The world does not agree on whether white space should be kept or + not. In order to make everyone happy, these global, static functions + are provided to set whether or not TinyXml will condense all white space + into a single space or not. The default is to condense. Note changing this + value is not thread safe. + */ + static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } + + /// Return the current white space setting. + static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } + + /** Return the position, in the original source file, of this node or attribute. + The row and column are 1-based. (That is the first row and first column is + 1,1). If the returns values are 0 or less, then the parser does not have + a row and column value. + + Generally, the row and column value will be set when the TiXmlDocument::Load(), + TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set + when the DOM was created from operator>>. + + The values reflect the initial load. Once the DOM is modified programmatically + (by adding or changing nodes and attributes) the new values will NOT update to + reflect changes in the document. + + There is a minor performance cost to computing the row and column. Computation + can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. + + @sa TiXmlDocument::SetTabSize() + */ + int Row() const { return location.row + 1; } + int Column() const { return location.col + 1; } ///< See Row() + + void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + + // Table that returs, for a given lead byte, the total number of bytes + // in the UTF-8 sequence. + static const int utf8ByteTable[256]; + + virtual const char* Parse( const char* p, + TiXmlParsingData* data, + TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; + + /** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, + or they will be transformed into entities! + */ + static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out ); + + enum + { + TIXML_NO_ERROR = 0, + TIXML_ERROR, + TIXML_ERROR_OPENING_FILE, + TIXML_ERROR_PARSING_ELEMENT, + TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, + TIXML_ERROR_READING_ELEMENT_VALUE, + TIXML_ERROR_READING_ATTRIBUTES, + TIXML_ERROR_PARSING_EMPTY, + TIXML_ERROR_READING_END_TAG, + TIXML_ERROR_PARSING_UNKNOWN, + TIXML_ERROR_PARSING_COMMENT, + TIXML_ERROR_PARSING_DECLARATION, + TIXML_ERROR_DOCUMENT_EMPTY, + TIXML_ERROR_EMBEDDED_NULL, + TIXML_ERROR_PARSING_CDATA, + TIXML_ERROR_DOCUMENT_TOP_ONLY, + + TIXML_ERROR_STRING_COUNT + }; + +protected: + + static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); + + inline static bool IsWhiteSpace( char c ) + { + return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); + } + inline static bool IsWhiteSpace( int c ) + { + if ( c < 256 ) + return IsWhiteSpace( (char) c ); + return false; // Again, only truly correct for English/Latin...but usually works. + } + + #ifdef TIXML_USE_STL + static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); + static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); + #endif + + /* Reads an XML name into the string provided. Returns + a pointer just past the last character of the name, + or 0 if the function has an error. + */ + static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); + + /* Reads text. Returns a pointer past the given end tag. + Wickedly complex options, but it keeps the (sensitive) code in one place. + */ + static const char* ReadText( const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding ); // the current encoding + + // If an entity has been found, transform it into a character. + static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); + + // Get a character, while interpreting entities. + // The length can be from 0 to 4 bytes. + inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) + { + assert( p ); + if ( encoding == TIXML_ENCODING_UTF8 ) + { + *length = utf8ByteTable[ *((const unsigned char*)p) ]; + assert( *length >= 0 && *length < 5 ); + } + else + { + *length = 1; + } + + if ( *length == 1 ) + { + if ( *p == '&' ) + return GetEntity( p, _value, length, encoding ); + *_value = *p; + return p+1; + } + else if ( *length ) + { + //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), + // and the null terminator isn't needed + for( int i=0; p[i] && i<*length; ++i ) { + _value[i] = p[i]; + } + return p + (*length); + } + else + { + // Not valid text. + return 0; + } + } + + // Return true if the next characters in the stream are any of the endTag sequences. + // Ignore case only works for english, and should only be relied on when comparing + // to English words: StringEqual( p, "version", true ) is fine. + static bool StringEqual( const char* p, + const char* endTag, + bool ignoreCase, + TiXmlEncoding encoding ); + + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; + + TiXmlCursor location; + + /// Field containing a generic user pointer + void* userData; + + // None of these methods are reliable for any language except English. + // Good for approximation, not great for accuracy. + static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); + static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); + inline static int ToLower( int v, TiXmlEncoding encoding ) + { + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( v < 128 ) return tolower( v ); + return v; + } + else + { + return tolower( v ); + } + } + static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); + +private: + TiXmlBase( const TiXmlBase& ); // not implemented. + void operator=( const TiXmlBase& base ); // not allowed. + + struct Entity + { + const char* str; + unsigned int strLength; + char chr; + }; + enum + { + NUM_ENTITY = 5, + MAX_ENTITY_LENGTH = 6 + + }; + static Entity entity[ NUM_ENTITY ]; + static bool condenseWhiteSpace; +}; + + +/** The parent class for everything in the Document Object Model. + (Except for attributes). + Nodes have siblings, a parent, and children. A node can be + in a document, or stand on its own. The type of a TiXmlNode + can be queried, and it can be cast to its more defined type. +*/ +class TiXmlNode : public TiXmlBase +{ + friend class TiXmlDocument; + friend class TiXmlElement; + +public: + #ifdef TIXML_USE_STL + + /** An input stream operator, for every class. Tolerant of newlines and + formatting, but doesn't expect them. + */ + friend std::istream& operator >> (std::istream& in, TiXmlNode& base); + + /** An output stream operator, for every class. Note that this outputs + without any newlines or formatting, as opposed to Print(), which + includes tabs and new lines. + + The operator<< and operator>> are not completely symmetric. Writing + a node to a stream is very well defined. You'll get a nice stream + of output, without any extra whitespace or newlines. + + But reading is not as well defined. (As it always is.) If you create + a TiXmlElement (for example) and read that from an input stream, + the text needs to define an element or junk will result. This is + true of all input streams, but it's worth keeping in mind. + + A TiXmlDocument will read nodes until it reads a root element, and + all the children of that root element. + */ + friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); + + /// Appends the XML node or attribute to a std::string. + friend std::string& operator<< (std::string& out, const TiXmlNode& base ); + + #endif + + /** The types of XML nodes supported by TinyXml. (All the + unsupported types are picked up by UNKNOWN.) + */ + enum NodeType + { + TINYXML_DOCUMENT, + TINYXML_ELEMENT, + TINYXML_COMMENT, + TINYXML_UNKNOWN, + TINYXML_TEXT, + TINYXML_DECLARATION, + TINYXML_TYPECOUNT + }; + + virtual ~TiXmlNode(); + + /** The meaning of 'value' changes for the specific type of + TiXmlNode. + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + + The subclasses will wrap this function. + */ + const char *Value() const { return value.c_str (); } + + #ifdef TIXML_USE_STL + /** Return Value() as a std::string. If you only use STL, + this is more efficient than calling Value(). + Only available in STL mode. + */ + const std::string& ValueStr() const { return value; } + #endif + + const TIXML_STRING& ValueTStr() const { return value; } + + /** Changes the value of the node. Defined as: + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + */ + void SetValue(const char * _value) { value = _value;} + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Delete all the children of this node. Does not affect 'this'. + void Clear(); + + /// One step up the DOM. + TiXmlNode* Parent() { return parent; } + const TiXmlNode* Parent() const { return parent; } + + const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. + TiXmlNode* FirstChild() { return firstChild; } + const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. + /// The first child of this node with the matching 'value'. Will be null if none found. + TiXmlNode* FirstChild( const char * _value ) { + // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) + // call the method, cast the return back to non-const. + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); + } + const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. + TiXmlNode* LastChild() { return lastChild; } + + const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. + TiXmlNode* LastChild( const char * _value ) { + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. + #endif + + /** An alternate way to walk the children of a node. + One way to iterate over nodes is: + @verbatim + for( child = parent->FirstChild(); child; child = child->NextSibling() ) + @endverbatim + + IterateChildren does the same thing with the syntax: + @verbatim + child = 0; + while( child = parent->IterateChildren( child ) ) + @endverbatim + + IterateChildren takes the previous child as input and finds + the next one. If the previous child is null, it returns the + first. IterateChildren will return null when done. + */ + const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); + } + + /// This flavor of IterateChildren searches for children with a particular 'value' + const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + #endif + + /** Add a new node related to this. Adds a child past the LastChild. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); + + + /** Add a new node related to this. Adds a child past the LastChild. + + NOTE: the node to be added is passed by pointer, and will be + henceforth owned (and deleted) by tinyXml. This method is efficient + and avoids an extra copy, but should be used with care as it + uses a different memory model than the other insert functions. + + @sa InsertEndChild + */ + TiXmlNode* LinkEndChild( TiXmlNode* addThis ); + + /** Add a new node related to this. Adds a child before the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); + + /** Add a new node related to this. Adds a child after the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); + + /** Replace a child of this node. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); + + /// Delete a child of this node. + bool RemoveChild( TiXmlNode* removeThis ); + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling() const { return prev; } + TiXmlNode* PreviousSibling() { return prev; } + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling( const char * ) const; + TiXmlNode* PreviousSibling( const char *_prev ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Navigate to a sibling node. + const TiXmlNode* NextSibling() const { return next; } + TiXmlNode* NextSibling() { return next; } + + /// Navigate to a sibling node with the given 'value'. + const TiXmlNode* NextSibling( const char * ) const; + TiXmlNode* NextSibling( const char* _next ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement() const; + TiXmlElement* NextSiblingElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement( const char * ) const; + TiXmlElement* NextSiblingElement( const char *_next ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement() const; + TiXmlElement* FirstChildElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); + } + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement( const char * _value ) const; + TiXmlElement* FirstChildElement( const char * _value ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /** Query the type (as an enumerated value, above) of this node. + The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, + TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION. + */ + int Type() const { return type; } + + /** Return a pointer to the Document this node lives in. + Returns null if not in a document. + */ + const TiXmlDocument* GetDocument() const; + TiXmlDocument* GetDocument() { + return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); + } + + /// Returns true if this node has no children. + bool NoChildren() const { return !firstChild; } + + virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + /** Create an exact duplicate of this node and return it. The memory must be deleted + by the caller. + */ + virtual TiXmlNode* Clone() const = 0; + + /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the + XML tree will be conditionally visited and the host will be called back + via the TiXmlVisitor interface. + + This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse + the XML for the callbacks, so the performance of TinyXML is unchanged by using this + interface versus any other.) + + The interface has been based on ideas from: + + - http://www.saxproject.org/ + - http://c2.com/cgi/wiki?HierarchicalVisitorPattern + + Which are both good references for "visiting". + + An example of using Accept(): + @verbatim + TiXmlPrinter printer; + tinyxmlDoc.Accept( &printer ); + const char* xmlcstr = printer.CStr(); + @endverbatim + */ + virtual bool Accept( TiXmlVisitor* visitor ) const = 0; + +protected: + TiXmlNode( NodeType _type ); + + // Copy to the allocated object. Shared functionality between Clone, Copy constructor, + // and the assignment operator. + void CopyTo( TiXmlNode* target ) const; + + #ifdef TIXML_USE_STL + // The real work of the input operator. + virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; + #endif + + // Figure out what is at *p, and parse it. Returns null if it is not an xml node. + TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); + + TiXmlNode* parent; + NodeType type; + + TiXmlNode* firstChild; + TiXmlNode* lastChild; + + TIXML_STRING value; + + TiXmlNode* prev; + TiXmlNode* next; + +private: + TiXmlNode( const TiXmlNode& ); // not implemented. + void operator=( const TiXmlNode& base ); // not allowed. +}; + + +/** An attribute is a name-value pair. Elements have an arbitrary + number of attributes, each with a unique name. + + @note The attributes are not TiXmlNodes, since they are not + part of the tinyXML document object model. There are other + suggested ways to look at this problem. +*/ +class TiXmlAttribute : public TiXmlBase +{ + friend class TiXmlAttributeSet; + +public: + /// Construct an empty attribute. + TiXmlAttribute() : TiXmlBase() + { + document = 0; + prev = next = 0; + } + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlAttribute( const std::string& _name, const std::string& _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + #endif + + /// Construct an attribute with a name and value. + TiXmlAttribute( const char * _name, const char * _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + #ifdef TIXML_USE_STL + const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. + #endif + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + + // Get the tinyxml string representation + const TIXML_STRING& NameTStr() const { return name; } + + /** QueryIntValue examines the value string. It is an alternative to the + IntValue() method with richer error checking. + If the value is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. + + A specialized but useful call. Note that for success it returns 0, + which is the opposite of almost all other TinyXml calls. + */ + int QueryIntValue( int* _value ) const; + /// QueryDoubleValue examines the value string. See QueryIntValue(). + int QueryDoubleValue( double* _value ) const; + + void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. + void SetValue( const char* _value ) { value = _value; } ///< Set the value. + + void SetIntValue( int _value ); ///< Set the value from an integer. + void SetDoubleValue( double _value ); ///< Set the value from a double. + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetName( const std::string& _name ) { name = _name; } + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Get the next sibling attribute in the DOM. Returns null at end. + const TiXmlAttribute* Next() const; + TiXmlAttribute* Next() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); + } + + /// Get the previous sibling attribute in the DOM. Returns null at beginning. + const TiXmlAttribute* Previous() const; + TiXmlAttribute* Previous() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); + } + + bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } + bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } + bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } + + /* Attribute parsing starts: first letter of the name + returns: the next char after the value end quote + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + // Prints this Attribute to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + + // [internal use] + // Set the document pointer so the attribute can report errors. + void SetDocument( TiXmlDocument* doc ) { document = doc; } + +private: + TiXmlAttribute( const TiXmlAttribute& ); // not implemented. + void operator=( const TiXmlAttribute& base ); // not allowed. + + TiXmlDocument* document; // A pointer back to a document, for error reporting. + TIXML_STRING name; + TIXML_STRING value; + TiXmlAttribute* prev; + TiXmlAttribute* next; +}; + + +/* A class used to manage a group of attributes. + It is only used internally, both by the ELEMENT and the DECLARATION. + + The set can be changed transparent to the Element and Declaration + classes that use it, but NOT transparent to the Attribute + which has to implement a next() and previous() method. Which makes + it a bit problematic and prevents the use of STL. + + This version is implemented with circular lists because: + - I like circular lists + - it demonstrates some independence from the (typical) doubly linked list. +*/ +class TiXmlAttributeSet +{ +public: + TiXmlAttributeSet(); + ~TiXmlAttributeSet(); + + void Add( TiXmlAttribute* attribute ); + void Remove( TiXmlAttribute* attribute ); + + const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + + TiXmlAttribute* Find( const char* _name ) const; + TiXmlAttribute* FindOrCreate( const char* _name ); + +# ifdef TIXML_USE_STL + TiXmlAttribute* Find( const std::string& _name ) const; + TiXmlAttribute* FindOrCreate( const std::string& _name ); +# endif + + +private: + //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), + //*ME: this class must be also use a hidden/disabled copy-constructor !!! + TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed + void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) + + TiXmlAttribute sentinel; +}; + + +/** The element is a container class. It has a value, the element name, + and can contain other elements, text, comments, and unknowns. + Elements also contain an arbitrary number of attributes. +*/ +class TiXmlElement : public TiXmlNode +{ +public: + /// Construct an element. + TiXmlElement (const char * in_value); + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlElement( const std::string& _value ); + #endif + + TiXmlElement( const TiXmlElement& ); + + TiXmlElement& operator=( const TiXmlElement& base ); + + virtual ~TiXmlElement(); + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + */ + const char* Attribute( const char* name ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an integer, + the integer value will be put in the return 'i', if 'i' + is non-null. + */ + const char* Attribute( const char* name, int* i ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an double, + the double value will be put in the return 'd', if 'd' + is non-null. + */ + const char* Attribute( const char* name, double* d ) const; + + /** QueryIntAttribute examines the attribute - it is an alternative to the + Attribute() method with richer error checking. + If the attribute is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. If the attribute + does not exist, then TIXML_NO_ATTRIBUTE is returned. + */ + int QueryIntAttribute( const char* name, int* _value ) const; + /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute(). + int QueryUnsignedAttribute( const char* name, unsigned* _value ) const; + /** QueryBoolAttribute examines the attribute - see QueryIntAttribute(). + Note that '1', 'true', or 'yes' are considered true, while '0', 'false' + and 'no' are considered false. + */ + int QueryBoolAttribute( const char* name, bool* _value ) const; + /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). + int QueryDoubleAttribute( const char* name, double* _value ) const; + /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). + int QueryFloatAttribute( const char* name, float* _value ) const { + double d; + int result = QueryDoubleAttribute( name, &d ); + if ( result == TIXML_SUCCESS ) { + *_value = (float)d; + } + return result; + } + + #ifdef TIXML_USE_STL + /// QueryStringAttribute examines the attribute - see QueryIntAttribute(). + int QueryStringAttribute( const char* name, std::string* _value ) const { + const char* cstr = Attribute( name ); + if ( cstr ) { + *_value = std::string( cstr ); + return TIXML_SUCCESS; + } + return TIXML_NO_ATTRIBUTE; + } + + /** Template form of the attribute query which will try to read the + attribute into the specified type. Very easy, very powerful, but + be careful to make sure to call this with the correct type. + + NOTE: This method doesn't work correctly for 'string' types that contain spaces. + + @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE + */ + template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + std::stringstream sstream( node->ValueStr() ); + sstream >> *outValue; + if ( !sstream.fail() ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; + } + + int QueryValueAttribute( const std::string& name, std::string* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + *outValue = node->ValueStr(); + return TIXML_SUCCESS; + } + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char* name, const char * _value ); + + #ifdef TIXML_USE_STL + const std::string* Attribute( const std::string& name ) const; + const std::string* Attribute( const std::string& name, int* i ) const; + const std::string* Attribute( const std::string& name, double* d ) const; + int QueryIntAttribute( const std::string& name, int* _value ) const; + int QueryDoubleAttribute( const std::string& name, double* _value ) const; + + /// STL std::string form. + void SetAttribute( const std::string& name, const std::string& _value ); + ///< STL std::string form. + void SetAttribute( const std::string& name, int _value ); + ///< STL std::string form. + void SetDoubleAttribute( const std::string& name, double value ); + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char * name, int value ); + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetDoubleAttribute( const char * name, double value ); + + /** Deletes an attribute with the given name. + */ + void RemoveAttribute( const char * name ); + #ifdef TIXML_USE_STL + void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. + #endif + + const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. + TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } + const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. + TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } + + /** Convenience function for easy access to the text inside an element. Although easy + and concise, GetText() is limited compared to getting the TiXmlText child + and accessing it directly. + + If the first child of 'this' is a TiXmlText, the GetText() + returns the character string of the Text node, else null is returned. + + This is a convenient method for getting the text of simple contained text: + @verbatim + This is text + const char* str = fooElement->GetText(); + @endverbatim + + 'str' will be a pointer to "This is text". + + Note that this function can be misleading. If the element foo was created from + this XML: + @verbatim + This is text + @endverbatim + + then the value of str would be null. The first child node isn't a text node, it is + another element. From this XML: + @verbatim + This is text + @endverbatim + GetText() will return "This is ". + + WARNING: GetText() accesses a child node - don't become confused with the + similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are + safe type casts on the referenced node. + */ + const char* GetText() const; + + /// Creates a new Element and returns it - the returned element is a copy. + virtual TiXmlNode* Clone() const; + // Print the Element to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: next char past '<' + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + + void CopyTo( TiXmlElement* target ) const; + void ClearThis(); // like clear, but initializes 'this' object as well + + // Used to be public [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + /* [internal use] + Reads the "value" of the element -- another element, or text. + This should terminate with the current end tag. + */ + const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + +private: + TiXmlAttributeSet attributeSet; +}; + + +/** An XML comment. +*/ +class TiXmlComment : public TiXmlNode +{ +public: + /// Constructs an empty comment. + TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {} + /// Construct a comment from text. + TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) { + SetValue( _value ); + } + TiXmlComment( const TiXmlComment& ); + TiXmlComment& operator=( const TiXmlComment& base ); + + virtual ~TiXmlComment() {} + + /// Returns a copy of this Comment. + virtual TiXmlNode* Clone() const; + // Write this Comment to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: at the ! of the !-- + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlComment* target ) const; + + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif +// virtual void StreamOut( TIXML_OSTREAM * out ) const; + +private: + +}; + + +/** XML text. A text node can have 2 ways to output the next. "normal" output + and CDATA. It will default to the mode it was parsed from the XML file and + you generally want to leave it alone, but you can change the output mode with + SetCDATA() and query it with CDATA(). +*/ +class TiXmlText : public TiXmlNode +{ + friend class TiXmlElement; +public: + /** Constructor for text element. By default, it is treated as + normal, encoded text. If you want it be output as a CDATA text + element, set the parameter _cdata to 'true' + */ + TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + virtual ~TiXmlText() {} + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + #endif + + TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); } + TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; } + + // Write this text object to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /// Queries whether this represents text using a CDATA section. + bool CDATA() const { return cdata; } + /// Turns on or off a CDATA representation of text. + void SetCDATA( bool _cdata ) { cdata = _cdata; } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + /// [internal use] Creates a new Element and returns it. + virtual TiXmlNode* Clone() const; + void CopyTo( TiXmlText* target ) const; + + bool Blank() const; // returns true if all white space and new lines + // [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + bool cdata; // true if this should be input and output as a CDATA style text element +}; + + +/** In correct XML the declaration is the first entry in the file. + @verbatim + + @endverbatim + + TinyXml will happily read or write files without a declaration, + however. There are 3 possible attributes to the declaration: + version, encoding, and standalone. + + Note: In this version of the code, the attributes are + handled as special cases, not generic attributes, simply + because there can only be at most 3 and they are always the same. +*/ +class TiXmlDeclaration : public TiXmlNode +{ +public: + /// Construct an empty declaration. + TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {} + +#ifdef TIXML_USE_STL + /// Constructor. + TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ); +#endif + + /// Construct. + TiXmlDeclaration( const char* _version, + const char* _encoding, + const char* _standalone ); + + TiXmlDeclaration( const TiXmlDeclaration& copy ); + TiXmlDeclaration& operator=( const TiXmlDeclaration& copy ); + + virtual ~TiXmlDeclaration() {} + + /// Version. Will return an empty string if none was found. + const char *Version() const { return version.c_str (); } + /// Encoding. Will return an empty string if none was found. + const char *Encoding() const { return encoding.c_str (); } + /// Is this a standalone document? + const char *Standalone() const { return standalone.c_str (); } + + /// Creates a copy of this Declaration and returns it. + virtual TiXmlNode* Clone() const; + // Print this declaration to a FILE stream. + virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlDeclaration* target ) const; + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + + TIXML_STRING version; + TIXML_STRING encoding; + TIXML_STRING standalone; +}; + + +/** Any tag that tinyXml doesn't recognize is saved as an + unknown. It is a tag of text, but should not be modified. + It will be written back to the XML, unchanged, when the file + is saved. + + DTD tags get thrown into TiXmlUnknowns. +*/ +class TiXmlUnknown : public TiXmlNode +{ +public: + TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {} + virtual ~TiXmlUnknown() {} + + TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); } + TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; } + + /// Creates a copy of this Unknown and returns it. + virtual TiXmlNode* Clone() const; + // Print this Unknown to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected: + void CopyTo( TiXmlUnknown* target ) const; + + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + +}; + + +/** Always the top level node. A document binds together all the + XML pieces. It can be saved, loaded, and printed to the screen. + The 'value' of a document node is the xml file name. +*/ +class TiXmlDocument : public TiXmlNode +{ +public: + /// Create an empty document, that has no name. + TiXmlDocument(); + /// Create a document with a name. The name of the document is also the filename of the xml. + TiXmlDocument( const char * documentName ); + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlDocument( const std::string& documentName ); + #endif + + TiXmlDocument( const TiXmlDocument& copy ); + TiXmlDocument& operator=( const TiXmlDocument& copy ); + + virtual ~TiXmlDocument() {} + + /** Load a file using the current document value. + Returns true if successful. Will delete any existing + document data before loading. + */ + bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the current document value. Returns true if successful. + bool SaveFile() const; + /// Load a file using the given filename. Returns true if successful. + bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given filename. Returns true if successful. + bool SaveFile( const char * filename ) const; + /** Load a file using the given FILE*. Returns true if successful. Note that this method + doesn't stream - the entire object pointed at by the FILE* + will be interpreted as an XML file. TinyXML doesn't stream in XML from the current + file location. Streaming may be added in the future. + */ + bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given FILE*. Returns true if successful. + bool SaveFile( FILE* ) const; + + #ifdef TIXML_USE_STL + bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. + { + return LoadFile( filename.c_str(), encoding ); + } + bool SaveFile( const std::string& filename ) const ///< STL std::string version. + { + return SaveFile( filename.c_str() ); + } + #endif + + /** Parse the given null terminated block of xml data. Passing in an encoding to this + method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml + to use that encoding, regardless of what TinyXml might otherwise try to detect. + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + + /** Get the root element -- the only top level element -- of the document. + In well formed XML, there should only be one. TinyXml is tolerant of + multiple elements at the document level. + */ + const TiXmlElement* RootElement() const { return FirstChildElement(); } + TiXmlElement* RootElement() { return FirstChildElement(); } + + /** If an error occurs, Error will be set to true. Also, + - The ErrorId() will contain the integer identifier of the error (not generally useful) + - The ErrorDesc() method will return the name of the error. (very useful) + - The ErrorRow() and ErrorCol() will return the location of the error (if known) + */ + bool Error() const { return error; } + + /// Contains a textual (english) description of the error if one occurs. + const char * ErrorDesc() const { return errorDesc.c_str (); } + + /** Generally, you probably want the error string ( ErrorDesc() ). But if you + prefer the ErrorId, this function will fetch it. + */ + int ErrorId() const { return errorId; } + + /** Returns the location (if known) of the error. The first column is column 1, + and the first row is row 1. A value of 0 means the row and column wasn't applicable + (memory errors, for example, have no row/column) or the parser lost the error. (An + error in the error reporting, in that case.) + + @sa SetTabSize, Row, Column + */ + int ErrorRow() const { return errorLocation.row+1; } + int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occured. See ErrorRow() + + /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) + to report the correct values for row and column. It does not change the output + or input in any way. + + By calling this method, with a tab size + greater than 0, the row and column of each node and attribute is stored + when the file is loaded. Very useful for tracking the DOM back in to + the source file. + + The tab size is required for calculating the location of nodes. If not + set, the default of 4 is used. The tabsize is set per document. Setting + the tabsize to 0 disables row/column tracking. + + Note that row and column tracking is not supported when using operator>>. + + The tab size needs to be enabled before the parse or load. Correct usage: + @verbatim + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Load( "myfile.xml" ); + @endverbatim + + @sa Row, Column + */ + void SetTabSize( int _tabsize ) { tabsize = _tabsize; } + + int TabSize() const { return tabsize; } + + /** If you have handled the error, it can be reset with this call. The error + state is automatically cleared if you Parse a new XML block. + */ + void ClearError() { error = false; + errorId = 0; + errorDesc = ""; + errorLocation.row = errorLocation.col = 0; + //errorLocation.last = 0; + } + + /** Write the document to standard out using formatted printing ("pretty print"). */ + void Print() const { Print( stdout, 0 ); } + + /* Write the document to a string using formatted printing ("pretty print"). This + will allocate a character array (new char[]) and return it as a pointer. The + calling code pust call delete[] on the return char* to avoid a memory leak. + */ + //char* PrintToMemory() const; + + /// Print this Document to a FILE stream. + virtual void Print( FILE* cfile, int depth = 0 ) const; + // [internal use] + void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + + virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + // [internal use] + virtual TiXmlNode* Clone() const; + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + void CopyTo( TiXmlDocument* target ) const; + + bool error; + int errorId; + TIXML_STRING errorDesc; + int tabsize; + TiXmlCursor errorLocation; + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. +}; + + +/** + A TiXmlHandle is a class that wraps a node pointer with null checks; this is + an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml + DOM structure. It is a separate utility class. + + Take an example: + @verbatim + + + + + + + @endverbatim + + Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very + easy to write a *lot* of code that looks like: + + @verbatim + TiXmlElement* root = document.FirstChildElement( "Document" ); + if ( root ) + { + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. + @endverbatim + + And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity + of such code. A TiXmlHandle checks for null pointers so it is perfectly safe + and correct to use: + + @verbatim + TiXmlHandle docHandle( &document ); + TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); + if ( child2 ) + { + // do something useful + @endverbatim + + Which is MUCH more concise and useful. + + It is also safe to copy handles - internally they are nothing more than node pointers. + @verbatim + TiXmlHandle handleCopy = handle; + @endverbatim + + What they should not be used for is iteration: + + @verbatim + int i=0; + while ( true ) + { + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); + if ( !child ) + break; + // do something + ++i; + } + @endverbatim + + It seems reasonable, but it is in fact two embedded while loops. The Child method is + a linear walk to find the element, so this code would iterate much more than it needs + to. Instead, prefer: + + @verbatim + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); + + for( child; child; child=child->NextSiblingElement() ) + { + // do something + } + @endverbatim +*/ +class TiXmlHandle +{ +public: + /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. + TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } + /// Copy constructor + TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } + TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; } + + /// Return a handle to the first child node. + TiXmlHandle FirstChild() const; + /// Return a handle to the first child node with the given name. + TiXmlHandle FirstChild( const char * value ) const; + /// Return a handle to the first child element. + TiXmlHandle FirstChildElement() const; + /// Return a handle to the first child element with the given name. + TiXmlHandle FirstChildElement( const char * value ) const; + + /** Return a handle to the "index" child with the given name. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( const char* value, int index ) const; + /** Return a handle to the "index" child. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( int index ) const; + /** Return a handle to the "index" child element with the given name. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( const char* value, int index ) const; + /** Return a handle to the "index" child element. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( int index ) const; + + #ifdef TIXML_USE_STL + TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } + TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } + + TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } + TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } + #endif + + /** Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* ToNode() const { return node; } + /** Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } + /** Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } + /** Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } + + /** @deprecated use ToNode. + Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* Node() const { return ToNode(); } + /** @deprecated use ToElement. + Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* Element() const { return ToElement(); } + /** @deprecated use ToText() + Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* Text() const { return ToText(); } + /** @deprecated use ToUnknown() + Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* Unknown() const { return ToUnknown(); } + +private: + TiXmlNode* node; +}; + + +/** Print to memory functionality. The TiXmlPrinter is useful when you need to: + + -# Print to memory (especially in non-STL mode) + -# Control formatting (line endings, etc.) + + When constructed, the TiXmlPrinter is in its default "pretty printing" mode. + Before calling Accept() you can call methods to control the printing + of the XML document. After TiXmlNode::Accept() is called, the printed document can + be accessed via the CStr(), Str(), and Size() methods. + + TiXmlPrinter uses the Visitor API. + @verbatim + TiXmlPrinter printer; + printer.SetIndent( "\t" ); + + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + @endverbatim +*/ +class TiXmlPrinter : public TiXmlVisitor +{ +public: + TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), + buffer(), indent( " " ), lineBreak( "\n" ) {} + + virtual bool VisitEnter( const TiXmlDocument& doc ); + virtual bool VisitExit( const TiXmlDocument& doc ); + + virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); + virtual bool VisitExit( const TiXmlElement& element ); + + virtual bool Visit( const TiXmlDeclaration& declaration ); + virtual bool Visit( const TiXmlText& text ); + virtual bool Visit( const TiXmlComment& comment ); + virtual bool Visit( const TiXmlUnknown& unknown ); + + /** Set the indent characters for printing. By default 4 spaces + but tab (\t) is also useful, or null/empty string for no indentation. + */ + void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } + /// Query the indention string. + const char* Indent() { return indent.c_str(); } + /** Set the line breaking string. By default set to newline (\n). + Some operating systems prefer other characters, or can be + set to the null/empty string for no indenation. + */ + void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } + /// Query the current line breaking string. + const char* LineBreak() { return lineBreak.c_str(); } + + /** Switch over to "stream printing" which is the most dense formatting without + linebreaks. Common when the XML is needed for network transmission. + */ + void SetStreamPrinting() { indent = ""; + lineBreak = ""; + } + /// Return the result. + const char* CStr() { return buffer.c_str(); } + /// Return the length of the result string. + size_t Size() { return buffer.size(); } + + #ifdef TIXML_USE_STL + /// Return the result. + const std::string& Str() { return buffer; } + #endif + +private: + void DoIndent() { + for( int i=0; i +#include + +#include "tinyxml.h" + +//#define DEBUG_PARSER +#if defined( DEBUG_PARSER ) +# if defined( DEBUG ) && defined( _MSC_VER ) +# include +# define TIXML_LOG OutputDebugString +# else +# define TIXML_LOG printf +# endif +#endif + +// Note tha "PutString" hardcodes the same list. This +// is less flexible than it appears. Changing the entries +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] = +{ + { "&", 5, '&' }, + { "<", 4, '<' }, + { ">", 4, '>' }, + { """, 6, '\"' }, + { "'", 6, '\'' } +}; + +// Bunch of unicode info at: +// http://www.unicode.org/faq/utf_bom.html +// Including the basic of this table, which determines the #bytes in the +// sequence from the lead byte. 1 placed for invalid sequences -- +// although the result will be junk, pass it through as much as possible. +// Beware of the non-characters in UTF-8: +// ef bb bf (Microsoft "lead bytes") +// ef bf be +// ef bf bf + +const unsigned char TIXML_UTF_LEAD_0 = 0xefU; +const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; +const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + +const int TiXmlBase::utf8ByteTable[256] = +{ + // 0 1 2 3 4 5 6 7 8 9 a b c d e f + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid +}; + + +void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) +{ + const unsigned long BYTE_MASK = 0xBF; + const unsigned long BYTE_MARK = 0x80; + const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + if (input < 0x80) + *length = 1; + else if ( input < 0x800 ) + *length = 2; + else if ( input < 0x10000 ) + *length = 3; + else if ( input < 0x200000 ) + *length = 4; + else + { *length = 0; return; } // This code won't covert this correctly anyway. + + output += *length; + + // Scary scary fall throughs. + switch (*length) + { + case 4: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 3: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 2: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 1: + --output; + *output = (char)(input | FIRST_BYTE_MARK[*length]); + } +} + + +/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalpha( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalpha( anyByte ); +// } +} + + +/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalnum( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalnum( anyByte ); +// } +} + + +class TiXmlParsingData +{ + friend class TiXmlDocument; + public: + void Stamp( const char* now, TiXmlEncoding encoding ); + + const TiXmlCursor& Cursor() const { return cursor; } + + private: + // Only used by the document! + TiXmlParsingData( const char* start, int _tabsize, int row, int col ) + { + assert( start ); + stamp = start; + tabsize = _tabsize; + cursor.row = row; + cursor.col = col; + } + + TiXmlCursor cursor; + const char* stamp; + int tabsize; +}; + + +void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) +{ + assert( now ); + + // Do nothing if the tabsize is 0. + if ( tabsize < 1 ) + { + return; + } + + // Get the current row, column. + int row = cursor.row; + int col = cursor.col; + const char* p = stamp; + assert( p ); + + while ( p < now ) + { + // Treat p as unsigned, so we have a happy compiler. + const unsigned char* pU = (const unsigned char*)p; + + // Code contributed by Fletcher Dunn: (modified by lee) + switch (*pU) { + case 0: + // We *should* never get here, but in case we do, don't + // advance past the terminating null character, ever + return; + + case '\r': + // bump down to the next line + ++row; + col = 0; + // Eat the character + ++p; + + // Check for \r\n sequence, and treat this as a single character + if (*p == '\n') { + ++p; + } + break; + + case '\n': + // bump down to the next line + ++row; + col = 0; + + // Eat the character + ++p; + + // Check for \n\r sequence, and treat this as a single + // character. (Yes, this bizarre thing does occur still + // on some arcane platforms...) + if (*p == '\r') { + ++p; + } + break; + + case '\t': + // Eat the character + ++p; + + // Skip to next tab stop + col = (col / tabsize + 1) * tabsize; + break; + + case TIXML_UTF_LEAD_0: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( *(p+1) && *(p+2) ) + { + // In these cases, don't advance the column. These are + // 0-width spaces. + if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) + p += 3; + else + { p +=3; ++col; } // A normal character. + } + } + else + { + ++p; + ++col; + } + break; + + default: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // Eat the 1 to 4 byte utf8 character. + int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; + if ( step == 0 ) + step = 1; // Error case from bad encoding, but handle gracefully. + p += step; + + // Just advance one column, of course. + ++col; + } + else + { + ++p; + ++col; + } + break; + } + } + cursor.row = row; + cursor.col = col; + assert( cursor.row >= -1 ); + assert( cursor.col >= -1 ); + stamp = p; + assert( stamp ); +} + + +const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) +{ + if ( !p || !*p ) + { + return 0; + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + while ( *p ) + { + const unsigned char* pU = (const unsigned char*)p; + + // Skip the stupid Microsoft UTF-8 Byte order marks + if ( *(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+2)==TIXML_UTF_LEAD_2 ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbeU ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbfU ) + { + p += 3; + continue; + } + + if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. + ++p; + else + break; + } + } + else + { + while ( *p && IsWhiteSpace( *p ) ) + ++p; + } + + return p; +} + +#ifdef TIXML_USE_STL +/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ) +{ + for( ;; ) + { + if ( !in->good() ) return false; + + int c = in->peek(); + // At this scope, we can't get to a document. So fail silently. + if ( !IsWhiteSpace( c ) || c <= 0 ) + return true; + + *tag += (char) in->get(); + } +} + +/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) +{ + //assert( character > 0 && character < 128 ); // else it won't work in utf-8 + while ( in->good() ) + { + int c = in->peek(); + if ( c == character ) + return true; + if ( c <= 0 ) // Silent failure: can't get document at this scope + return false; + + in->get(); + *tag += (char) c; + } + return false; +} +#endif + +// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The +// "assign" optimization removes over 10% of the execution time. +// +const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) +{ + // Oddly, not supported on some comilers, + //name->clear(); + // So use this: + *name = ""; + assert( p ); + + // Names start with letters or underscores. + // Of course, in unicode, tinyxml has no idea what a letter *is*. The + // algorithm is generous. + // + // After that, they can be letters, underscores, numbers, + // hyphens, or colons. (Colons are valid ony for namespaces, + // but tinyxml can't tell namespaces from names.) + if ( p && *p + && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) + { + const char* start = p; + while( p && *p + && ( IsAlphaNum( (unsigned char ) *p, encoding ) + || *p == '_' + || *p == '-' + || *p == '.' + || *p == ':' ) ) + { + //(*name) += *p; // expensive + ++p; + } + if ( p-start > 0 ) { + name->assign( start, p-start ); + } + return p; + } + return 0; +} + +const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) +{ + // Presume an entity, and pull it out. + TIXML_STRING ent; + int i; + *length = 0; + + if ( *(p+1) && *(p+1) == '#' && *(p+2) ) + { + unsigned long ucs = 0; + ptrdiff_t delta = 0; + unsigned mult = 1; + + if ( *(p+2) == 'x' ) + { + // Hexadecimal. + if ( !*(p+3) ) return 0; + + const char* q = p+3; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != 'x' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else if ( *q >= 'a' && *q <= 'f' ) + ucs += mult * (*q - 'a' + 10); + else if ( *q >= 'A' && *q <= 'F' ) + ucs += mult * (*q - 'A' + 10 ); + else + return 0; + mult *= 16; + --q; + } + } + else + { + // Decimal. + if ( !*(p+2) ) return 0; + + const char* q = p+2; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != '#' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else + return 0; + mult *= 10; + --q; + } + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // convert the UCS to UTF-8 + ConvertUTF32ToUTF8( ucs, value, length ); + } + else + { + *value = (char)ucs; + *length = 1; + } + return p + delta + 1; + } + + // Now try to match it. + for( i=0; iappend( cArr, len ); + } + } + else + { + bool whitespace = false; + + // Remove leading white space: + p = SkipWhiteSpace( p, encoding ); + while ( p && *p + && !StringEqual( p, endTag, caseInsensitive, encoding ) ) + { + if ( *p == '\r' || *p == '\n' ) + { + whitespace = true; + ++p; + } + else if ( IsWhiteSpace( *p ) ) + { + whitespace = true; + ++p; + } + else + { + // If we've found whitespace, add it before the + // new character. Any whitespace just becomes a space. + if ( whitespace ) + { + (*text) += ' '; + whitespace = false; + } + int len; + char cArr[4] = { 0, 0, 0, 0 }; + p = GetChar( p, cArr, &len, encoding ); + if ( len == 1 ) + (*text) += cArr[0]; // more efficient + else + text->append( cArr, len ); + } + } + } + if ( p && *p ) + p += strlen( endTag ); + return ( p && *p ) ? p : 0; +} + +#ifdef TIXML_USE_STL + +void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + // The basic issue with a document is that we don't know what we're + // streaming. Read something presumed to be a tag (and hope), then + // identify it, and call the appropriate stream method on the tag. + // + // This "pre-streaming" will never read the closing ">" so the + // sub-tag can orient itself. + + if ( !StreamTo( in, '<', tag ) ) + { + SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + while ( in->good() ) + { + int tagIndex = (int) tag->length(); + while ( in->good() && in->peek() != '>' ) + { + int c = in->get(); + if ( c <= 0 ) + { + SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + break; + } + (*tag) += (char) c; + } + + if ( in->good() ) + { + // We now have something we presume to be a node of + // some sort. Identify it, and call the node to + // continue streaming. + TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); + + if ( node ) + { + node->StreamIn( in, tag ); + bool isElement = node->ToElement() != 0; + delete node; + node = 0; + + // If this is the root element, we're done. Parsing will be + // done by the >> operator. + if ( isElement ) + { + return; + } + } + else + { + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + } + } + // We should have returned sooner. + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); +} + +#endif + +const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) +{ + ClearError(); + + // Parse away, at the document level. Since a document + // contains nothing but other tags, most of what happens + // here is skipping white space. + if ( !p || !*p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + // Note that, for a document, this needs to come + // before the while space skip, so that parsing + // starts from the pointer we are given. + location.Clear(); + if ( prevData ) + { + location.row = prevData->cursor.row; + location.col = prevData->cursor.col; + } + else + { + location.row = 0; + location.col = 0; + } + TiXmlParsingData data( p, TabSize(), location.row, location.col ); + location = data.Cursor(); + + if ( encoding == TIXML_ENCODING_UNKNOWN ) + { + // Check for the Microsoft UTF-8 lead bytes. + const unsigned char* pU = (const unsigned char*)p; + if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 + && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 + && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) + { + encoding = TIXML_ENCODING_UTF8; + useMicrosoftBOM = true; + } + } + + p = SkipWhiteSpace( p, encoding ); + if ( !p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + while ( p && *p ) + { + TiXmlNode* node = Identify( p, encoding ); + if ( node ) + { + p = node->Parse( p, &data, encoding ); + LinkEndChild( node ); + } + else + { + break; + } + + // Did we get encoding info? + if ( encoding == TIXML_ENCODING_UNKNOWN + && node->ToDeclaration() ) + { + TiXmlDeclaration* dec = node->ToDeclaration(); + const char* enc = dec->Encoding(); + assert( enc ); + + if ( *enc == 0 ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + else + encoding = TIXML_ENCODING_LEGACY; + } + + p = SkipWhiteSpace( p, encoding ); + } + + // Was this empty? + if ( !firstChild ) { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); + return 0; + } + + // All is well. + return p; +} + +void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + // The first error in a chain is more accurate - don't set again! + if ( error ) + return; + + assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); + error = true; + errorId = err; + errorDesc = errorString[ errorId ]; + + errorLocation.Clear(); + if ( pError && data ) + { + data->Stamp( pError, encoding ); + errorLocation = data->Cursor(); + } +} + + +TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) +{ + TiXmlNode* returnNode = 0; + + p = SkipWhiteSpace( p, encoding ); + if( !p || !*p || *p != '<' ) + { + return 0; + } + + p = SkipWhiteSpace( p, encoding ); + + if ( !p || !*p ) + { + return 0; + } + + // What is this thing? + // - Elements start with a letter or underscore, but xml is reserved. + // - Comments: "; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // [ 1475201 ] TinyXML parses entities in comments + // Oops - ReadText doesn't work, because we don't want to parse the entities. + // p = ReadText( p, &value, false, endTag, false, encoding ); + // + // from the XML spec: + /* + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + references MUST NOT be recognized within comments. + + An example of a comment: + + + */ + + value = ""; + // Keep all the white space. + while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) + { + value.append( p, 1 ); + ++p; + } + if ( p && *p ) + p += strlen( endTag ); + + return p; +} + + +const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) return 0; + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + // Read the name, the '=' and the value. + const char* pErr = p; + p = ReadName( p, &name, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); + return 0; + } + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p || *p != '=' ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + ++p; // skip '=' + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + const char* end; + const char SINGLE_QUOTE = '\''; + const char DOUBLE_QUOTE = '\"'; + + if ( *p == SINGLE_QUOTE ) + { + ++p; + end = "\'"; // single quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else if ( *p == DOUBLE_QUOTE ) + { + ++p; + end = "\""; // double quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else + { + // All attribute values should be in single or double quotes. + // But this is such a common error that the parser will try + // its best, even without them. + value = ""; + while ( p && *p // existence + && !IsWhiteSpace( *p ) // whitespace + && *p != '/' && *p != '>' ) // tag end + { + if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { + // [ 1451649 ] Attribute values with trailing quotes not handled correctly + // We did not have an opening quote but seem to have a + // closing one. Give up and throw an error. + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + value += *p; + ++p; + } + } + return p; +} + +#ifdef TIXML_USE_STL +void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->peek(); + if ( !cdata && (c == '<' ) ) + { + return; + } + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + (*tag) += (char) c; + in->get(); // "commits" the peek made above + + if ( cdata && c == '>' && tag->size() >= 3 ) { + size_t len = tag->size(); + if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) { + // terminator of cdata. + return; + } + } + } +} +#endif + +const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + value = ""; + TiXmlDocument* document = GetDocument(); + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + + const char* const startTag = ""; + + if ( cdata || StringEqual( p, startTag, false, encoding ) ) + { + cdata = true; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // Keep all the white space, ignore the encoding, etc. + while ( p && *p + && !StringEqual( p, endTag, false, encoding ) + ) + { + value += *p; + ++p; + } + + TIXML_STRING dummy; + p = ReadText( p, &dummy, false, endTag, false, encoding ); + return p; + } + else + { + bool ignoreWhite = true; + + const char* end = "<"; + p = ReadText( p, &value, ignoreWhite, end, false, encoding ); + if ( p && *p ) + return p-1; // don't truncate the '<' + return 0; + } +} + +#ifdef TIXML_USE_STL +void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->get(); + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + (*tag) += (char) c; + + if ( c == '>' ) + { + // All is well. + return; + } + } +} +#endif + +const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) +{ + p = SkipWhiteSpace( p, _encoding ); + // Find the beginning, find the end, and look for + // the stuff in-between. + TiXmlDocument* document = GetDocument(); + if ( !p || !*p || !StringEqual( p, "SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); + return 0; + } + if ( data ) + { + data->Stamp( p, _encoding ); + location = data->Cursor(); + } + p += 5; + + version = ""; + encoding = ""; + standalone = ""; + + while ( p && *p ) + { + if ( *p == '>' ) + { + ++p; + return p; + } + + p = SkipWhiteSpace( p, _encoding ); + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + version = attrib.Value(); + } + else if ( StringEqual( p, "encoding", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + encoding = attrib.Value(); + } + else if ( StringEqual( p, "standalone", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + standalone = attrib.Value(); + } + else + { + // Read over whatever it is. + while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) + ++p; + } + } + return 0; +} + +bool TiXmlText::Blank() const +{ + for ( unsigned i=0; i +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//#include +using namespace std; +#ifdef __cplusplus +extern "C" { +#endif + + + int delete_msword(tag_t dataset,char *ext) +{ + tag_t spec_dataset_rev = NULLTAG , ref_object = NULLTAG; + AE_reference_type_t reference_type; + printf("\n111111111111\n"); + AE_ask_dataset_latest_rev(dataset, &spec_dataset_rev); + + char ref_name[WSO_name_size_c + 1] = "Fnd0word"; + //printf("\n22222222222\n"); + AE_ask_dataset_named_ref(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if(reference_type == AE_PART_OF) + { + printf("\n3333333333333\n"); + char pathname[SS_MAXPATHLEN] = ""; + IMF_ask_file_pathname(ref_object, SS_WNT_MACHINE, pathname); + char origin_file_name[IMF_filename_size_c + 1] = ""; + IMF_ask_original_file_name(ref_object, origin_file_name); + printf("\n44444444444444\n"); + char new_ds_name[WSO_name_size_c + 1] = ""; + char *new_file_name = USER_new_file_name(new_ds_name, ref_name, ext, 0); + char *temp_dir = getenv("temp"); + printf("\n555555555555\n"); + char temp_file[SS_MAXPATHLEN] = ""; + strcpy(temp_file, temp_dir); + strcat(temp_file, "\\"); + strcat(temp_file, new_file_name); + + IMF_export_file(ref_object, temp_file); + printf("\n66666666666666\n"); + + int iCnt; + char *user_lib_env,pTempStr[500]; + char local_path[MAX_PATH] = ""; + char cmd[256] = ""; + //user_lib_env = getenv("TC_USER_LIB"); + //strcpy(local_path, user_lib_env); + + //iCnt = strlen(user_lib_env); + //while( user_lib_env[iCnt] != '\\' ) + //{ + // iCnt--; + //} + + //strcpy(pTempStr,""); + //strcpy(pTempStr,&user_lib_env[iCnt+1]); + + //if( strcmp(pTempStr,"SubstMacros-MSWord.wsf") != 0 ) + //{ + // strcat( user_lib_env, "\\SubstMacros-MSWord.wsf" ); + //} + + //strcpy( cmd, user_lib_env ); + strcpy( cmd, "DeleteMacros-MSWord.wsf" ); + strcat( cmd, " \"" ); + strcat( cmd, temp_file ); + strcat( cmd, "\"" ); + printf( "\n%s\n",cmd ); + system( cmd ); + printf("\n777777777777\n"); + //strcpy(user_lib_env, local_path); + + + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + IMF_import_file(temp_file, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + IMF_set_original_file_name(new_file_tag, origin_file_name); + IMF_close_file(file_descriptor); + AOM_save(new_file_tag); + AOM_unlock(new_file_tag); + + AOM_lock(spec_dataset_rev); + + AE_remove_dataset_named_ref_by_tag(spec_dataset_rev, ref_name, ref_object); + + AE_add_dataset_named_ref(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag); + AOM_save(spec_dataset_rev); + AOM_unlock(spec_dataset_rev); + } + return ITK_ok; +} + + + + +int delete_msexcel(tag_t dataset, char *ext) +{ + tag_t spec_dataset_rev = NULLTAG, + ref_object = NULLTAG; + + AE_reference_type_t reference_type; + + AE_ask_dataset_latest_rev(dataset, &spec_dataset_rev); + + char ref_name[WSO_name_size_c + 1] = "excel"; + AE_ask_dataset_named_ref(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if(reference_type == AE_PART_OF) + { + char pathname[SS_MAXPATHLEN] = ""; + IMF_ask_file_pathname(ref_object, SS_WNT_MACHINE, pathname); + char origin_file_name[IMF_filename_size_c + 1] = ""; + IMF_ask_original_file_name(ref_object, origin_file_name); + + char new_ds_name[WSO_name_size_c + 1] = ""; + char *new_file_name = USER_new_file_name(new_ds_name, ref_name, ext, 0); + char *temp_dir = getenv("temp"); + char temp_file[SS_MAXPATHLEN] = ""; + strcpy(temp_file, temp_dir); + strcat(temp_file, "\\"); + strcat(temp_file, new_file_name); + + IMF_export_file(ref_object, temp_file); + + + int iCnt; + char *user_lib_env,pTempStr[500]; + char local_path[MAX_PATH] = ""; + char cmd[256] = ""; + /*user_lib_env = getenv("TC_USER_LIB"); + strcpy(local_path, user_lib_env); + + iCnt = strlen(user_lib_env); + while( user_lib_env[iCnt] != '\\' ) + { + iCnt--; + } + strcpy(pTempStr,""); + strcpy(pTempStr,&user_lib_env[iCnt+1]); + + if( strcmp(pTempStr,"SubstMacros-MSExcel.wsf") != 0 ) + { + strcat( user_lib_env, "\\SubstMacros-MSExcel.wsf" ); + }*/ + //strcpy( cmd, user_lib_env ); + strcpy( cmd, "DeleteMacros-MSExcel.wsf" ); + strcat( cmd, " \"" ); + strcat( cmd, temp_file ); + strcat( cmd, "\"" ); + printf( "\n%s\n",cmd ); + system( cmd ); + + //strcpy(user_lib_env, local_path); + + + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + IMF_import_file(temp_file, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + IMF_set_original_file_name(new_file_tag, origin_file_name); + IMF_close_file(file_descriptor); + AOM_save(new_file_tag); + AOM_unlock(new_file_tag); + + AOM_lock(spec_dataset_rev); + //CALL(AOM_load (dataset)); + //CALL(AOM_load(spec_dataset_rev)); + AE_remove_dataset_named_ref_by_tag(spec_dataset_rev, ref_name, ref_object); + AE_add_dataset_named_ref(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag); + AOM_save(spec_dataset_rev); + AOM_unlock(spec_dataset_rev); + } + + return ITK_ok; +} + + + + + + + int W2_Revise_clear_form( METHOD_message_t* msg, va_list args ) + { + int ifail = ITK_ok, i = 0, j = 0; + + char rev_type[ITEM_type_size_c + 1], + *optionname= "W2_Revise_clear_form";\ + map prop_map; + //int msgid = va_arg(args,int ); + tag_t new_rev = va_arg(args,tag_t ); + char* operation = va_arg(args,char* ); + + + /*tag_t parent_rev = va_arg(args,tag_t ); + int copyCount = va_arg(args,int ); + tag_t **obj_tags = va_arg(args,tag_t** );*/ + + printf("*******************************************************\n"); + printf("* W2_Revise_clear_form is comming *\n"); + printf("*******************************************************\n"); + + //printf("msgid==============================%d \n",msgid); + printf("new_rev==============================%d\n",new_rev); + char* id; + AOM_ask_value_string(new_rev,"object_type",&id); + printf("id==============================%s\n",id); + printf("operation==============================%s\n",operation); + //printf("parent_rev==============================%u\n",parent_rev); + //printf("copyCount==============================%d\n",copyCount); + + //-------------ȡѡ(origin+rev_type+_str),itemrevFormϵForm͡ + int option_value_count; + char **option_values; + char *PREF_W2_Revise_clear_form="WF_Revise_ItemRev";//ѡ + if(strcmp(operation,"Revise")!=0 && strcmp(operation,"SaveAs")!=0){ + return ifail; + } + ITKCALL(PREF_ask_char_values(PREF_W2_Revise_clear_form,&option_value_count,&option_values)); + printf("=====option_value_count======%d\n",option_value_count); + if(option_value_count == 0) + { + printf("optionѡ%s\n",PREF_W2_Revise_clear_form); + return ifail; + } + ////------------------ + //for (j = 1; j +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/** +* @headerfile standard c & cpp header files +*/ +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +/** +* @headerfile user's header files +*/ + + + diff --git a/jf_itk/w2_Clear_Form_PropValue.h b/jf_itk/w2_Clear_Form_PropValue.h new file mode 100644 index 0000000..ec00d9c --- /dev/null +++ b/jf_itk/w2_Clear_Form_PropValue.h @@ -0,0 +1,33 @@ + +#ifndef W2_CLEAR_FORM_PROPVALUE +#define W2_CLEAR_FORM_PROPVALUE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef __cplusplus +extern "C" { +#endif + extern USER_EXT_DLL_API int W2_Revise_clear_form( METHOD_message_t* msg, va_list args ); + + + +#ifdef __cplusplus +} +#endif +#include +#endif \ No newline at end of file diff --git a/jf_itk/x64/Release/Connor_CAD_Convert_PDF.obj b/jf_itk/x64/Release/Connor_CAD_Convert_PDF.obj new file mode 100644 index 0000000..7c6f2e9 Binary files /dev/null and b/jf_itk/x64/Release/Connor_CAD_Convert_PDF.obj differ diff --git a/jf_itk/x64/Release/Connor_CAD_Signature.obj b/jf_itk/x64/Release/Connor_CAD_Signature.obj new file mode 100644 index 0000000..5d8d325 Binary files /dev/null and b/jf_itk/x64/Release/Connor_CAD_Signature.obj differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.Build.CppClean.log b/jf_itk/x64/Release/DFLPLM_itk.Build.CppClean.log new file mode 100644 index 0000000..db21c2e --- /dev/null +++ b/jf_itk/x64/Release/DFLPLM_itk.Build.CppClean.log @@ -0,0 +1,25 @@ +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\vc142.pdb +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\common_itk_util.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\tinystr.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dfl_custom.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\string_utils.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\string_helper.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\signoff_rev.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\ocilib.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\libjf_custom_main.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\erp_utils.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\epm_register_handler.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\connor_util.obj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\x64\release\dflplm_itk.lib +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\x64\release\dflplm_itk.exp +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\x64\release\dflplm_itk.dll +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.ipdb +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.iobj +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\x64\release\dflplm_itk.pdb +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\cl.command.1.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\cl.read.1.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\cl.write.1.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\dflplm_itk.write.1u.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\link.command.1.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\link.read.1.tlog +c:\users\wangc\desktop\东富龙最新代码\dflplm_itk\jf_itk\x64\release\dflplm_itk.tlog\link.write.1.tlog diff --git a/jf_itk/x64/Release/DFLPLM_itk.dll.recipe b/jf_itk/x64/Release/DFLPLM_itk.dll.recipe new file mode 100644 index 0000000..bfbb2ab --- /dev/null +++ b/jf_itk/x64/Release/DFLPLM_itk.dll.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\wangc\Desktop\东富龙最新代码\DFLPLM_ITK\x64\Release\DFLPLM_itk.dll + + + + + + \ No newline at end of file diff --git a/jf_itk/x64/Release/DFLPLM_itk.lastbuildstate b/jf_itk/x64/Release/DFLPLM_itk.lastbuildstate new file mode 100644 index 0000000..7521caa --- /dev/null +++ b/jf_itk/x64/Release/DFLPLM_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v110:false +Release|x64|C:\Users\cloong\Desktop\DFLPLM_ITK\| diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.command.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.command.1.tlog new file mode 100644 index 0000000..c9da1fa Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.command.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.read.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.read.1.tlog new file mode 100644 index 0000000..4f4a0d1 Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.read.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.write.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.write.1.tlog new file mode 100644 index 0000000..1b63dea Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/CL.write.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.lastbuildstate b/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.lastbuildstate new file mode 100644 index 0000000..664aac1 --- /dev/null +++ b/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Release|x64|C:\Users\wangc\Desktop\东富龙最新代码\DFLPLM_ITK\| diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.write.1u.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.write.1u.tlog new file mode 100644 index 0000000..3e2c9a0 Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/DFLPLM_itk.write.1u.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/link.command.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.command.1.tlog new file mode 100644 index 0000000..4841355 Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.command.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/link.read.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.read.1.tlog new file mode 100644 index 0000000..2455275 Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.read.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.tlog/link.write.1.tlog b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.write.1.tlog new file mode 100644 index 0000000..b3b53ab Binary files /dev/null and b/jf_itk/x64/Release/DFLPLM_itk.tlog/link.write.1.tlog differ diff --git a/jf_itk/x64/Release/DFLPLM_itk.unsuccessfulbuild b/jf_itk/x64/Release/DFLPLM_itk.unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/jf_itk/x64/Release/FED_itk.lastbuildstate b/jf_itk/x64/Release/FED_itk.lastbuildstate new file mode 100644 index 0000000..402d111 --- /dev/null +++ b/jf_itk/x64/Release/FED_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v110:false +Release|x64|C:\Users\61666\Desktop\福尔达最新代码\福尔达服务端\FED_ITK\| diff --git a/jf_itk/x64/Release/JK_itk.Build.CppClean.log b/jf_itk/x64/Release/JK_itk.Build.CppClean.log new file mode 100644 index 0000000..3fbefca --- /dev/null +++ b/jf_itk/x64/Release/JK_itk.Build.CppClean.log @@ -0,0 +1,55 @@ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\COMMON_ITK_UTIL.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\VC110.PDB +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\STRING_UTILS.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\STRING_HELPER.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\OCILIB.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\LIBJF_CUSTOM_MAIN.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\JK_CUSTOM_ERP.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\JK_CUSTOM.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\HZ_CUSTOM.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\HX_CUSTOM.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\ERP_UTILS.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\ERP_SEND_ITEMS.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\EPM_SIGN_REV.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\EPM_SIGNOFF_DATASET.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\EPM_REGISTER_HANDLER.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\EPM_CHECK_STATUS.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\EPM_ATTACH_OBJECTS.OBJ +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\JF_ITK\X64\RELEASE\CONNOR_UTIL.OBJ +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\x64\Release\JK_itk.lib +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\x64\Release\JK_itk.exp +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\X64\RELEASE\JK_ITK.DLL +F:\CONNOR(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\X64\RELEASE\JK_ITK.PDB +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\common_itk_util.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\connor_util.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\epm_attach_objects.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\epm_check_status.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\epm_register_handler.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\epm_signoff_dataset.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\epm_sign_rev.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\erp_send_items.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\erp_utils.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\hx_custom.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\hz_custom.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\jk_custom.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\jk_custom_erp.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\libjf_custom_main.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\ocilib.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\string_helper.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\string_utils.obj +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\cl.command.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\CL.read.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\CL.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\JK_itk.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-cvtres.read.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-cvtres.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-mt.read.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-mt.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-rc.read.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link-rc.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link.command.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link.read.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\link.write.1.tlog +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\jf_itk\x64\Release\vc110.pdb +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\x64\Release\JK_itk.pdb +F:\Connor(项目管理)\金卡项目\二次开发代码\ITK\JK_ITK\x64\Release\JK_itk.dll diff --git a/jf_itk/x64/Release/JK_itk.lastbuildstate b/jf_itk/x64/Release/JK_itk.lastbuildstate new file mode 100644 index 0000000..9ea5ac6 --- /dev/null +++ b/jf_itk/x64/Release/JK_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v110:false +Release|x64|C:\Users\61666\Desktop\金卡服务端\JK_ITK\| diff --git a/jf_itk/x64/Release/SB_ERP_itk.Build.CppClean.log b/jf_itk/x64/Release/SB_ERP_itk.Build.CppClean.log new file mode 100644 index 0000000..7fe5a78 --- /dev/null +++ b/jf_itk/x64/Release/SB_ERP_itk.Build.CppClean.log @@ -0,0 +1,25 @@ +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\vc142.pdb +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\common_itk_util.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\tinystr.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_send_to_erp.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\string_utils.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\string_helper.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\signoff_rev.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\ocilib.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\libjf_custom_main.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\erp_utils.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\epm_register_handler.obj +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\connor_util.obj +d:\项目\世宝\sb_erp_itk\x64\release\sb_erp_itk.dll +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.ipdb +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.iobj +d:\项目\世宝\sb_erp_itk\x64\release\sb_erp_itk.pdb +d:\项目\世宝\sb_erp_itk\x64\release\sb_erp_itk.lib +d:\项目\世宝\sb_erp_itk\x64\release\sb_erp_itk.exp +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\cl.command.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\cl.read.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\cl.write.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\link.command.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\link.read.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\link.write.1.tlog +d:\项目\世宝\sb_erp_itk\jf_itk\x64\release\sb_erp_itk.tlog\sb_erp_itk.write.1u.tlog diff --git a/jf_itk/x64/Release/SB_ERP_itk.dll.recipe b/jf_itk/x64/Release/SB_ERP_itk.dll.recipe new file mode 100644 index 0000000..2b6494f --- /dev/null +++ b/jf_itk/x64/Release/SB_ERP_itk.dll.recipe @@ -0,0 +1,11 @@ + + + + + D:\项目\世宝\SB_ERP_ITK\x64\Release\SB_ERP_itk.dll + + + + + + \ No newline at end of file diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.command.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.command.1.tlog new file mode 100644 index 0000000..e4928ad Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.command.1.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.read.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.read.1.tlog new file mode 100644 index 0000000..bc9ef84 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.read.1.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.write.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.write.1.tlog new file mode 100644 index 0000000..b3cecc9 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/CL.write.1.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.lastbuildstate b/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.lastbuildstate new file mode 100644 index 0000000..cfaf565 --- /dev/null +++ b/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Release|x64|D:\项目\世宝\SB_ERP_ITK\| diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.write.1u.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.write.1u.tlog new file mode 100644 index 0000000..ef79496 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/SB_ERP_itk.write.1u.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/link.command.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.command.1.tlog new file mode 100644 index 0000000..05466c7 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.command.1.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/link.read.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.read.1.tlog new file mode 100644 index 0000000..5771fe5 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.read.1.tlog differ diff --git a/jf_itk/x64/Release/SB_ERP_itk.tlog/link.write.1.tlog b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.write.1.tlog new file mode 100644 index 0000000..3e88641 Binary files /dev/null and b/jf_itk/x64/Release/SB_ERP_itk.tlog/link.write.1.tlog differ diff --git a/jf_itk/x64/Release/WFPLM_itk.Build.CppClean.log b/jf_itk/x64/Release/WFPLM_itk.Build.CppClean.log new file mode 100644 index 0000000..3ededd7 --- /dev/null +++ b/jf_itk/x64/Release/WFPLM_itk.Build.CppClean.log @@ -0,0 +1,44 @@ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\COMMON_ITK_UTIL.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\VC110.PDB +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\WF_CUSTOM.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\W2_CLEAR_FORM_PROPVALUE.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\STRING_UTILS.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\STRING_HELPER.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\SIGNOFF_REV.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\OCILIB.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\LIBJF_CUSTOM_MAIN.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\ERP_UTILS.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\EPM_REGISTER_HANDLER.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\JF_ITK\X64\RELEASE\CONNOR_UTIL.OBJ +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\X64\RELEASE\WFPLM_ITK.DLL +C:\USERS\CLOONG\DESKTOP\万丰最新代码\WFPLM_ITK\X64\RELEASE\WFPLM_ITK.PDB +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\x64\Release\WFPLM_itk.lib +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\x64\Release\WFPLM_itk.exp +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\common_itk_util.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\connor_util.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\epm_register_handler.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\erp_utils.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\libjf_custom_main.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\ocilib.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\signoff_rev.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\string_helper.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\string_utils.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\w2_Clear_Form_PropValue.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\wf_custom.obj +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\cl.command.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\CL.read.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\CL.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-cvtres.read.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-cvtres.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-mt.read.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-mt.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-rc.read.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link-rc.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link.command.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link.read.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link.read.4.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\link.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\WFPLM_itk.write.1.tlog +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\jf_itk\x64\Release\vc110.pdb +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\x64\Release\WFPLM_itk.pdb +C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\x64\Release\WFPLM_itk.dll diff --git a/jf_itk/x64/Release/WFPLM_itk.lastbuildstate b/jf_itk/x64/Release/WFPLM_itk.lastbuildstate new file mode 100644 index 0000000..2aa9fd0 --- /dev/null +++ b/jf_itk/x64/Release/WFPLM_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v110:false +Release|x64|C:\Users\cloong\Desktop\万丰最新代码\WFPLM_ITK\| diff --git a/jf_itk/x64/Release/YB_ERP_itk.Build.CppClean.log b/jf_itk/x64/Release/YB_ERP_itk.Build.CppClean.log new file mode 100644 index 0000000..12cf986 --- /dev/null +++ b/jf_itk/x64/Release/YB_ERP_itk.Build.CppClean.log @@ -0,0 +1,17 @@ +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\vc142.pdb +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\common_itk_util.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\tinystr.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\string_utils.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\string_helper.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\signoff_rev.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\ocilib.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\libjf_custom_main.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\k_util.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\erp_utils.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\epm_register_handler.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\connor_util.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\connor_cad_signature.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\connor_cad_convert_pdf.obj +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\yb_erp_itk.tlog\cl.command.1.tlog +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\yb_erp_itk.tlog\cl.read.1.tlog +d:\恒帅\代码整理\itk\handler开发\yb_erp_itk\jf_itk\x64\release\yb_erp_itk.tlog\cl.write.1.tlog diff --git a/jf_itk/x64/Release/YB_ERP_itk.dll.recipe b/jf_itk/x64/Release/YB_ERP_itk.dll.recipe new file mode 100644 index 0000000..59cd003 --- /dev/null +++ b/jf_itk/x64/Release/YB_ERP_itk.dll.recipe @@ -0,0 +1,11 @@ + + + + + D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\x64\Release\YB_ERP_itk.dll + + + + + + \ No newline at end of file diff --git a/jf_itk/x64/Release/YB_ERP_itk.iobj b/jf_itk/x64/Release/YB_ERP_itk.iobj new file mode 100644 index 0000000..bc7db40 Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.iobj differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.ipdb b/jf_itk/x64/Release/YB_ERP_itk.ipdb new file mode 100644 index 0000000..8830cba Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.ipdb differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.command.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.command.1.tlog new file mode 100644 index 0000000..eaad2cb Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.command.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.read.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.read.1.tlog new file mode 100644 index 0000000..9c2f52f Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.read.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.write.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.write.1.tlog new file mode 100644 index 0000000..5c2e8ed Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/CL.write.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.lastbuildstate b/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.lastbuildstate new file mode 100644 index 0000000..87a515f --- /dev/null +++ b/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionMFC=14.29.30136:TargetPlatformVersion=10.0.19041.0: +Release|x64|D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\| diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.write.1u.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.write.1u.tlog new file mode 100644 index 0000000..0aee33a Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/YB_ERP_itk.write.1u.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/link.command.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.command.1.tlog new file mode 100644 index 0000000..40817d7 Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.command.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/link.delete.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.delete.1.tlog new file mode 100644 index 0000000..725083a Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.delete.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/link.read.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.read.1.tlog new file mode 100644 index 0000000..aba9b00 Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.read.1.tlog differ diff --git a/jf_itk/x64/Release/YB_ERP_itk.tlog/link.write.1.tlog b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.write.1.tlog new file mode 100644 index 0000000..f7e0764 Binary files /dev/null and b/jf_itk/x64/Release/YB_ERP_itk.tlog/link.write.1.tlog differ diff --git a/jf_itk/x64/Release/common_itk_util.obj b/jf_itk/x64/Release/common_itk_util.obj new file mode 100644 index 0000000..e9f29ca Binary files /dev/null and b/jf_itk/x64/Release/common_itk_util.obj differ diff --git a/jf_itk/x64/Release/connor_util.obj b/jf_itk/x64/Release/connor_util.obj new file mode 100644 index 0000000..92cc466 Binary files /dev/null and b/jf_itk/x64/Release/connor_util.obj differ diff --git a/jf_itk/x64/Release/epm_register_handler.obj b/jf_itk/x64/Release/epm_register_handler.obj new file mode 100644 index 0000000..92eb2da Binary files /dev/null and b/jf_itk/x64/Release/epm_register_handler.obj differ diff --git a/jf_itk/x64/Release/erp_utils.obj b/jf_itk/x64/Release/erp_utils.obj new file mode 100644 index 0000000..d3351da Binary files /dev/null and b/jf_itk/x64/Release/erp_utils.obj differ diff --git a/jf_itk/x64/Release/hz_itk.Build.CppClean.log b/jf_itk/x64/Release/hz_itk.Build.CppClean.log new file mode 100644 index 0000000..5ff40bc --- /dev/null +++ b/jf_itk/x64/Release/hz_itk.Build.CppClean.log @@ -0,0 +1,51 @@ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\STRING_UTILS.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\STRING_HELPER.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\OCILIB.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\LIBJF_CUSTOM_MAIN.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\HZ_CUSTOM.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\HX_CUSTOM.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\ERP_UTILS.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\ERP_SEND_ITEMS.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\EPM_SIGN_REV.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\EPM_SIGNOFF_DATASET.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\EPM_REGISTER_HANDLER.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\EPM_CHECK_STATUS.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\EPM_ATTACH_OBJECTS.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\CONNOR_UTIL.OBJ +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\VC110.PDB +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\JF_ITK\X64\RELEASE\COMMON_ITK_UTIL.OBJ +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\x64\Release\hz_itk.lib +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\x64\Release\hz_itk.exp +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\X64\RELEASE\HZ_ITK.DLL +F:\CONNOR(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\X64\RELEASE\HZ_ITK.PDB +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\common_itk_util.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\connor_util.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\epm_attach_objects.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\epm_check_status.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\epm_register_handler.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\epm_signoff_dataset.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\epm_sign_rev.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\erp_send_items.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\erp_utils.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\hx_custom.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\hz_custom.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\libjf_custom_main.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\ocilib.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\string_helper.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\string_utils.obj +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\cl.command.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\CL.read.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\CL.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\hz_itk.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-cvtres.read.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-cvtres.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-mt.read.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-mt.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-rc.read.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link-rc.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link.command.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link.read.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\link.write.1.tlog +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\jf_itk\x64\Release\vc110.pdb +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\x64\Release\hz_itk.pdb +F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\x64\Release\hz_itk.dll diff --git a/jf_itk/x64/Release/hz_itk.lastbuildstate b/jf_itk/x64/Release/hz_itk.lastbuildstate new file mode 100644 index 0000000..4633199 --- /dev/null +++ b/jf_itk/x64/Release/hz_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v110:false +Release|x64|F:\Connor(项目管理)\宏协\BYPASS\项目ITK\HZ_ITK\| diff --git a/jf_itk/x64/Release/jf_itk.Build.CppClean.log b/jf_itk/x64/Release/jf_itk.Build.CppClean.log new file mode 100644 index 0000000..779f4b4 --- /dev/null +++ b/jf_itk/x64/Release/jf_itk.Build.CppClean.log @@ -0,0 +1,29 @@ +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\cl.command.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\CL.read.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\CL.write.1.tlog +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\COMMON_ITK_UTIL.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\EPM_REGISTER_HANDLER.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\EPM_SIGN_REV.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\EPM_SIGNOFF_DATASET.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\ERP_SEND_ITEMS.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\ERP_UTILS.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\JF_ITK.DLL.INTERMEDIATE.MANIFEST +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\jf_itk.vcxprojResolveAssemblyReference.cache +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\jf_itk.write.1.tlog +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\LIBJF_CUSTOM_MAIN.OBJ +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\link.command.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\link.read.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\link.write.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\mt.command.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\mt.read.1.tlog +D:\Work\CONNOR\继峰\CODE\jf_itk\jf_itk\x64\Release\mt.write.1.tlog +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\OCILIB.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\STRING_HELPER.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\STRING_UTILS.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\TC_LOG.OBJ +D:\WORK\CONNOR\继峰\CODE\JF_ITK\JF_ITK\X64\RELEASE\VC100.PDB +D:\WORK\CONNOR\继峰\CODE\JF_ITK\X64\RELEASE\$LIBJF.DLL +D:\Work\CONNOR\继峰\CODE\jf_itk\x64\Release\jf_itk.exp +D:\Work\CONNOR\继峰\CODE\jf_itk\x64\Release\jf_itk.lib +D:\WORK\CONNOR\继峰\CODE\JF_ITK\X64\RELEASE\JF_ITK.PDB +D:\WORK\CONNOR\继峰\CODE\JF_ITK\X64\RELEASE\LIBJF.DLL diff --git a/jf_itk/x64/Release/jf_itk.lastbuildstate b/jf_itk/x64/Release/jf_itk.lastbuildstate new file mode 100644 index 0000000..8997680 --- /dev/null +++ b/jf_itk/x64/Release/jf_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|x64|F:\Connor(项目管理)\继峰项目\签名\jf_itk\| diff --git a/jf_itk/x64/Release/jf_itk.log b/jf_itk/x64/Release/jf_itk.log new file mode 100644 index 0000000..50f5607 --- /dev/null +++ b/jf_itk/x64/Release/jf_itk.log @@ -0,0 +1,128 @@ +D:\vs2019\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(513,5): warning MSB8028: 中间目录(x64\Release\)包含从另一个项目(DFLPLM_itk.vcxproj, SB_ERP_itk.vcxproj)共享的文件。 这会导致错误的清除和重新生成行为。 + common_itk_util.c +D:\dflittk\include\tc\emh_const.h(68,1): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated + Connor_CAD_Convert_PDF.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Convert_PDF.cpp(49,22): warning C4244: “=”: 从“SOCKET”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Convert_PDF.cpp(70,44): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Convert_PDF.cpp(45,8): warning C4101: “valread”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Convert_PDF.cpp(270,40): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 + Connor_CAD_Signature.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(38,28): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(50,24): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(58,33): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(63,25): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(74,25): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(128,10): warning C4477: “printf”: 格式字符串“%s”需要类型“char *”的参数,但可变参数 1 拥有了类型“std::string” +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(128,10): warning C4477: “printf”: 格式字符串“%s”需要类型“char *”的参数,但可变参数 2 拥有了类型“std::string” +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(282,44): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(256,8): warning C4101: “valread”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(385,40): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(503,44): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(528,22): warning C4244: “=”: 从“SOCKET”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(549,44): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(478,8): warning C4101: “valread”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(524,8): warning C4101: “valread”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\Connor_CAD_Signature.cpp(630,41): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 + connor_util.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\connor_util.cpp(40,34): warning C4101: “old_scope”: 未引用的局部变量 + epm_register_handler.cpp +D:\dflittk\include\tc\emh_const.h(68,1): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(66,29): warning C4101: “str”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(103,9): warning C4101: “now”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(102,56): warning C4101: “temp2”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(102,21): warning C4101: “expire_date”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(102,7): warning C4101: “date_buf”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(108,14): warning C4101: “mth_tag”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(104,17): warning C4101: “p”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(102,34): warning C4101: “env”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(102,44): warning C4101: “temp1”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\epm_register_handler.cpp(455,14): warning C4101: “mth_tag”: 未引用的局部变量 + erp_utils.cxx +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\erp_utils.cxx(16,34): warning C4101: “old_scope”: 未引用的局部变量 + k_util.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(33,7): warning C4834: 放弃具有 "nodiscard" 属性的函数的返回值 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(45,3): warning C4996: 'mkdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _mkdir. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(18,7): warning C4101: “guid”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(70,7): warning C4834: 放弃具有 "nodiscard" 属性的函数的返回值 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(82,3): warning C4996: 'mkdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _mkdir. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(56,7): warning C4101: “guid”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(215,9): warning C4101: “now”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(216,13): warning C4101: “p”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\k_util.cpp(233,26): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 + libjf_custom_main.cpp +D:\dflittk\include\tc\emh_const.h(68,1): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated + ocilib.cxx +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\ocilib.cxx(158,4): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\ocilib.cxx(181,4): warning C4267: “参数”: 从“size_t”转换到“ub4”,可能丢失数据 + signoff_rev.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\tc\emh_const.h(68,1): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(146,10): warning C4129: “c”: 不可识别的字符转义序列 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(70,7): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(51,8): warning C4101: “userName”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(119,12): warning C4101: “is_valid”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(322,8): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(330,12): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(337,12): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(344,12): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(347,13): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\signoff_rev.cpp(657,12): warning C4102: “end_handler”: 未引用的标签 + string_helper.cpp + string_utils.cxx +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + tinystr.cpp + yb_send_to_erp.cpp +D:\dflittk\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +D:\dflittk\include\tc\emh_const.h(68,1): warning C4995: “TC_include_tc_emh_const_h_deprecated”: 名称被标记为 #pragma deprecated +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(125,34): warning C4267: “初始化”: 从“size_t”转换到“unsigned long”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(126,11): warning C4018: “<”: 有符号/无符号不匹配 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(244,8): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(246,9): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(249,14): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(276,8): warning C4101: “value”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(295,7): warning C4101: “attrIDs”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(294,9): warning C4101: “attr”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(885,9): warning C4101: “values”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(1199,9): warning C4101: “target_type”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(1390,9): warning C4101: “target_type”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(1561,8): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(1622,74): warning C4101: “desc_path”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2138,33): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2162,30): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2045,10): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2103,8): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2255,4): warning C4102: “end”: 未引用的标签 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(1994,8): warning C4101: “type_class”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2052,31): warning C4101: “decision”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2054,15): warning C4101: “date”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2110,29): warning C4101: “decision”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2112,13): warning C4101: “date”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2455,16): warning C4996: 'access': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _access. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2458,8): warning C4996: 'mkdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _mkdir. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(2608,11): warning C4101: “excel_path”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3112,9): warning C4101: “values”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3147,9): warning C4101: “status”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3172,14): warning C4101: “tustatus”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3239,14): warning C4101: “tustatus”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3524,33): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3548,30): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3354,17): warning C4101: “memberType”: 未引用的局部变量 +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3642,8): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. +D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\jf_itk\yb_send_to_erp.cpp(3671,74): warning C4101: “desc_path”: 未引用的局部变量 + 正在创建库 D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\x64\Release\YB_ERP_itk.lib 和对象 D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\x64\Release\YB_ERP_itk.exp + 正在生成代码 + Previous IPDB was built with incompatible compiler, fall back to full compilation. + All 1489 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + 已完成代码的生成 + jf_itk.vcxproj -> D:\恒帅\代码整理\ITK\handler开发\YB_ERP_ITK\x64\Release\YB_ERP_itk.dll diff --git a/jf_itk/x64/Release/jf_itk.vcxproj.FileListAbsolute.txt b/jf_itk/x64/Release/jf_itk.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..e69de29 diff --git a/jf_itk/x64/Release/k_util.obj b/jf_itk/x64/Release/k_util.obj new file mode 100644 index 0000000..ee2578a Binary files /dev/null and b/jf_itk/x64/Release/k_util.obj differ diff --git a/jf_itk/x64/Release/libjf_custom_main.obj b/jf_itk/x64/Release/libjf_custom_main.obj new file mode 100644 index 0000000..b36ba1f Binary files /dev/null and b/jf_itk/x64/Release/libjf_custom_main.obj differ diff --git a/jf_itk/x64/Release/ocilib.obj b/jf_itk/x64/Release/ocilib.obj new file mode 100644 index 0000000..27fd531 Binary files /dev/null and b/jf_itk/x64/Release/ocilib.obj differ diff --git a/jf_itk/x64/Release/signoff_rev.obj b/jf_itk/x64/Release/signoff_rev.obj new file mode 100644 index 0000000..f715b7d Binary files /dev/null and b/jf_itk/x64/Release/signoff_rev.obj differ diff --git a/jf_itk/x64/Release/string_helper.obj b/jf_itk/x64/Release/string_helper.obj new file mode 100644 index 0000000..8397cfa Binary files /dev/null and b/jf_itk/x64/Release/string_helper.obj differ diff --git a/jf_itk/x64/Release/string_utils.obj b/jf_itk/x64/Release/string_utils.obj new file mode 100644 index 0000000..c5a72ee Binary files /dev/null and b/jf_itk/x64/Release/string_utils.obj differ diff --git a/jf_itk/x64/Release/tinystr.obj b/jf_itk/x64/Release/tinystr.obj new file mode 100644 index 0000000..cd30a06 Binary files /dev/null and b/jf_itk/x64/Release/tinystr.obj differ diff --git a/jf_itk/x64/Release/tmom_itk.Build.CppClean.log b/jf_itk/x64/Release/tmom_itk.Build.CppClean.log new file mode 100644 index 0000000..f18926d --- /dev/null +++ b/jf_itk/x64/Release/tmom_itk.Build.CppClean.log @@ -0,0 +1,27 @@ +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\cl.command.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\CL.read.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\CL.write.1.tlog +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\COMMON_ITK_UTIL.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\EPM_REGISTER_HANDLER.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\EPM_SIGN_REV.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\EPM_SIGNOFF_DATASET.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\ERP_SEND_ITEMS.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\ERP_UTILS.OBJ +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\jf_itk.vcxprojResolveAssemblyReference.cache +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\LIBJF_CUSTOM_MAIN.OBJ +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\link.command.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\link.read.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\link.write.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\mt.command.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\mt.read.1.tlog +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\mt.write.1.tlog +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\OCILIB.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\STRING_HELPER.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\STRING_UTILS.OBJ +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\TMOM_ITK.DLL.INTERMEDIATE.MANIFEST +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\jf_itk\x64\Release\tmom_itk.write.1.tlog +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\JF_ITK\X64\RELEASE\VC100.PDB +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\X64\RELEASE\TMOM_ITK.DLL +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\x64\Release\tmom_itk.exp +F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\x64\Release\tmom_itk.lib +F:\CONNOR(项目管理)\东睦项目\项目ITK\JF_ITK\X64\RELEASE\TMOM_ITK.PDB diff --git a/jf_itk/x64/Release/tmom_itk.lastbuildstate b/jf_itk/x64/Release/tmom_itk.lastbuildstate new file mode 100644 index 0000000..0fe1292 --- /dev/null +++ b/jf_itk/x64/Release/tmom_itk.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|x64|F:\Connor(项目管理)\东睦项目\项目ITK\jf_itk\| diff --git a/jf_itk/x64/Release/vc142.pdb b/jf_itk/x64/Release/vc142.pdb new file mode 100644 index 0000000..6943644 Binary files /dev/null and b/jf_itk/x64/Release/vc142.pdb differ diff --git a/jf_itk/x64/Release/yb_send_to_erp.obj b/jf_itk/x64/Release/yb_send_to_erp.obj new file mode 100644 index 0000000..1c82bd0 Binary files /dev/null and b/jf_itk/x64/Release/yb_send_to_erp.obj differ diff --git a/jf_itk/yb_send_to_erp.cpp b/jf_itk/yb_send_to_erp.cpp new file mode 100644 index 0000000..5429adb --- /dev/null +++ b/jf_itk/yb_send_to_erp.cpp @@ -0,0 +1,3703 @@ +#include "yb_send_to_erp.h" +#include "tccore\iman_msg.h" +#include +#include +#include + +#define ITK_err 919012 + +using namespace libxl; + + +extern "C" int POM_AM__set_application_bypass(logical bypass); + + +int len(char* p) +{ + int i = 0; + while (*p++)i++; + return i; +} +TCHAR* charToTchar(const char* szWord) { + //TCHAR tszWord[1024] = {0}; + //#ifdef UNICODE + //MultiByteToWideChar(CP_ACP, 0, szWord, -1, tszWord, 1024); + //#else + //strcpy(tszWord, szWord); + //#endif + //return tszWord; + + //char *CStr = "string to convert"; + + /*size_t len = strlen(szWord) + 1; + + size_t converted = 0; + + wchar_t *WStr; + + WStr = (wchar_t*)malloc(len*sizeof(wchar_t)); + + mbstowcs_s(&converted, WStr, len, szWord, _TRUNCATE);*/ + + + int iSize; + wchar_t* pwszUnicode; + + //返回接受字符串所需缓冲区的大小,已经包含字符结尾符'\0' + iSize = MultiByteToWideChar(CP_ACP, 0, szWord, -1, NULL, 0); //iSize =wcslen(pwsUnicode)+1=6 + pwszUnicode = (wchar_t*)malloc(iSize * sizeof(wchar_t)); //不需要 pwszUnicode = (wchar_t *)malloc((iSize+1)*sizeof(wchar_t)) + MultiByteToWideChar(CP_ACP, 0, szWord, -1, pwszUnicode, iSize); + + return pwszUnicode; +} +string WStringToString(const wstring& ws) +{ + string curLocale = setlocale(LC_ALL, NULL); // curLocale = "C"; + setlocale(LC_ALL, "chs"); + const wchar_t* _Source = ws.c_str(); + //cout< type_vec; + Split(str.c_str(), old_value.c_str(), type_vec); + char new_str[512] = "\0"; + for (int i = 0; i < type_vec.size(); i++) + { + strcat(new_str, type_vec[i].c_str()); + if (i < type_vec.size() - 1) { + strcat(new_str, new_value.c_str()); + } + } + string new_value(new_str); + str = new_value.c_str(); + } + return str; +} + +wstring StringToWString(const string& s) +{ + setlocale(LC_ALL, "chs"); + const char* _Source = s.c_str(); + size_t _Dsize = s.size() + 1; + wchar_t* _Dest = new wchar_t[_Dsize]; + wmemset(_Dest, 0, _Dsize); + mbstowcs(_Dest, _Source, _Dsize); + wstring result = _Dest; + delete[]_Dest; + setlocale(LC_ALL, "C"); + return result; +} +double stringToDouble(string num) +{ + bool minus = false; //标记是否是负数 + string real = num; //real表示num的绝对值 + if (num.at(0) == '-') + { + minus = true; + real = num.substr(1, num.size() - 1); + } + + char c; + int i = 0; + double result = 0.0, dec = 10.0; + bool isDec = false; //标记是否有小数 + unsigned long size = real.size(); + while (i < size) + { + c = real.at(i); + if (c == '.') + {//包含小数 + isDec = true; + i++; + continue; + } + if (!isDec) + { + result = result * 10 + c - '0'; + } + else + {//识别小数点之后都进入这个分支 + result = result + (c - '0') / dec; + dec *= 10; + } + i++; + } + + if (minus == true) { + result = -result; + } + + return result; +} +string DoubleToStringByStdToString(double value) +{ + ostringstream stream; + stream << value; + return stream.str(); + //const string& new_val = to_string(value); + //return new_val; +} +string doubleToString(const double& dbNum) +{ + char* chCode; + chCode = new(std::nothrow)char[20]; + sprintf(chCode, "%.2lf", dbNum); // .2 是控制输出精度的,两位小数 + string strCode(chCode); + delete[]chCode; + return strCode; +} + +int char2int(const char* str) { + const char* p = str; + bool neg = false; + int res = 0; + if (*str == '-' || *str == '+') { + str++; + } + + while (*str != 0) { + if (*str < '0' || *str > '9') { + break; + } + res = res * 10 + *str - '0'; + str++; + } + + if (*p == '-') { + res = -res; + } + return res; +} +void split(char* src, const char* separator, char** dest, int* num) { + /* + src 源字符串的首地址(buf的地址) + separator 指定的分割字符 + dest 接收子字符串的数组 + num 分割后子字符串的个数 + */ + char* pNext; + int count = 0; + if (src == NULL || strlen(src) == 0) //如果传入的地址为空或长度为0,直接终止 + return; + if (separator == NULL || strlen(separator) == 0) //如未指定分割的字符串,直接终止 + return; + pNext = (char*)strtok(src, separator); //必须使用(char *)进行强制类型转换(虽然不写有的编译器中不会出现指针错误) + while (pNext != NULL) { + *dest++ = pNext; + ++count; + pNext = (char*)strtok(NULL, separator); //必须使用(char *)进行强制类型转换 + } + *num = count; +} + +int Connor_set_bypass(void* returnValue) +{ + POM_AM__set_application_bypass(true); + return 0; +} + +int Connor_close_bypass(void* returnValue) +{ + POM_AM__set_application_bypass(false); + return 0; +} + +/** +* bypass +*/ +int Connor_bypass(EPM_action_message_t msg) { + ECHO("==================bypass START =======================\n"); + int ifail = ITK_ok, arg_cnt; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + int i = 0, j = 0; + BOOL bypass = FALSE; + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + POM_AM__set_application_bypass(true); + if (arg_cnt > 0) + { + for (i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ifail = ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (stricmp(argflag, "bypass") == 0) + { + if (stricmp(argvalue, "true") == 0) { + bypass = TRUE; + } + else if (stricmp(argvalue, "false") == 0) { + bypass = FALSE; + } + } + + } + if (argflag != NULL) { + MEM_free(argflag); + argflag = NULL; + } + if (argvalue != NULL) { + MEM_free(argvalue); + argvalue = NULL; + } + } + printf("bypass=%d /n", bypass); + POM_AM__set_application_bypass(bypass); + ECHO("==================bypass END =======================\n"); + return ifail; +} +//获取外购件分类属性 +//获取外购件分类属性 +int get_classValue(tag_t target, EPR_PRAT& item) { + printf("===================================\n"); + printf("获取分类属性 开始\n"); + printf("===================================\n"); + tag_t ico_tag; + char* value; + char* classId; + //char* name; + //ITKCALL(AOM_ask_value_string(target, "object_name", &name)); + char* uid; + ITK__convert_tag_to_uid(target, &uid); + ICS_ask_classification_object(target, &ico_tag); + ICS_ico_ask_class(ico_tag, &classId); + if (strcmp("", classId) == 0) { + return 1; + } + item.class_id.assign(classId); + printf(">> classId: %s\n", classId); + + int attr_cnt = 0, * attr_ids = NULL; + tag_t* attr_tags = NULL; + char** attr_names = NULL; + int theAttributeCount = 0; + tag_t* attr; + int* attrIDs; + map valueMap; + map::iterator iter; + + int num = 0; + char** names; + char** values; + ICS_ask_attributes_of_classification_obj(ico_tag, &num, &names, &values); + for (int i = 0; i < num; i++) + { + printf(">> name: %s value: %s\n", names[i], values[i]); + valueMap[names[i]] = values[i]; + + } + //ICS_class_ask_attributes(classId, &theAttributeCount, &attr, &attrIDs); + ////ICS_ico_ask_all_attributes(ico_tag, &theAttributeCount, &theAttributeIds, &theAttributeValCounts, &theAttributeValues); + //char* format = NULL; + //for (int j = 0; j < theAttributeCount; j++) { + + // char attrID[64] = ""; + // sprintf(attrID, "%d", attrIDs[j]); + // printf(">> attrID: %s\n", attrID); + // ICS_ask_attribute_value(ico_tag, attrID, &value); + // printf(">> value: %s\n", value); + // char search[64] = "\0"; + // sprintf(search, "-400 = %d", attrIDs[j]); + // ITKCALL(ICS_attribute_search(search, -400, ICS_SEARCH_CASE_INSENSITIVE, &attr_cnt, &attr_tags, &attr_ids, &attr_names)); + // ITKCALL(ICS_attribute_ask_property(attr_ids[0], "FORMAT1", &format)); + // printf(">> Format: %s\n", format); + // if (format != NULL && strcmp("", format) != 0 && strcmp(" ", format) != 0) { + // char* key_lov_name; + // int options = 0; + // int n_lov_entries = 0; + // char** lov_keys; + // char** lov_values; + // logical* deprecated_staus; + // char* owning_site; + // int n_shared_sites = 0; + // char** shared_sites; + // ICS_keylov_get_keylov(format, &key_lov_name, &options, &n_lov_entries, &lov_keys, &lov_values, &deprecated_staus, + // &owning_site, &n_shared_sites, &shared_sites); + // printf(">> 下拉值数量: %d\n", n_lov_entries); + // printf(">> 下拉值为: %s\n", value); + // string key = attr_names[0]; + // if (n_lov_entries == 0) { + // string val = value; + // valueMap[key] = val; + // //valueMap.insert(map < string, string >::value_type(key, val)); + // }else { + // for (int q = 0; q < n_lov_entries; q++) { + // if (strcmp(value, lov_keys[q]) == 0) { + // string val = lov_keys[q]; + // valueMap[key] = val; + // break; + // } + // } + // } + ///* if (key_lov_name != NULL) { + // DOFREE(key_lov_name); + // DOFREE(lov_keys); + // DOFREE(lov_values); + // DOFREE(deprecated_staus); + // DOFREE(owning_site); + // DOFREE(shared_sites); + // }*/ + // } + // DOFREE(attr_tags); + // DOFREE(attr_ids); + // DOFREE(attr_names); + // DOFREE(value); + // DOFREE(format); + //} + int c_sql_value_count = 0; + char** c_sql_values; + ITKCALL(PREF_ask_char_values("HS2_SQL_Connect2", &c_sql_value_count, &c_sql_values)); + if (c_sql_value_count != 3) + { + WriteLog("首选项 DFL2_SQL_Connect2 配置错误 数量%d ", c_sql_value_count); + CloseLog(); + return 0; + } + if (ConnServer(c_sql_values[1], c_sql_values[2], c_sql_values[0]))//"tc11","infodba","//172.16.50.40/tc11" "TC12","infodba","172.16.68.13/tc1" + { + printf("提示:中间数据表访问失败\n"); + return 1; + } + else { + printf("提示:中间数据表访问成功\n"); + char sql[1024] = "\0"; + sprintf(sql, "select * from AHMC_ERP_RULE where PCID= '%s'", classId); + printf("提示:获取拼接规则 开始\n"); + printf("提示:sql==%s\n", sql); + int outputColumn = 0, outputValueCount = 0; + char*** outputValue = NULL; + if (QuerySQLNoInputParam(sql, &outputColumn, &outputValueCount, &outputValue) == -1) + { + printf("提示:获取拼接规则 失败, %s \n", sql); + return 1; + } + printf("outputValueCount=%d\n", outputValueCount); + printf("outputColumn=%d\n", outputColumn); + //free(sql); + char* name_split = NULL; + char* spec_split = NULL; + char* bz_split = NULL; + char* unit_split = NULL; + char* code_split = NULL; + char names[2048] = { 0 }; + char specs[2048] = { 0 }; + char bzs[2048] = { 0 }; + char units[2048] = { 0 }; + char code[2048] = { 0 }; + if (outputValueCount > 0) { + name_split = outputValue[0][1]; + spec_split = outputValue[0][2]; + bz_split = outputValue[0][3]; + unit_split = outputValue[0][4]; + code_split = outputValue[0][5]; + printf("名称拼接====%s\n", name_split); + printf("规格拼接====%s\n", spec_split); + printf("客户包装拼接====%s\n", bz_split); + printf("单位拼接====%s\n", unit_split); + printf("客户代号拼接====%s\n", code_split); + vector type_vec1; + vector type_vec2; + vector type_vec3; + vector rev_vec; + char* rev_val; + if (strcmp("", name_split) != 0 && strcmp(" ", name_split) != 0) { + if (strstr(name_split, "/") != NULL) { + Split(name_split, "/", type_vec1); + for (int i = 0; i < type_vec1.size(); i++) + { + //map::iterator iter; + string val_str = ""; + if (strstr(type_vec1[i].c_str(), "rev.") != NULL) { + Split(type_vec1[i], ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(type_vec1[i]); + val_str = (iter->second).c_str(); + + } + if (strcmp("", val_str.c_str()) != 0 && (" ", val_str.c_str()) != 0) { + if (strcmp("", names) != 0 && strcmp(" ", names) != 0) { + strcat(names, "/"); + } + strcat(names, val_str.c_str()); + } + } + } + else { + //map::iterator iter; + string val_str = ""; + if (strstr(name_split, "rev.") != NULL) { + Split(name_split, ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(name_split); + val_str = (iter->second).c_str(); + + } + strcat(names, val_str.c_str()); + } + } + + if (strcmp("", spec_split) != 0 && strcmp(" ", spec_split) != 0) { + if (strstr(spec_split, "/") != NULL) { + Split(spec_split, "/", type_vec2); + for (int i = 0; i < type_vec2.size(); i++) + { + //map::iterator iter; + string val_str = ""; + if (strstr(type_vec2[i].c_str(), "rev.") != NULL) { + Split(type_vec2[i], ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(type_vec2[i]); + val_str = (iter->second).c_str(); + + } + if (strcmp("", val_str.c_str()) != 0 && (" ", val_str.c_str()) != 0) { + if (strcmp("", specs) != 0 && strcmp(" ", specs) != 0) { + strcat(specs, "/"); + } + strcat(specs, val_str.c_str()); + } + } + } + else { + //map::iterator iter; + string val_str = ""; + if (strstr(spec_split, "rev.") != NULL) { + Split(spec_split, ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(spec_split); + val_str = (iter->second).c_str(); + + } + strcat(specs, val_str.c_str()); + } + } + + if (strcmp("", bz_split) != 0 && strcmp(" ", bz_split) != 0) { + if (strstr(bz_split, "/") != NULL) { + Split(bz_split, "/", type_vec3); + for (int i = 0; i < type_vec3.size(); i++) + { + //map::iterator iter; + string val_str = ""; + if (strstr(type_vec3[i].c_str(), "rev.") != NULL) { + Split(type_vec3[i], ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(type_vec3[i]); + val_str = (iter->second).c_str(); + + } + if (strcmp("", val_str.c_str()) != 0 && (" ", val_str.c_str()) != 0) { + if (strcmp("", bzs) != 0 && strcmp(" ", bzs) != 0) { + strcat(bzs, "/"); + } + strcat(bzs, val_str.c_str()); + } + } + } + else { + //map::iterator iter; + string val_str = ""; + if (strstr(bz_split, "rev.") != NULL) { + Split(bz_split, ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(bz_split); + val_str = (iter->second).c_str(); + + } + strcat(bzs, val_str.c_str()); + } + } + + if (strcmp("", unit_split) != 0 && strcmp(" ", unit_split) != 0) { + string val_str = ""; + if (strstr(unit_split, "rev.") != NULL) { + Split(unit_split, ".", rev_vec); + ITKCALL(AOM_UIF_ask_value(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(unit_split); + val_str = (iter->second).c_str(); + + } + strcat(units, val_str.c_str()); + + } + if (strcmp("", code_split) != 0 && strcmp(" ", code_split) != 0) { + string val_str = ""; + if (strstr(code_split, "rev.") != NULL) { + Split(code_split, ".", rev_vec); + ITKCALL(AOM_ask_value_string(target, rev_vec[1].c_str(), &rev_val)); + val_str = rev_val; + rev_vec.clear(); + if (rev_val != NULL) { + DOFREE(rev_val); + } + } + else { + iter = valueMap.find(code_split); + val_str = (iter->second).c_str(); + + } + strcat(code, val_str.c_str()); + } + + + } + printf("提示:names==%s\n", names); + printf("提示:specs==%s\n", specs); + printf("提示:bzs==%s\n", bzs); + printf("提示:units==%s\n", units); + printf("提示:code==%s\n", code); + item.unit_code.assign(units); + item.code.assign(code); + if (strcmp(names, "") != 0 && strcmp(names, " ") != 0) { + item.name.assign(names); + } + else { + item.name.assign(" "); + } + if (strcmp(specs, "") != 0 && strcmp(specs, " ") != 0) { + item.spec.assign(specs); + } + else { + item.spec.assign(" "); + } + if (strcmp(bzs, "") != 0 && strcmp(bzs, " ") != 0) { + item.bzs.assign(bzs); + } + else { + item.bzs.assign(" "); + } + } + //if (ConnServer(c_sql_values[1], c_sql_values[2], c_sql_values[0]))//"tc11","infodba","//172.16.50.40/tc11" "TC12","infodba","172.16.68.13/tc1" + //{ + // printf("提示:中间数据表访问失败\n"); + // return 1; + //} + //else { + // printf("提示:中间数据表访问成功\n"); + // char sql[1024] = "\0"; + // sprintf(sql, "select * from AHMC_ERP_RULE where PCID= '%s'", classId); + // printf("提示:获取拼接规则 开始\n"); + // printf("提示:sql==%s\n", sql); + // int outputColumn = 0, outputValueCount = 0; + // char*** outputValue = NULL; + // if (QuerySQLNoInputParam(sql, &outputColumn, &outputValueCount, &outputValue) == -1) + // { + // printf("提示:获取拼接规则 失败, %s \n", sql); + // return 1; + // } + // printf("outputValueCount=%d\n", outputValueCount); + // printf("outputColumn=%d\n", outputColumn); + // //free(sql); + // char* name_split = NULL; + // char* spec_split = NULL; + // char* bz_split = NULL; + // char* unit_split = NULL; + // char* code_split = NULL; + // char names[2048] = { 0 }; + // char specs[2048] = { 0 }; + // char bzs[2048] = { 0 }; + // char units[2048] = { 0 }; + // char code[2048] = { 0 }; + // if (outputValueCount > 0) { + // name_split = outputValue[0][1]; + // spec_split = outputValue[0][2]; + // bz_split = outputValue[0][3]; + // unit_split = outputValue[0][4]; + // code_split = outputValue[0][5]; + // printf("名称拼接====%s\n", name_split); + // printf("规格拼接====%s\n", spec_split); + // printf("客户包装拼接====%s\n", bz_split); + // printf("单位拼接====%s\n", unit_split); + // printf("客户代号拼接====%s\n", code_split); + // vector type_vec1; + // vector type_vec2; + // vector type_vec3; + // char sql1[1024] = "\0"; + // char sql2[1024] = "\0"; + // char sql3[1024] = "\0"; + // char sql4[1024] = "\0"; + // char sql5[1024] = "\0"; + // if (strstr(name_split,"/") != NULL) { + // Split(name_split, "/", type_vec1); + // strcat(sql1, "select "); + // for (int i = 0; i < type_vec1.size(); i++) + // { + // strcat(sql1, type_vec1[i].c_str()); + // if (i < type_vec1.size() - 1) { + // strcat(sql1, ","); + // } + // } + // strcat(sql1, " from PICM0 where REREFU= '"); + // strcat(sql1, uid); + // strcat(sql1, "'"); + // } + // else { + // strcat(sql1,"select "); + // strcat(sql1, name_split); + // strcat(sql1, " from PICM0 where REREFU= '"); + // strcat(sql1, uid); + // strcat(sql1, "'"); + // } + // if (strstr(spec_split, "/") != NULL) { + // Split(spec_split, "/", type_vec2); + // strcat(sql2, "select "); + // for (int i = 0; i < type_vec2.size(); i++) + // { + // strcat(sql2, type_vec2[i].c_str()); + // if (i < type_vec2.size() - 1) { + // strcat(sql2, ","); + // } + // } + // strcat(sql2, " from PICM0 where REREFU= '"); + // strcat(sql2, uid); + // strcat(sql2, "'"); + // } + // else { + // strcat(sql2, "select "); + // strcat(sql2, spec_split); + // strcat(sql2, " from PICM0 where REREFU= '"); + // strcat(sql2, uid); + // strcat(sql2, "'"); + // } + // if (strstr(bz_split, "/") != NULL) { + // Split(bz_split, "/", type_vec3); + // strcat(sql3, "select "); + // for (int i = 0; i < type_vec3.size(); i++) + // { + // strcat(sql3, type_vec3[i].c_str()); + // if (i < type_vec3.size() - 1) { + // strcat(sql3, ","); + // } + // } + // strcat(sql3, " from PICM0 where REREFU= '"); + // strcat(sql3, uid); + // strcat(sql3, "'"); + // } + // else { + // strcat(sql3, "select "); + // strcat(sql3, bz_split); + // strcat(sql3, " from PICM0 where REREFU= '"); + // strcat(sql3, uid); + // strcat(sql3, "'"); + // } + // strcat(sql4, "select "); + // strcat(sql4, unit_split); + // strcat(sql4, " from PICM0 where REREFU= '"); + // strcat(sql4, uid); + // strcat(sql4, "'"); + // + // strcat(sql5, "select "); + // strcat(sql5, code_split); + // strcat(sql5, " from PICM0 where REREFU= '"); + // strcat(sql5, uid); + // strcat(sql5, "'"); + // + // printf("提示:sql1==%s\n", sql1); + // printf("提示:sql2==%s\n", sql2); + // printf("提示:sql3==%s\n", sql3); + // printf("提示:sql4==%s\n", sql4); + // printf("提示:sql5==%s\n", sql5); + // int outputColumn1 = 0, outputValueCount1 = 0; + // char*** outputValue1 = NULL; + // if (QuerySQLNoInputParam(sql1, &outputColumn1, &outputValueCount1, &outputValue1) == 0) + // { + // for (int i = 0; i < outputColumn1; i++) + // { + // if (strcmp(outputValue1[0][i],"") != 0 && strcmp(outputValue1[0][i], "") != 0 && strcmp(outputValue1[0][i], "null") != 0) { + // strcat(names, outputValue1[0][i]); + // if (i < outputColumn1 - 1) { + // strcat(names, "/"); + // } + // } + // } + + // } + // int outputColumn2 = 0, outputValueCount2 = 0; + // char*** outputValue2 = NULL; + // if (QuerySQLNoInputParam(sql2, &outputColumn2, &outputValueCount2, &outputValue2) == 0) + // { + + // for (int i = 0; i < outputColumn2; i++) + // { + // if (strcmp(outputValue2[0][i], "") != 0 && strcmp(outputValue2[0][i], "") != 0 && strcmp(outputValue2[0][i], "null") != 0) { + // strcat(specs, outputValue2[0][i]); + // if (i < outputColumn2 - 1) { + // strcat(specs, "/"); + // } + // } + // } + // } + // int outputColumn3 = 0, outputValueCount3 = 0; + // char*** outputValue3 = NULL; + // if (QuerySQLNoInputParam(sql3, &outputColumn3, &outputValueCount3, &outputValue3) == 0) + // { + // for (int i = 0; i < outputColumn3; i++) + // { + // if (strcmp(outputValue3[0][i], "") != 0 && strcmp(outputValue3[0][i], "") != 0 && strcmp(outputValue3[0][i], "null") != 0) { + // strcat(bzs, outputValue3[0][i]); + // if (i < outputColumn3 - 1) { + // strcat(bzs, "/"); + // } + // } + // } + // } + // int outputColumn4 = 0, outputValueCount4 = 0; + // char*** outputValue4 = NULL; + // if (QuerySQLNoInputParam(sql4, &outputColumn4, &outputValueCount4, &outputValue4) == 0) + // { + // if (strcmp(outputValue4[0][0], "") != 0 && strcmp(outputValue4[0][0], "") != 0 && strcmp(outputValue4[0][0], "null") != 0) { + // strcat(units, outputValue4[0][0]); + // } + // else { + // strcat(units, " "); + // } + // } + // int outputColumn5 = 0, outputValueCount5 = 0; + // char*** outputValue5 = NULL; + // if (QuerySQLNoInputParam(sql5, &outputColumn5, &outputValueCount5, &outputValue5) == 0) + // { + // if (strcmp(outputValue5[0][0], "") != 0 && strcmp(outputValue5[0][0], "") != 0 && strcmp(outputValue5[0][0], "null") != 0) { + // strcat(code, outputValue5[0][0]); + // } + // else { + // strcat(code, " "); + // } + // } + // } + // printf("提示:names==%s\n", names); + // printf("提示:specs==%s\n", specs); + // printf("提示:bzs==%s\n", bzs); + // printf("提示:units==%s\n", units); + // printf("提示:code==%s\n", code); + // item.unit_code.assign(units); + // item.code.assign(code); + // if (strcmp(names,"") != 0 && strcmp(names, " ") != 0) { + // item.name.assign(names); + // } + // else { + // item.name.assign(" "); + // } + // if (strcmp(specs, "") != 0 && strcmp(specs, " ") != 0) { + // item.spec.assign(specs); + // } + // else { + // item.spec.assign(" "); + // } + // if (strcmp(bzs, "") != 0 && strcmp(bzs, " ") != 0) { + // item.bzs.assign(bzs); + // } + // else { + // item.bzs.assign(" "); + // } + //} + valueMap.clear(); + DOFREE(classId); + DisConnServer(); + printf("===================================\n"); + printf("获取分类属性 结束\n"); + printf("===================================\n"); + return 0; +} +//物料传递erp +int HS_ERP_Part(EPM_action_message_t msg) { + printf("===================================\n"); + printf("物料传递erp 开始\n"); + printf("===================================\n"); + int ifail = ITK_ok; + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + //从流程中的参数 + tag_t task_tag = NULL_TAG, + root_task_tag = NULLTAG, + * attachments;; + task_tag = msg.task; + int att_cnt = 0; + int value_count = 0; + char** values; + char* mail_url; + ITKCALL(PREF_ask_char_value("Autocode_SendEmailServer_URL", 0, &mail_url)); + + char* url; + //ITKCALL(PREF_ask_char_values("HS_UNIT_CODE", &value_count, &values)); + ITKCALL(PREF_ask_char_value("HS_WL_URL", 0, &url)); + tag_t executor; + char* user_id; + char* user_uid; + char* person_name; + EPM_ask_root_task(task_tag, &root_task_tag); + ITKCALL(AOM_ask_value_tag(task_tag, "owning_user", &executor)); + tag_t person_tag = NULLTAG; + char* mail_str = NULL; + ITKCALL(ifail = AOM_ask_value_tag(executor, "person", &person_tag)); + ITKCALL(ifail = AOM_ask_value_string(person_tag, "PA9", &mail_str)); + + ITKCALL(AOM_ask_value_string(executor, "user_id", &user_id)); + POM_tag_to_uid(executor, &user_uid); + SA_ask_user_person_name2(executor, &person_name); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + char* taget_type; + vector part_vec; + for (int i = 0; i < att_cnt; i++) + { + tag_t target = attachments[i]; + boolean flag = false; + int form_count = 0; + tag_t* forms = NULLTAG; + tag_t master_form = NULLTAG; + ITKCALL(AOM_ask_value_string(target, "object_type", &taget_type)); + printf("taget_type=%s\n", taget_type); + if (((strstr(taget_type, "Revision") != NULL) || (strstr(taget_type, "revision") != NULL)) + && (strstr(taget_type, "Master") == NULL) && (strstr(taget_type, "master") == NULL) + && (strstr(taget_type, "BOM") == NULL) && (strstr(taget_type, "bom") == NULL) && (strstr(taget_type, "Bom") == NULL)) + { + EPR_PRAT part = {}; + char* value; + ITKCALL(AOM_ask_value_string(target, "item_id", &value)); + if (value != NULL) { + part.id.assign(value); + MEM_free(value); + value = NULL; + } + else { + part.id.assign(" "); + } + /* + ITKCALL(AOM_ask_value_string(target, "hs2_partscode", &value)); + if (value != NULL) { + part.code.assign(value); + MEM_free(value); + value = NULL; + } + else { + part.code.assign(" "); + } + + ITKCALL(AOM_ask_value_string(target, "hs2_unit", &value)); + + * ITKCALL(AOM_UIF_ask_value(target, "hs2_unit", &value)); + if (value != NULL) { + vector code_vec; + for (int k = 0; k < value_count; k++) { + if (strstr(values[k], "=") != NULL) { + Split(values[k], "=", code_vec); + if (strcmp(code_vec[0].c_str(), value) == 0) { + part.unit_code.assign(code_vec[1]); + } + } + } + MEM_free(value); + value = NULL; + } + else { + part.unit_code.assign(" "); + } + + if (value != NULL) { + part.unit_code.assign(value); + MEM_free(value); + value = NULL; + } + else { + part.unit_code.assign(" "); + } + */ + get_classValue(target, part); + part_vec.push_back(part); + + } + } + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char file_name[256] = ""; + char cmd[1000] = ""; + char* tc_root_dir = getenv("tc_root"); + sprintf(file_name, "%s-%d%d%d%d%d%d-PART", user_id, 1900 + lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); + + char path[128] = "\0"; + strcat(path, "D:\\Siemens\\PLMtoERPlogs"); + strcat(path, "\\"); + strcat(path, file_name); + strcat(path, ".txt"); + FILE* fpWrite = fopen(path, "w"); + printf("path=%s\n", path); + char part_value[20480] = "\0"; + for (int i = 0; i < part_vec.size(); i++) + { + strcat(part_value, (part_vec[i].id).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].name).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].spec).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].code).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].class_id).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].unit_code).c_str()); + strcat(part_value, ";"); + strcat(part_value, (part_vec[i].bzs).c_str()); + if (i < part_vec.size() - 1) { + strcat(part_value, "&"); + } + } + fprintf(fpWrite, "%s", part_value); + fclose(fpWrite); + char* all_mail_sjr; + ITKCALL(PREF_ask_char_value("HS2_SendEmailServer_ALL_SJR", 0, &all_mail_sjr)); + char mail_str_all[1024] = "\0"; + strcpy(mail_str_all, all_mail_sjr); + if (strstr(mail_str_all, mail_str) == NULL) { + strcat(mail_str_all, ","); + strcat(mail_str_all, mail_str); + } + + printf("mail_str_all=%s\n", mail_str_all); + printf("mail_url=%s\n", mail_url); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HSSendToERP.jar"); + strcat(cmd, " "); + strcat(cmd, "PART"); + strcat(cmd, " "); + strcat(cmd, path); + strcat(cmd, " "); + strcat(cmd, person_name); + strcat(cmd, " "); + strcat(cmd, url); + strcat(cmd, " "); + strcat(cmd, mail_str_all); + strcat(cmd, " "); + strcat(cmd, mail_url); + printf("%s", cmd); + WinExec(cmd, SW_NORMAL); + //system(cmd); + + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("物料传递erp 结束\n"); + printf("===================================\n"); + return ifail; +} + +void getchibomline_value(tag_t tagt, tag_t top_line_tag, vector& boms, boolean flag) { + int c_line_count = 0; + tag_t* c_line_tags = NULL; + printf("nnnn\n"); + tag_t fu_tag = NULLTAG; + ITKCALL(AOM_ask_value_tag(top_line_tag, "bl_line_object", &fu_tag));//获取BOMLINE关联的版本 + char* fu_id; + ITKCALL(BOM_line_ask_all_child_lines(top_line_tag, &c_line_count, &c_line_tags)); + EPR_BOM bom{}; + ITKCALL(AOM_ask_value_string(fu_tag, "item_id", &fu_id)); + printf("父件id==%s\n", fu_id); + bom.cinvCode = fu_id; + char* ver; + char* desc; + ITKCALL(AOM_ask_value_string(fu_tag, "item_revision_id", &ver)); + ITKCALL(AOM_ask_value_string(fu_tag, "object_desc", &desc)); + char ver_desc[128] = "\0"; + strcat(ver_desc, ver); + strcat(ver_desc, "-"); + strcat(ver_desc, desc); + bom.version = ver_desc; + vector zjs; + if (c_line_count == 0) { + printf("下面没有BOM结构\n"); + } + else { + for (int m = 0; m < c_line_count; m++) + { + EPR_ZJ zj{}; + tag_t c_line_tag = c_line_tags[m]; + char* zi_id; + char* zi_num; + char* zi_jc_num; + char* seq; + //char seq[128] = "\0"; + //sprintf(seq,"%d",m+1); + tag_t zi_tag = NULLTAG; + ITKCALL(AOM_ask_value_tag(c_line_tag, "bl_line_object", &zi_tag));//获取BOMLINE关联的版本 + ITKCALL(AOM_ask_value_string(zi_tag, "item_id", &zi_id)); + ITKCALL(AOM_ask_value_string(c_line_tag, "bl_quantity", &zi_num)); + ITKCALL(AOM_ask_value_string(c_line_tag, "bl_occ_hs2_QtyD", &zi_jc_num)); + ITKCALL(AOM_ask_value_string(c_line_tag, "bl_sequence_no", &seq)); + printf("子件行号=%s\n", seq); + if (zi_id != NULL) { + zj.invCode = zi_id; + } + else { + zj.invCode = " "; + } + if (seq != NULL) { + zj.sortSeq = seq; + } + else { + zj.sortSeq = " "; + } + if (zi_num != NULL) { + zj.baseQtyN = zi_num; + } + else { + zj.baseQtyN = " "; + } + if (zi_jc_num != NULL) { + zj.baseQtyD = zi_jc_num; + } + else { + zj.baseQtyD = " "; + } + zjs.push_back(zj); + } + bom.zjs = zjs; + } + boms.push_back(bom); + if (flag) { + if (c_line_count == 0) { + printf("下面没有BOM结构\n"); + } + else { + for (int m = 0; m < c_line_count; m++) + { + tag_t c_line_tag = c_line_tags[m]; + int c_c_line_count = 0; + tag_t* c_c_line_tags = NULL; + ITKCALL(BOM_line_ask_all_child_lines(c_line_tag, &c_c_line_count, &c_c_line_tags)); + if (c_c_line_count > 0) + { + getchibomline_value(tagt, c_line_tag, boms, flag); + } + } + } + } + +} +//BOM传递erp-全部层级 +int HS_ERP_BOM_ALL(EPM_action_message_t msg) +{ + printf("===================================\n"); + printf("BOM传递erp 开始\n"); + printf("===================================\n"); + int ifail = ITK_ok; + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + int att_cnt = 0; + //从流程中的参数 + tag_t task_tag = NULL_TAG, + root_task_tag = NULLTAG, + * attachments;; + task_tag = msg.task; + tag_t executor; + char* user_id; + char* user_uid; + EPM_ask_root_task(task_tag, &root_task_tag); + char* mail_url; + ITKCALL(PREF_ask_char_value("Autocode_SendEmailServer_URL", 0, &mail_url)); + char* url; + ITKCALL(PREF_ask_char_value("HS_BOM_URL", 0, &url)); + char* person_name; + ITKCALL(AOM_ask_value_tag(task_tag, "owning_user", &executor)); + tag_t person_tag = NULLTAG; + char* mail_str = NULL; + ITKCALL(ifail = AOM_ask_value_tag(executor, "person", &person_tag)); + ITKCALL(ifail = AOM_ask_value_string(person_tag, "PA9", &mail_str)); + ITKCALL(AOM_ask_value_string(executor, "user_id", &user_id)); + SA_ask_user_person_name2(executor, &person_name); + POM_tag_to_uid(executor, &user_uid); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + vector boms; + string str = ""; + for (int i = 0; i < att_cnt; i++) + { + tag_t tagt = attachments[i];// + char* id = NULL; + char* item_rev = NULL; + char* uid = NULL; + char* object_string = NULL; + if (checkIsTypeOrSubtype(tagt, "PSBOMViewRevision") != 1) + { + printf("类型不是PSBOMViewRevision\n"); + continue; + } + printf("类型是PSBOMViewRevision,继续\n"); + int c_line_count = 0; + tag_t bom_window_tag = NULLTAG, + top_line_tag = NULLTAG, + target_tag = NULLTAG, + * c_line_tags; + char* target_type; + ITKCALL(ifail = AOM_ask_value_string(tagt, "object_string", &object_string)); + if (strcmp("", str.c_str()) == 0) { + str = object_string; + if (strstr(str.c_str(), "/") != NULL) { + str = replace_all(str, "/", "-"); + } + } + + ITKCALL(BOM_create_window(&bom_window_tag));//创建window视图 + ITKCALL(BOM_set_window_top_line_bvr(bom_window_tag, tagt, &top_line_tag));//获取顶层bomline + ITKCALL(AOM_ask_value_tag(top_line_tag, "bl_line_object", &target_tag));//获取BOMLINE关联的版本 + ITKCALL(BOM_line_ask_all_child_lines(top_line_tag, &c_line_count, &c_line_tags)); + if (c_line_count == 0) { + printf("没有BOM结构\n"); + } + else { + boolean flag = true; + getchibomline_value(tagt, top_line_tag, boms, flag); + } + ITKCALL(BOM_close_window(bom_window_tag)); + + + } + if (boms.size() > 0) { + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char file_name[256] = ""; + char cmd[1024] = ""; + char* tc_root_dir = getenv("tc_root"); + sprintf(file_name, "%s-%d%02d%02d%02d%02d%02d-BOM-%s", user_id, 1900 + lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec, str.c_str()); + + char path[128] = "\0"; + strcat(path, "D:\\Siemens\\PLMtoERPlogs"); + strcat(path, "\\"); + strcat(path, file_name); + strcat(path, ".txt"); + FILE* fpWrite = fopen(path, "w"); + for (int j = 0; j < boms.size(); j++) + { + vector zjs = boms[j].zjs; + char bom_value[8000] = "\0"; + strcat(bom_value, (boms[j].cinvCode).c_str()); + strcat(bom_value, ";"); + strcat(bom_value, (boms[j].version).c_str()); + strcat(bom_value, "|"); + for (int k = 0; k < zjs.size(); k++) + { + if (strcmp("", (zjs[k].sortSeq).c_str()) == 0) { + strcat(bom_value, " "); + } + else { + strcat(bom_value, (zjs[k].sortSeq).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].invCode).c_str()) == 0) { + strcat(bom_value, " "); + } + else { + strcat(bom_value, (zjs[k].invCode).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].baseQtyN).c_str()) == 0 || strcmp(" ", (zjs[k].baseQtyN).c_str()) == 0) { + strcat(bom_value, "1"); + } + else { + strcat(bom_value, (zjs[k].baseQtyN).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].baseQtyD).c_str()) == 0 || strcmp(" ", (zjs[k].baseQtyD).c_str()) == 0) { + strcat(bom_value, "1"); + } + else { + strcat(bom_value, (zjs[k].baseQtyD).c_str()); + } + if (k < zjs.size() - 1) { + strcat(bom_value, "&"); + } + + } + fprintf(fpWrite, "%s\n", bom_value); + } + fclose(fpWrite); + char* all_mail_sjr; + ITKCALL(PREF_ask_char_value("HS2_SendEmailServer_ALL_SJR", 0, &all_mail_sjr)); + char mail_str_all[1024] = "\0"; + strcpy(mail_str_all, all_mail_sjr); + if (strstr(mail_str_all, mail_str) == NULL) { + strcat(mail_str_all, ","); + strcat(mail_str_all, mail_str); + } + + printf("mail_str_all=%s\n", mail_str_all); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HSSendToERP.jar"); + strcat(cmd, " "); + strcat(cmd, "BOM"); + strcat(cmd, " "); + strcat(cmd, path); + strcat(cmd, " "); + strcat(cmd, person_name); + strcat(cmd, " "); + strcat(cmd, url); + strcat(cmd, " "); + strcat(cmd, mail_str_all); + strcat(cmd, " "); + strcat(cmd, mail_url); + printf("%s", cmd); + WinExec(cmd, SW_NORMAL); + //system(cmd); + + + //AOM_lock(master_form); + //ITKCALL(AOM_set_value_string(master_form, "y4_ERPwlzt", "已传递")); + //AOM_save(master_form); + //AOM_unlock(master_form); + } + + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("BOM传递erp 结束\n"); + printf("===================================\n"); + return ifail; +} + +//BOM传递erp +int HS_ERP_BOM(EPM_action_message_t msg) +{ + printf("===================================\n"); + printf("BOM传递erp 开始\n"); + printf("===================================\n"); + int ifail = ITK_ok; + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + int att_cnt = 0; + //从流程中的参数 + tag_t task_tag = NULL_TAG, + root_task_tag = NULLTAG, + * attachments;; + task_tag = msg.task; + tag_t executor; + char* user_id; + char* user_uid; + EPM_ask_root_task(task_tag, &root_task_tag); + char* mail_url; + ITKCALL(PREF_ask_char_value("Autocode_SendEmailServer_URL", 0, &mail_url)); + char* url; + ITKCALL(PREF_ask_char_value("HS_BOM_URL", 0, &url)); + char* person_name; + ITKCALL(AOM_ask_value_tag(task_tag, "owning_user", &executor)); + tag_t person_tag = NULLTAG; + char* mail_str = NULL; + ITKCALL(ifail = AOM_ask_value_tag(executor, "person", &person_tag)); + ITKCALL(ifail = AOM_ask_value_string(person_tag, "PA9", &mail_str)); + ITKCALL(AOM_ask_value_string(executor, "user_id", &user_id)); + SA_ask_user_person_name2(executor, &person_name); + POM_tag_to_uid(executor, &user_uid); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + vector boms; + + string str = ""; + + for (int i = 0; i < att_cnt; i++) + { + tag_t tagt = attachments[i];// + char* id = NULL; + char* item_rev = NULL; + char* uid = NULL; + if (checkIsTypeOrSubtype(tagt, "PSBOMViewRevision") != 1) + { + printf("类型不是PSBOMViewRevision\n"); + continue; + } + //char* bom_name; + //ITKCALL(AOM_ask_value_string(tagt,"object_name",&bom_name)); + //string bomName = bom_name; + //printf("bomName1=%s\n", bomName.c_str()); + //if (strstr(bom_name,"/") != NULL) { + // bomName = replace_all(bomName, "/", "-"); + //} + //printf("bomName2=%s\n", bomName.c_str()); + printf("类型是PSBOMViewRevision,继续\n"); + int c_line_count = 0; + tag_t bom_window_tag = NULLTAG, + top_line_tag = NULLTAG, + target_tag = NULLTAG, + * c_line_tags; + char* target_type; + char* object_string; + ITKCALL(ifail = AOM_ask_value_string(tagt, "object_string", &object_string)); + if (strcmp(str.c_str(), "") == 0) { + str = object_string; + } + ITKCALL(BOM_create_window(&bom_window_tag));//创建window视图 + ITKCALL(BOM_set_window_top_line_bvr(bom_window_tag, tagt, &top_line_tag));//获取顶层bomline + ITKCALL(AOM_ask_value_tag(top_line_tag, "bl_line_object", &target_tag));//获取BOMLINE关联的版本 + + + ITKCALL(BOM_line_ask_all_child_lines(top_line_tag, &c_line_count, &c_line_tags)); + if (c_line_count == 0) { + printf("没有BOM结构\n"); + } + else { + boolean flag = false; + getchibomline_value(tagt, top_line_tag, boms, flag); + } + ITKCALL(BOM_close_window(bom_window_tag)); + + //system(cmd); + + + //AOM_lock(master_form); + //ITKCALL(AOM_set_value_string(master_form, "y4_ERPwlzt", "已传递")); + //AOM_save(master_form); + //AOM_unlock(master_form); + + } + if (strstr(str.c_str(), "/") != NULL) { + str = replace_all(str, "/", "-"); + } + if (boms.size() > 0) { + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char file_name[256] = ""; + char cmd[1024] = ""; + char* tc_root_dir = getenv("tc_root"); + sprintf(file_name, "%s-%d%02d%02d%02d%02d%02d-BOM-%s", user_id, 1900 + lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec, str.c_str()); + + char path[128] = "\0"; + strcat(path, "D:\\Siemens\\PLMtoERPlogs"); + strcat(path, "\\"); + strcat(path, file_name); + strcat(path, ".txt"); + FILE* fpWrite = fopen(path, "w"); + for (int j = 0; j < boms.size(); j++) + { + vector zjs = boms[j].zjs; + char bom_value[8000] = "\0"; + strcat(bom_value, (boms[j].cinvCode).c_str()); + strcat(bom_value, ";"); + strcat(bom_value, (boms[j].version).c_str()); + strcat(bom_value, "|"); + for (int k = 0; k < zjs.size(); k++) + { + if (strcmp("", (zjs[k].sortSeq).c_str()) == 0) { + strcat(bom_value, " "); + } + else { + strcat(bom_value, (zjs[k].sortSeq).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].invCode).c_str()) == 0) { + strcat(bom_value, " "); + } + else { + strcat(bom_value, (zjs[k].invCode).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].baseQtyN).c_str()) == 0 || strcmp(" ", (zjs[k].baseQtyN).c_str()) == 0) { + strcat(bom_value, "1"); + } + else { + strcat(bom_value, (zjs[k].baseQtyN).c_str()); + } + strcat(bom_value, ";"); + if (strcmp("", (zjs[k].baseQtyD).c_str()) == 0 || strcmp(" ", (zjs[k].baseQtyD).c_str()) == 0) { + strcat(bom_value, "1"); + } + else { + strcat(bom_value, (zjs[k].baseQtyD).c_str()); + } + if (k < zjs.size() - 1) { + strcat(bom_value, "&"); + } + + } + fprintf(fpWrite, "%s\n", bom_value); + } + fclose(fpWrite); + char* all_mail_sjr; + ITKCALL(PREF_ask_char_value("HS2_SendEmailServer_ALL_SJR", 0, &all_mail_sjr)); + char mail_str_all[1024] = "\0"; + strcpy(mail_str_all, all_mail_sjr); + if (strstr(mail_str_all, mail_str) == NULL) { + strcat(mail_str_all, ","); + strcat(mail_str_all, mail_str); + } + + printf("mail_str_all=%s\n", mail_str_all); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HSSendToERP.jar"); + strcat(cmd, " "); + strcat(cmd, "BOM"); + strcat(cmd, " "); + strcat(cmd, path); + strcat(cmd, " "); + strcat(cmd, person_name); + strcat(cmd, " "); + strcat(cmd, url); + strcat(cmd, " "); + strcat(cmd, mail_str_all); + strcat(cmd, " "); + strcat(cmd, mail_url); + printf("%s", cmd); + WinExec(cmd, SW_NORMAL); + } + + + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("BOM传递erp 结束\n"); + printf("===================================\n"); + return ifail; +} + +//电子签名 +int HS_pdf_signoff(EPM_action_message_t msg) { + int ifail = ITK_ok; + + //流程节点相关 + tag_t root_task = NULLTAG, * sub_tasks = NULL, current_task = NULLTAG, type_tag = NULLTAG; + int sub_task_count = 0; + char root_task_name[128] = "", task_name[128] = ""; + int occur_of_counts = 0; + tag_t* taskAttches = NULLTAG; + char tgt_type[WSO_name_size_c + 1] = "", * type_class; + ////循环内部变量 + tag_t cur_task = NULLTAG; + //循环变量 + int count = 0; + + //节点循环处理变量 + tag_t itemrevision = NULLTAG, master_form_rel_type = NULLTAG; + int form_count = 0; + tag_t* form_list = NULL, master_form = NULLTAG; + + current_task = msg.task; + //CreateLogFile("PLA8_signoff",&txtfile); + ECHO("=========================================================\n"); + ECHO("电子签名 开始执行\n"); + ECHO("=========================================================\n"); + //参数相关 + int arg_cnt = 0; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + char TZ[16] = ""; + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + POM_AM__set_application_bypass(true); + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ifail = ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (stricmp(argflag, "type") == 0) + { + if (argvalue != NULL) + { + strcpy(TZ, argvalue); + } + } + + } + if (argflag != NULL) { + MEM_free(argflag); + argflag = NULL; + } + + } + char* tz_uid; + char tz_path[512] = ""; + //ITKCALL(PREF_ask_char_values("HS_UNIT_CODE", &value_count, &values)); + char tzs[64] = "HS2_TZ_"; + strcat(tzs, TZ); + ITKCALL(PREF_ask_char_value(tzs, 0, &tz_uid)); + tag_t tz_target; + ITK__convert_uid_to_tag(tz_uid, &tz_target); + int target_count = 0; + tag_t* target_tags = NULL; + char* target_type; + ITKCALL(AOM_ask_value_tags(tz_target, "ref_list", &target_count, &target_tags)); + ITKCALL(AOM_ask_value_string(target_tags[0], "file_ext", &target_type)); + time_t now; + struct tm* p; + time(&now); + p = localtime(&now); + + sprintf_s(tz_path, "%s\\TZ_[%d-%d-%d-%d-%02d-%02d].%s", getenv("TEMP"), 1900 + p->tm_year, p->tm_mon + 1, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec, target_type); + + IMF_export_file(target_tags[0], tz_path); + //获取属性 + EPM_ask_root_task(msg.task, &root_task); + EPM_ask_sub_tasks(root_task, &sub_task_count, &sub_tasks); + EPM_ask_attachments(root_task, EPM_target_attachment, &occur_of_counts, &taskAttches); + ECHO("%d target attachment found", occur_of_counts); + + for (count = 0; count < occur_of_counts; count++) + { + ITKCALL(TCTYPE_ask_object_type(taskAttches[count], &type_tag)); + ITKCALL(ifail = TCTYPE_ask_class_name2(type_tag, &type_class)); + + //过滤掉非版本对象 + if (((strstr(type_class, "Revision") != NULL) || (strstr(type_class, "revision") != NULL)) + && (strstr(type_class, "Master") == NULL) && (strstr(type_class, "master") == NULL) + && (strstr(type_class, "BOM") == NULL) && (strstr(type_class, "bom") == NULL) && (strstr(type_class, "Bom") == NULL)) + { + itemrevision = taskAttches[count]; + ITKCALL(GRM_find_relation_type(TC_master_form_rtype, &master_form_rel_type)); + ITKCALL(GRM_list_secondary_objects_only(itemrevision, master_form_rel_type, &form_count, &form_list)); + //获得数据集 + tag_t relation_type = NULLTAG; + //tag_t attach_relation_type = NULLTAG; + ITKCALL(GRM_find_relation_type(TC_specification_rtype, &relation_type)); + tag_t* secondary_objects = NULLTAG; + int ds_count = 0; + char* dataset_type = NULL, * desc_value = NULL, * file_path = NULL, * desc_path; + + ITKCALL(GRM_list_secondary_objects_only(itemrevision, relation_type, &ds_count, &secondary_objects)); + + for (int j = 0; j < ds_count; j++) + { + printf("进1\n"); + ITKCALL(AOM_ask_value_string(secondary_objects[j], "object_type", &dataset_type)); + int des_count = 0; + tag_t* dess = NULL; + + printf("dataset_type=%s\n", dataset_type); + if (strcmp(dataset_type, "PDF") != 0) { + + if (dataset_type != NULL) { + MEM_free(dataset_type); + dataset_type = NULL; + } + + continue; + } + ITKCALL(AOM_ask_value_tags(secondary_objects[j], "ref_list", &des_count, &dess)); + if (des_count < 1) { + printf("该数据集引用数量错误\n"); + continue; + } + else { + char* sizeFile; + AOM_ask_value_string(dess[0], "file_size", &sizeFile); + printf("sizeFile %s \n", sizeFile); + if (strcmp(sizeFile, "0 bytes") == 0) { + printf("文件大小是0bytes\n"); + continue; + } + } + tag_t spec_dataset_rev = NULLTAG, + ref_object = NULLTAG; + char* ref_object_name = NULL; + AE_reference_type_t reference_type; + char* datasetName = NULL; + char* pathname; + char* origin_file_name; + vector type_vec; + printf("开始判断类型\n"); + if (strcmp(dataset_type, "PDF") == 0) { + printf("pdf类型\n"); + int values_count = 0; + char** values; + char* value; + ITKCALL(PREF_ask_char_values("HS_signoff_pdf_attr", &values_count, &values)); + char signoffValue[1024] = "\0"; + for (int i = 0; i < values_count; i++) + { + printf("values=%s\n", values[i]); + Split(values[i], "=", type_vec); + ITKCALL(AOM_ask_value_string(itemrevision, type_vec[1].c_str(), &value)); + strcat(signoffValue, type_vec[0].c_str()); + strcat(signoffValue, "="); + strcat(signoffValue, value); + strcat(signoffValue, "|"); + MEM_free(value); + type_vec.clear(); + } + MEM_free(values); + printf("signoffValue=%s\n", signoffValue); + char path[128] = "\0"; + strcat(path, getenv("TEMP")); + strcat(path, "\\"); + strcat(path, "PDFsignoff.txt"); + FILE* fpWrite = fopen(path, "w"); + fprintf(fpWrite, "%s", signoffValue); + fclose(fpWrite); + //MEM_free(fpWrite); + AOM_ask_value_string(secondary_objects[j], "object_name", &datasetName); + AE_ask_dataset_latest_rev(secondary_objects[j], &spec_dataset_rev); + AOM_ask_value_string(spec_dataset_rev, "object_name", &ref_object_name); + printf("ref_object_name=%s\n", ref_object_name); + char ref_name[WSO_name_size_c + 1] = "PDF_Reference"; + + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (ref_object == NULLTAG) + { + printf("\nref_object is NULLTAG\n"); + return ITK_ok; + } + printf("reference_type=%d\n", reference_type); + if (reference_type == AE_PART_OF) + { + ITKCALL(IMF_ask_file_pathname2(ref_object, SS_WNT_MACHINE, &pathname)); + IMF_ask_original_file_name2(ref_object, &origin_file_name); + char new_ds_name[WSO_name_size_c + 1] = ""; + char* new_file_name = USER_new_file_name(new_ds_name, ref_name, "pdf", 0); + char* temp_dir = getenv("temp"); + char temp_file[SS_MAXPATHLEN] = ""; + char temp_file2[SS_MAXPATHLEN] = ""; + + strcpy(temp_file, temp_dir); + strcat(temp_file, "\\"); + strcat(temp_file, new_file_name); + IMF_export_file(ref_object, temp_file); + /*if (strstr(temp_file, ".pdf") != NULL) { + sprintf(temp_file2, "%s\\1%s", temp_dir, new_file_name); + } + else { + sprintf(temp_file2, "%s\\1%s.pdf", temp_dir, new_file_name); + }*/ + if (strstr(new_file_name, ".pdf") != NULL) { + sprintf(temp_file2, "%s\\1%s", temp_dir, new_file_name); + } + else { + sprintf(temp_file2, "%s\\1%s.pdf", temp_dir, new_file_name); + } + //sprintf(temp_file2, "%s.pdf", temp_file); + printf("\ntemp_file=%s\n", temp_file); + char cmd[256] = ""; + char* tc_root_dir = getenv("tc_root"); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HS_PDFSignoff.jar"); + strcat(cmd, " \""); + strcat(cmd, path); + strcat(cmd, "\" \""); + strcat(cmd, temp_file); + strcat(cmd, "\" \""); + strcat(cmd, temp_file2); + strcat(cmd, "\" \""); + strcat(cmd, tz_path); + strcat(cmd, "\""); + printf("\n%s\n", cmd); + system(cmd); + char txtPath[256] = ""; + strcpy(txtPath, "DEL /f "); + strcat(txtPath, path); + system(txtPath); + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + if (temp_file2 != NULL) { + IMF_import_file(temp_file2, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + } + else + { + IMF_import_file(temp_file, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + } + + //IMF_import_file(temp_file2, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + IMF_set_original_file_name2(new_file_tag, origin_file_name); + IMF_close_file(file_descriptor); + AOM_save(new_file_tag); + AOM_unlock(new_file_tag); + + AOM_lock(spec_dataset_rev); + + AE_remove_dataset_named_ref_by_tag2(spec_dataset_rev, ref_name, ref_object); + + AE_add_dataset_named_ref2(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag); + AOM_save(spec_dataset_rev); + AOM_unlock(spec_dataset_rev); + char tempPath[256] = ""; + char tempPath2[256] = ""; + char tempPath3[256] = ""; + strcpy(tempPath, "DEL /f "); + strcat(tempPath, temp_file); + system(tempPath); + strcpy(tempPath2, "DEL /f "); + strcat(tempPath2, temp_file2); + system(tempPath2); + /*strcpy(tempPath3, "DEL /f "); + strcat(tempPath3, tz_path); + system(tempPath3);*/ + //ITKCALL(ifail = import_dataset_file(secondary_objects[j], "T2_DWG", "dwg", temp_file, datasetName)); + } + } + MEM_free(dataset_type); + + } + + DOFREE(secondary_objects); + + } + } + + POM_AM__set_application_bypass(false); + DOFREE(taskAttches); + ECHO("=========================================================\n"); + ECHO("电子签名 结束\n"); + ECHO("=========================================================\n"); + return ifail; +} +/** +* 设置流程名称 +*/ +int HS2_set_process_name(EPM_action_message_t msg) { + + printf("===================================\n"); + printf("设置流程名称 开始\n"); + printf("===================================\n"); + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + int ifail = ITK_ok; + tag_t tast_tag = NULL_TAG, job; + tag_t aUserTag = NULLTAG;//当前用户对象 + char* userName; + printf("获取用户\n"); + int s = POM_get_user(&userName, &aUserTag); + tast_tag = msg.task; + tag_t root_task_tag = NULLTAG; + int att_cnt = 0; + EPM_ask_root_task(tast_tag, &root_task_tag); + + if (tast_tag != NULL_TAG) { + char finish_date_str[300] = ""; + char* job_name = NULL; + char* job_name1 = NULL; + AOM_ask_value_string(root_task_tag, "job_name", &job_name); + AOM_ask_value_string(tast_tag, "job_name", &job_name1); + printf("job_name=%s\n", job_name); + printf("job_name1=%s\n", job_name1); + tag_t schedule_tag; + tag_t* task_tag; + int task_num = 0; + char* proj_name; + char file_name[56] = "\0"; + bool setJFW = false; + ITKCALL(AOM_ask_value_tags(root_task_tag, "fnd0RootScheduleTask", &task_num, &task_tag)); + if (task_tag[0] != NULL_TAG) { + ITKCALL(AOM_ask_value_tag(task_tag[0], "schedule_tag", &schedule_tag)); + if (schedule_tag != NULL_TAG) { + tag_t* projects; + int proj_num = 0; + ITKCALL(AOM_ask_value_tags(schedule_tag, "project_list", &proj_num, &projects)); + if (proj_num > 0) { + ITKCALL(AOM_ask_value_string(projects[0], "object_name", &proj_name)); + printf("proj_name=%s\n", proj_name); + } + + int c_sql_value_count = 0; + char** c_sql_values; + ITKCALL(PREF_ask_char_values("HS2_SQL_Connect2", &c_sql_value_count, &c_sql_values)); + if (c_sql_value_count != 3) + { + printf("首选项 DFL2_SQL_Connect2 配置错误 数量%d \n ", c_sql_value_count); + } + else { + if (ConnServer(c_sql_values[1], c_sql_values[2], c_sql_values[0]))//"tc11","infodba","//172.16.50.40/tc11" "TC12","infodba","172.16.68.13/tc1" + { + printf("提示:中间数据表访问失败\n"); + } + else { + printf("提示:中间数据表访问成功\n"); + char sql[1024] = "\0"; + sprintf(sql, "select FILENAME from AHMC_TASK_CHECK where TASKNAME= '%s'", job_name); + printf("提示:sql==%s\n", sql); + int outputColumn = 0, outputValueCount = 0; + char*** outputValue = NULL; + if (QuerySQLNoInputParam(sql, &outputColumn, &outputValueCount, &outputValue) == -1) + { + printf("提示:获取交付物名称 失败, %s \n", sql); + } + else { + printf("outputValueCount=%d\n", outputValueCount); + // + if (outputValueCount > 0) { + printf("outputValue=%s\n", outputValue[0][0]); + setJFW = true; + strcpy(file_name, outputValue[0][0]); + } + } + } + } + } + EPM_ask_job(tast_tag, &job); + //AOM_ask_value_string(job, "object_name", &job_name); + if (setJFW) { + sprintf(finish_date_str, "%s-%s(%s)", proj_name, job_name, file_name); + } + else + { + sprintf(finish_date_str, "%s-%s", proj_name, job_name); + } + + printf("finish_date_str=%s\n", finish_date_str); + AOM_lock(job); + AOM_set_value_string(job, "object_name", finish_date_str); + AOM_save(job); + AOM_unlock(job); + if (job_name != NULL) { + MEM_free(job_name); + job_name = NULL; + } + if (userName != NULL) { + MEM_free(userName); + userName = NULL; + } + } + + } + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("设置流程名称 结束\n"); + printf("===================================\n"); + + return ifail; + +} + + +//流程邮件提醒 +int Connor_Send_Mail_To_All_Users(EPM_action_message_t msg) { + bool debug = false; + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, task_count = 0, user_cnt = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL, * task_name = NULL, * task_type = NULL; + char* user_id = NULL, * user_name = NULL, * job_name = NULL, * userName = NULL; + tag_t task_tag = NULLTAG, rootTask_tag = NULLTAG, user_tag = NULLTAG, * taskAttches; + tag_t* attachments = NULL, * task_tags = NULL, ownUser, root_task_tag; + arg_cnt = TC_number_of_arguments(msg.arguments); + vector all_user_tags; + vector mail_addrs; + tag_t memberTag = NULLTAG; + SIGNOFF_TYPE_t memberType; + ITKCALL(POM_get_user(&user_name, &user_tag)); + ITKCALL(SA_ask_user_identifier2(user_tag, &user_id)); + DOFREE(user_id); + char* url; + ITKCALL(PREF_ask_char_value("Autocode_SendEmailServer_URL", 0, &url)); + printf("=============================================================\n"); + printf("开始执行:Connor_Send_Mail_To_All_Users\n"); + printf("=============================================================\n"); + printf("开超级权限\n"); + string types; + POM_AM__set_application_bypass(true); + task_tag = msg.task; + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value(arg, &argflag, &argvalue)); + if (strcmp(argflag, "status") == 0) { + types.assign(argvalue); + } + MEM_free(argflag); + MEM_free(argvalue); + } + } + + char* task_uid; + POM_tag_to_uid(task_tag, &task_uid); + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char year[128] = "\0"; //当前年份 + sprintf(year, "%d-%d-%d", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday); + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + ITKCALL(ifail = AOM_ask_value_string(rootTask_tag, "job_name", &job_name)); + printf("流程名称:%s\n", job_name); + ITKCALL(ifail = EPM_ask_name2(task_tag, &task_name)); + ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_type", &task_type)); + //ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_type", &task_type)); + AOM_ask_value_tag(task_tag, "owning_user", &ownUser); + AOM_ask_value_string(ownUser, "user_name", &userName); + if (ifail != ITK_ok) { + DOFREE(task_name); + DOFREE(task_type); + } + ECHO("task_type = %s\n", task_type); + int occur_of_counts; + string projectName; + string objectType; + EPM_ask_root_task(task_tag, &root_task_tag); + //EPM_ask_name2(root_task_tag); + ITKCALL(ifail = EPM_ask_attachments(root_task_tag, EPM_target_attachment, &occur_of_counts, &taskAttches)); + char* type_class; + for (int t = 0; t < occur_of_counts; t++) { + tag_t item; + if (checkIsTypeOrSubtype(taskAttches[t], "ItemRevision")) { + char* typeObj; + ITEM_ask_item_of_rev(taskAttches[t], &item); + + //if (checkIsTypeOrSubtype(item, "HS2_Document")) { + printf("是文档类型,获取项目名称"); + char* valueName; + AOM_ask_value_string(taskAttches[t], "projects_list", &valueName); + + if (strcmp(valueName, "") == 0 || strcmp(valueName, " ")) { + projectName.assign(valueName); + projectName = replace_all(projectName, " ", "###"); + projectName = replace_all(projectName, "&", "--"); + //replace(projectName.begin(), projectName.end(), ' ', '##'); + } + //} + + AOM_UIF_ask_value(item, "object_type", &typeObj); + objectType = typeObj; + + } + //ITKCALL(WSOM_ask_object_type2(taskAttches[t], &type_class)); + } + if (strcmp("EPMAcknowledgeTask", task_type) == 0) { + int subcount; + tag_t* subTags; + EPM_ask_sub_tasks(task_tag, &subcount, &subTags); + + for (int j = 0; j < subcount; j++) { + char* subType, * taskname; + tag_t subTag = subTags[j]; + ITKCALL(AOM_ask_value_string(subTag, "object_type", &subType)); + if (strcmp(subType, "EPMPerformSignoffTask") == 0) { + ITKCALL(EPM_ask_name2(subTag, &taskname)); + printf("获取到了认可下的 审核节点 name ==%s \n", taskname); + + int reviewer_cnt = 0; + tag_t* reviewers = NULL; + int count = 0; + tag_t* be_tag = NULLTAG; + char* node_task_name; + int* attach_type; + ITKCALL(AOM_ask_value_tags(subTag, "predecessors", &count, &be_tag)); + printf("目标数量:%d\n", count); + for (int j = 0; j < count; j++) + { + EPM_ask_name2(be_tag[j], &node_task_name); + ECHO("node_task_name = %s\n", node_task_name); + if (stricmp(node_task_name, "select-signoff-team") == 0) { + EPM_ask_all_attachments(be_tag[j], &reviewer_cnt, &reviewers, &attach_type); + ECHO("perform_count=%d\n", reviewer_cnt); + for (int k = 0; k < reviewer_cnt; k++) { + tag_t reviewer = reviewers[k]; + tag_t user_tag = NULLTAG; + tag_t group_tag = NULLTAG; + EPM_signoff_decision_t decision; + char* comment = NULL, * date_str = NULL, * group_full_name = NULL, * user_name = NULL; + date_t date; + ITKCALL(EPM_ask_signoff_member(reviewer, &memberTag, &memberType)); + ITKCALL(SA_ask_groupmember_user(memberTag, &user_tag)); + if (user_tag == NULLTAG) { + printf(">> %d. 未指派用户\n", k + 1); + continue; + } + //ITKCALL(ifail = AOM_ask_value_tag(reviewer, "group", &group_tag)); + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + //ITKCALL(ifail = AOM_ask_value_string(group_tag, "full_name", &group_full_name)); + all_user_tags.push_back(user_tag); + DOFREE(comment); + DOFREE(user_name); + DOFREE(group_full_name); + DOFREE(date_str); + } + break; + } + } + } + } + } + else if (strcmp("EPMDoTask", task_type) == 0) { + tag_t user_tag = NULLTAG; + ITKCALL(ifail = AOM_ask_value_tag(task_tag, "fnd0Performer", &user_tag)); + if (user_tag == NULLTAG) { + printf("未找到执行者\n"); + } + char* user_name = NULL, * task_state = NULL; + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_state", &task_state)); + printf(">> DO任务信息:%s|%s\n", user_name, task_state); + all_user_tags.push_back(user_tag); + DOFREE(user_name); + DOFREE(task_state); + } + else if (strcmp("EPMPerformSignoffTask", task_type) == 0) { + int reviewer_cnt = 0; + tag_t* reviewers = NULL; + int count = 0; + tag_t* be_tag = NULLTAG; + char* node_task_name; + int* attach_type; + ITKCALL(AOM_ask_value_tags(task_tag, "predecessors", &count, &be_tag)); + printf("目标数量:%d\n", count); + for (int j = 0; j < count; j++) + { + EPM_ask_name2(be_tag[j], &node_task_name); + ECHO("node_task_name = %s\n", node_task_name); + if (stricmp(node_task_name, "select-signoff-team") == 0) { + EPM_ask_all_attachments(be_tag[j], &reviewer_cnt, &reviewers, &attach_type); + ECHO("perform_count=%d\n", reviewer_cnt); + for (int k = 0; k < reviewer_cnt; k++) { + tag_t reviewer = reviewers[k]; + tag_t user_tag = NULLTAG; + tag_t group_tag = NULLTAG; + EPM_signoff_decision_t decision; + char* comment = NULL, * date_str = NULL, * group_full_name = NULL, * user_name = NULL; + date_t date; + ITKCALL(EPM_ask_signoff_member(reviewer, &memberTag, &memberType)); + ITKCALL(SA_ask_groupmember_user(memberTag, &user_tag)); + if (user_tag == NULLTAG) { + printf(">> %d. 未指派用户\n", k + 1); + continue; + } + //ITKCALL(ifail = AOM_ask_value_tag(reviewer, "group", &group_tag)); + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + //ITKCALL(ifail = AOM_ask_value_string(group_tag, "full_name", &group_full_name)); + all_user_tags.push_back(user_tag); + DOFREE(comment); + DOFREE(user_name); + DOFREE(group_full_name); + DOFREE(date_str); + } + break; + } + } + DOFREE(reviewers); + } + else { + printf(">> 未知任务类型\n"); + } + DOFREE(task_name); + /*DOFREE(task_type);*/ + user_cnt = all_user_tags.size(); + printf("处理用户数据:%d\n", user_cnt); + for (int i = 0; i < user_cnt; i++) { + tag_t mail_user = all_user_tags[i], person_tag = NULLTAG; + char* user_str = NULL, * mail_str = NULL; + ITKCALL(ifail = AOM_ask_value_tag(mail_user, "person", &person_tag)); + if (ifail != ITK_ok || person_tag == NULLTAG) { + continue; + } + ITKCALL(ifail = AOM_ask_value_string(person_tag, "PA9", &mail_str)); + if (ifail != ITK_ok) { + continue; + } + ITKCALL(ifail = AOM_ask_value_string(mail_user, "user_name", &user_str)); + printf(">> %d. %s -> %s\n", i + 1, user_str, mail_str); + if (mail_str == NULL || strcmp("", mail_str) == 0 || std::find(mail_addrs.begin(), mail_addrs.end(), mail_str) != mail_addrs.end()) { + printf(">> Skip\n"); + } + else { + mail_addrs.push_back(mail_str); + } + DOFREE(user_str); + DOFREE(mail_str); + } + user_cnt = mail_addrs.size(); + + + printf("发送邮件:%d", user_cnt); + char user_mail[2048] = "\0"; + for (int i = 0; i < user_cnt; i++) { + string mail_addr = mail_addrs[i]; + WriteLog(">> %d. 发送邮件给[%s]", i + 1, mail_addr.c_str()); + strcat(user_mail, mail_addr.c_str()); + if (i < user_cnt - 1) { + strcat(user_mail, ","); + } + } + char cmd[1024] = ""; + char jarfile[512] = ""; + sprintf(jarfile, "%s\\bin\\SendToEmail.jar", getenv("TC_ROOT")); + string job_names; + job_names.assign(job_name); + job_names = replace_all(job_names, " ", "###"); + job_names = replace_all(job_names, "&", "--"); + if (types.empty()) { + strcpy_s(cmd, "java -jar "); + strcat_s(cmd, jarfile); + strcat_s(cmd, " 【TeamCenter】-"); + strcat_s(cmd, job_names.c_str()); + strcat_s(cmd, " "); + strcat_s(cmd, user_mail); + strcat_s(cmd, " 收到用户"); + if (userName != NULL) { + strcat_s(cmd, userName); + strcat_s(cmd, "发起的"); + } + if (!projectName.empty()) { + strcat_s(cmd, "项目名称-"); + strcat_s(cmd, projectName.c_str()); + strcat_s(cmd, "-"); + } + else if (projectName.empty()) + { + strcat_s(cmd, "项目名称(无项目)"); + } + strcat_s(cmd, job_names.c_str()); + strcat_s(cmd, "("); + objectType = replace_all(objectType, " ", "###"); + objectType = replace_all(objectType, "&", "--"); + strcat_s(cmd, objectType.c_str()); + strcat_s(cmd, ")"); + + strcat_s(cmd, "任务,请尽快登录Teamcenter,在我的工作列表中执行此任务。"); + strcat_s(cmd, " "); + strcat_s(cmd, url); + } + else + { + strcpy_s(cmd, "java -jar "); + strcat_s(cmd, jarfile); + strcat_s(cmd, " 【TeamCenter】-"); + strcat_s(cmd, job_names.c_str()); + strcat_s(cmd, " "); + strcat_s(cmd, user_mail); + strcat_s(cmd, " "); + if (userName != NULL) { + strcat_s(cmd, userName); + strcat_s(cmd, "发起的"); + } + if (!projectName.empty()) { + strcat_s(cmd, "项目名称-"); + strcat_s(cmd, projectName.c_str()); + } + else if (projectName.empty()) + { + strcat_s(cmd, "项目名称(无项目)-"); + } + strcat_s(cmd, job_names.c_str()); + strcat_s(cmd, "("); + objectType = replace_all(objectType, " ", "###"); + objectType = replace_all(objectType, "&", "--"); + strcat_s(cmd, objectType.c_str()); + strcat_s(cmd, ")"); + strcat_s(cmd, "工作流程已经审批完成,请注意查看,无需执行任何审批操作"); + strcat_s(cmd, " "); + strcat_s(cmd, url); + + } + + + printf("CMD:%s", cmd); + WinExec(cmd, SW_NORMAL); + + //system(cmd); + printf("执行完成"); + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); +end: + DOFREE(job_name); + DOFREE(attachments); + all_user_tags.clear(); + printf("=============================================================\n"); + printf("执行结束:Connor_Send_Mail_To_All_Users\n"); + printf("=============================================================\n"); + return ITK_ok; +} + +int HS_set_signoff(EPM_action_message_t msg) { + + printf("===================================\n"); + printf("word/excel文档签名 开始\n"); + printf("===================================\n"); + + int ifail = ITK_ok; + int att_cnt = 0, jpg_count = 0; + tag_t task_tag = NULLTAG, + root_task_tag = NULLTAG, + * attachments = NULL; + //节点循环处理变量 + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + int arg_cnt = 0; + char sign_attr[2048] = ""; + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + //获取下一个参数(从0开始) + arg = TC_next_argument(msg.arguments); + //获取参数的名称和值 + ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (strcmp(argflag, "sign") == 0) + { + if (argvalue != NULL) + { + strcpy(sign_attr, argvalue); + } + } + + } + MEM_free(argflag); + MEM_free(argvalue); + } + tag_t itemrevision = NULLTAG; + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + + task_tag = msg.task; + char* taskName; + EPM_ask_root_task(task_tag, &root_task_tag); + AOM_ask_value_string(root_task_tag, "job_name", &taskName); + //EPM_ask_name2(root_task_tag, &taskName); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + + if (att_cnt > 0) { + + for (int i = 0; i < att_cnt; i++) + { + int doc_num = 0; + tag_t* doc_tags = NULL; + tag_t* dataFile = NULL; + int fileNum = 0; + char* tag_type; + char* type; + ITKCALL(AOM_ask_value_string(attachments[i], "object_type", &tag_type)); + printf("tag_type=%s\n", tag_type); + if (strstr(tag_type, "Revision") != NULL && strstr(tag_type, "Master") == NULL) + { + itemrevision = attachments[i]; + /* int values_count = 0; + char** values; + char* value; + ITKCALL(PREF_ask_char_values("HS2_signoff_attr", &values_count, &values));*/ + vector sign_vec; + Split(sign_attr, ";", sign_vec); + char signoffValue[1024] = "\0"; + vector type_vec; + char* value; + for (int i = 0; i < sign_vec.size(); i++) + { + printf("values=%s\n", sign_vec[i].c_str()); + Split(sign_vec[i].c_str(), "=", type_vec); + ITKCALL(AOM_ask_value_string(itemrevision, type_vec[1].c_str(), &value)); + strcat(signoffValue, type_vec[0].c_str()); + strcat(signoffValue, "="); + strcat(signoffValue, value); + strcat(signoffValue, "|"); + MEM_free(value); + type_vec.clear(); + } + //MEM_free(values); + printf("signoffValue=%s\n", signoffValue); + char path[128] = "\0"; + strcat(path, getenv("TEMP")); + strcat(path, "\\"); + strcat(path, "signoff.txt"); + FILE* fpWrite = fopen(path, "w"); + fprintf(fpWrite, "%s", signoffValue); + fclose(fpWrite); + ITKCALL(AOM_ask_value_tags(itemrevision, "IMAN_specification", &doc_num, &doc_tags)); + if (doc_num > 0) + { + for (int i = 0; i < doc_num; i++) + { + ITKCALL(AOM_ask_value_string(doc_tags[i], "object_type", &type)); + printf("type=%s\n", type); + tag_t spec_dataset_rev = NULLTAG, ref_object = NULLTAG; + AE_reference_type_t reference_type; + AE_ask_dataset_latest_rev(doc_tags[i], &spec_dataset_rev); + char* new_file_name = NULL; + char* origin_file_name; + char* pathname; + char ref_name[WSO_name_size_c + 1] = ""; + char cmd[256] = ""; + boolean flag = false; + if (strcmp(type, "MSWordX") == 0) { + //ITKCALL(AOM_ask_value_tags(doc_tags[i],"ref_list",&fileNum,&dataFile)); + strcpy(cmd, "SubstMacros-MSWord.wsf"); + strcpy(ref_name, "word"); + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (reference_type == AE_PART_OF) + { + char new_ds_name[WSO_name_size_c + 1] = ""; + new_file_name = USER_new_file_name(new_ds_name, ref_name, "docx", 0); + flag = true; + } + } + else if (strcmp(type, "MSWord") == 0) { + //ITKCALL(AOM_ask_value_tags(doc_tags[i],"ref_list",&fileNum,&dataFile)); + strcpy(cmd, "SubstMacros-MSWord.wsf"); + strcpy(ref_name, "word"); + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (reference_type == AE_PART_OF) + { + char new_ds_name[WSO_name_size_c + 1] = ""; + new_file_name = USER_new_file_name(new_ds_name, ref_name, "doc", 0); + flag = true; + } + } + else if (strcmp(type, "MSExcelX") == 0) + { + //ITKCALL(AOM_ask_value_tags(doc_tags[i],"ref_list",&fileNum,&dataFile)); + strcpy(cmd, "SubstMacros-MSExcel.wsf"); + strcpy(ref_name, "excel"); + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (reference_type == AE_PART_OF) + { + char new_ds_name[WSO_name_size_c + 1] = ""; + new_file_name = USER_new_file_name(new_ds_name, ref_name, "xlsx", 0); + flag = true; + } + } + else if (strcmp(type, "MSExcel") == 0) + { + //ITKCALL(AOM_ask_value_tags(doc_tags[i],"ref_list",&fileNum,&dataFile)); + strcpy(cmd, "SubstMacros-MSExcel.wsf"); + strcpy(ref_name, "excel"); + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (reference_type == AE_PART_OF) + { + char new_ds_name[WSO_name_size_c + 1] = ""; + new_file_name = USER_new_file_name(new_ds_name, ref_name, "xls", 0); + flag = true; + } + } + if (ref_object == NULLTAG || !flag) { + continue; + } + ITKCALL(IMF_ask_file_pathname2(ref_object, SS_WNT_MACHINE, &pathname)); + IMF_ask_original_file_name2(ref_object, &origin_file_name); + char* temp_dir = getenv("temp"); + char temp_file[SS_MAXPATHLEN] = ""; + char temp_file1[SS_MAXPATHLEN] = ""; + char temp_file2[SS_MAXPATHLEN] = ""; + char time1[256] = "\0"; + char file_path[128] = "\0"; + time_t t = time(0); + tm* local = localtime(&t); + sprintf(time1, "%d%d%d%d%d%d", local->tm_year, local->tm_mon, local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec); + strcpy(temp_file, temp_dir); + string folderPath = ""; + folderPath.append("D:\\Siemens\\Officesignofflogs\\"); + string task_name = taskName; + + cout << folderPath << endl; + if (strstr(task_name.c_str(), "/") != NULL) { + task_name = replace_all(task_name, "/", " "); + } + if (strstr(task_name.c_str(), "\\") != NULL) { + task_name = replace_all(task_name, "\\", " "); + } + folderPath.append(task_name); + folderPath.append("-"); + folderPath.append(time1); + cout << folderPath << endl; + if (0 != access(folderPath.c_str(), 0)) + { + // if this folder not exist, create a new one. + ITKCALL(mkdir(folderPath.c_str())); // 返回 0 表示创建成功,-1 表示失败 + //换成 ::_mkdir ::_access 也行,不知道什么意思 + } + strcat(temp_file, "\\"); + strcat(temp_file, new_file_name); + IMF_export_file(ref_object, temp_file); + strcpy(temp_file1, folderPath.c_str()); + strcat(temp_file1, "\\"); + strcat(temp_file1, "签字前文件 "); + strcat(temp_file1, new_file_name); + + strcpy(temp_file2, folderPath.c_str()); + strcat(temp_file2, "\\"); + strcat(temp_file2, "签字后文件 "); + strcat(temp_file2, new_file_name); + + cout << "Copy file" << endl; + string from = temp_file, to = temp_file1, to2 = temp_file2; + ifstream in(from, ios::in | ios::binary); + if (!in) + { + cout << "could not find file" << from << endl; + return 1; + } + ofstream out(to, ios::out | ios::binary); + char ch; + while (in.get(ch)) + { + out.put(ch); + } + cout << "file has been copied" << endl; + in.close(); + out.close(); + strcat(cmd, " \""); + strcat(cmd, temp_file); + strcat(cmd, "\" \""); + strcat(cmd, path); + strcat(cmd, "\""); + printf("\n%s\n", cmd); + + system(cmd); + char ch2; + ifstream in2(from, ios::in | ios::binary); + if (!in2) + { + cout << "could not find file" << from << endl; + return 1; + } + ofstream out2(to2, ios::out | ios::binary); + //char ch; + while (in2.get(ch2)) + { + out2.put(ch2); + } + cout << "file has been copied" << endl; + in.close(); + out.close(); + + + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + IMF_import_file(temp_file, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + IMF_set_original_file_name2(new_file_tag, origin_file_name); + IMF_close_file(file_descriptor); + AOM_save(new_file_tag); + //AOM_unlock(new_file_tag); + + AOM_lock(spec_dataset_rev); + + AE_remove_dataset_named_ref_by_tag2(spec_dataset_rev, ref_name, ref_object); + + AE_add_dataset_named_ref2(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag); + AOM_save(spec_dataset_rev); + AOM_unlock(spec_dataset_rev); + } + } + } + } + } + + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("word/excel文档签名 结束\n"); + printf("===================================\n"); + + return ifail; + +} + +//流程自动指派审批人 +int HS2_AutoAssign(EPM_action_message_t msg) { + + printf("===================================\n"); + printf("流程自动指派审批人 开始\n"); + printf("===================================\n"); + int ifail = ITK_ok; + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + int att_cnt = 0; + tag_t task_tag = NULL_TAG, + root_task_tag = NULLTAG, + * attachments; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + int arg_cnt = 0; + char task_name[1024] = ""; + vector vec; + char* message; + //获取handler的参数的个数 + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + //获取下一个参数(从0开始) + arg = TC_next_argument(msg.arguments); + //获取参数的名称和值 + ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (strcmp(argflag, "task") == 0) + { + if (argvalue != NULL) + { + strcpy(task_name, argvalue); + } + } + + } + MEM_free(argflag); + MEM_free(argvalue); + } + task_tag = msg.task; + EPM_ask_root_task(task_tag, &root_task_tag); + int cnt_task = 0; tag_t* tasks = NULLTAG; + EPM_ask_sub_tasks(root_task_tag, &cnt_task, &tasks); + //ITKCALL(EPM_ask_tasks(root_task_tag, EPM_started, &cnt_task, &tasks)); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + if (att_cnt > 0) { + for (int i = 0; i < att_cnt; i++) + { + tag_t rev_tag = attachments[i]; + char* tag_type; + ITKCALL(AOM_ask_value_string(rev_tag, "object_type", &tag_type)); + + if (strcmp("HS2_ChangeTaskRevision", tag_type) == 0) { + int doc_num = 0; + tag_t* doc_tags = NULL; + tag_t* pathFile = NULLTAG; + int Num = 0; + char* excel_path; + ITKCALL(AOM_ask_value_tags(rev_tag, "IMAN_specification", &doc_num, &doc_tags)); + char user[1024] = "\0"; + for (int i = 0; i < doc_num; i++) + { + char* type; + ITKCALL(AOM_ask_value_string(doc_tags[i], "object_type", &type)); + printf("type=%s\n", type); + if (strcmp(type, "MSExcelX") != 0 && strcmp(type, "MSExcel") != 0) { + continue; + } + char* data_name; + ITKCALL(AOM_ask_value_string(doc_tags[i], "object_name", &data_name)); + if (strstr(data_name, "任务单") == NULL) { + continue; + } + Book* book; + time_t t = time(0); + tm* local = localtime(&t); + + char path[SS_MAXPATHLEN] = ""; + char time1[256] = "\0"; + sprintf(time1, "%d%d%d%d%d%d", local->tm_year, local->tm_mon, local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec); + char* temp_dir = getenv("TEMP"); + strcpy(path, temp_dir); + strcat(path, "\\"); + strcat(path, time1); + cout << string(type) << endl;//MSExcel + + if (strcmp(type, "MSExcelX") == 0) + { + strcat(path, ".xlsx"); + //path << string(temp_dir) << "\\" << local->tm_year << local->tm_mon << local->tm_mday << local->tm_hour << local->tm_min << local->tm_sec << ".xlsx"; + book = xlCreateXMLBook(); + book->setKey(L"Halil Kural", L"windows-2723210a07c4e90162b26966a8jcdboe");//设置密钥 + } + else//MSExcel + { + strcat(path, ".xls"); + //path << string(temp_dir) << "\\" << local->tm_year << local->tm_mon << local->tm_mday << local->tm_hour << local->tm_min << local->tm_sec << ".xls"; + book = xlCreateBook(); + book->setKey(L"Halil Kural", L"windows-2723210a07c4e90162b26966a8jcdboe");//设置密钥 + } + AE_export_named_ref(doc_tags[i], "excel", path); + //const string xxxxpath = "C:\\新建文件夹\\1.xlsx"; + //printf("xxxxpath=%s \n", xxxxpath.c_str()); + //stringstream pathpp; + //pathpp << string(path); + //printf("path2=%ls \n", StringToWString(xxxxpath).c_str()); + printf("1111\n"); + if (book->load(StringToWString(path).c_str())) { + printf("开始读取excel数据 \n"); + Sheet* sheet = book->getSheet(0); + int rowNum = sheet->lastRow(); + cout << "rowNum:" << rowNum << endl;//2 + int colNum = sheet->lastCol(); + cout << "colNum:" << colNum << endl; + char user_name[1024] = "\0"; + for (auto j = 7; j < rowNum; j++) { + string userID = "", xh = ""; + if (IsCellEmpty(sheet->cellType(j, 1))) { + if (sheet->cellType(j, 1) == 1) {//CELLTYPE_NUMBER + xh = DoubleToStringByStdToString(sheet->readNum(j, 1));//代号 + } + else { + xh = WStringToString(sheet->readStr(j, 1));//代号 + } + + cout << xh << "--" << endl;// + } + if (strcmp("", xh.c_str()) == 0 || strcmp(" ", xh.c_str()) == 0) { + break; + } + if (IsCellEmpty(sheet->cellType(j, 7))) { + if (sheet->cellType(j, 7) == 1) {//CELLTYPE_NUMBER + userID = DoubleToStringByStdToString(sheet->readNum(j, 7));//代号 + } + else { + userID = WStringToString(sheet->readStr(j, 7));//代号 + } + cout << userID << "--" << endl;// + if (strstr(user_name, userID.c_str()) == NULL) { + strcat(user_name, userID.c_str()); + strcat(user_name, ";"); + vec.push_back(userID); + } + } + } + } + struct stat info; + if (stat(path, &info) == 0) { + remove(path); + } + + } + for (int j = 0; j < cnt_task; j++) + { + tag_t subtask = tasks[j]; + char* sub_task_object_type = NULL; + char* sub_task_object_name = NULL; + ITKCALL(AOM_ask_value_string(subtask, "object_name", &sub_task_object_name)); + cout << "名称--------" << sub_task_object_name << endl; + ITKCALL(AOM_ask_value_string(subtask, "object_type", &sub_task_object_type)); + cout << "类型--------" << sub_task_object_type << endl; + if (strcmp(task_name, sub_task_object_name) == 0) + { + cout << "bingo0" << endl; + // ITKCALL( SA_find_user( "0120160006", &user_tag )); + // ITKCALL( EPM_assign_responsible_party( task, user_tag));//设置编制节点的责任方 + tag_t tmp_select_signoff_task = NULLTAG; + ITKCALL(EPM_ask_sub_task(subtask, EPM_select_signoff_team_task, &tmp_select_signoff_task)); + for (int k = 0; k < vec.size(); k++) + { + //构建器 + tag_t* results; + const char query_name_product[1][QRY_name_size_c + 1] = { "管理 - 员工信息" }; + tag_t query_tag1 = NULLTAG; + int entry_count1 = 0; + char** entries1; + char** values1; + char* other_values1[1]; + char* other_entrys1[1]; + other_values1[0] = (char*)calloc(48, sizeof(char)); + other_entrys1[0] = (char*)calloc(48, sizeof(char)); + int num_found1 = 0; + ITKCALL(QRY_find2(query_name_product[0], &query_tag1)); + if (query_tag1 == NULLTAG) + { + WriteLog("query_tag=NULLTAG,没找到 [%s]查询构建器!\n", query_name_product[0]); + ITK_exit_module(1); + return 0; + } + else + { + WriteLog("找到查询构建器\n"); + } + + ITKCALL(QRY_find_user_entries(query_tag1, &entry_count1, &entries1, &values1));//entries1:查询条件表达式;values1:查询条件值(MEM_free释放) + if (entry_count1 == 0) + { + WriteLog("entry_count1=0,查询构建器中没有配置查询条件!\n"); + //ITK_exit_module(1); + if (entries1 != NULL) { + MEM_free(entries1); + entries1 = NULL; + } + if (values1 != NULL) { + MEM_free(values1); + values1 = NULL; + } + return 0; + } + + //date_tag.second = p->tm_sec ; + + for (int n = 0; n < entry_count1; n++) + { + printf("entries1[%d]=%s\n", n, entries1[n]); + if (tc_strcmp(entries1[n], "人员姓名") == 0) { + //strcpy(values[n],nowtime1); + tc_strcpy(other_entrys1[0], "人员姓名"); + tc_strcpy(other_values1[0], vec[k].c_str());//* 2012-05 NBJF16025 Test001 NBJF16046 16C104 + printf("other_values1[0] %s\n", other_values1[0]); + + } + + printf("values[%d]=%s\n", n, values1[n]); + + } + + ITKCALL(ifail = QRY_execute(query_tag1, 1, other_entrys1, other_values1, &num_found1, &results)); + + if (ifail != ITK_ok) { + EMH_ask_error_text(ifail, &message); + WriteLog("程序异常 : \"%d\",\"%s\"\n", ifail, message); + MEM_free(message); + if (entries1 != NULL) { + MEM_free(entries1); + entries1 = NULL; + } + if (values1 != NULL) { + MEM_free(values1); + values1 = NULL; + } + return 0; + } + if (num_found1 == 0) + { + printf("num_found=0,查询构建器中没找到满足条件的数据!\n"); + //ITK_exit_module(1); + if (entries1 != NULL) { + MEM_free(entries1); + entries1 = NULL; + } + if (values1 != NULL) { + MEM_free(values1); + values1 = NULL; + } + } + //开始获取产品信息 + printf("查询构建器得到ITEM数num_found1: \"%d\" \n", num_found1); + + if (num_found1 != 0) { + tag_t login_group = NULLTAG; + printf("111!\n"); + tag_t user = results[0]; + /* char* user_id; + tag_t user_tag = NULLTAG; + printf("222!\n"); + int mem_cnt = 0; + tag_t* members = NULL;*/ + int signoff_cnt = 0; + tag_t* signoffs = NULL; + /* ITKCALL(AOM_ask_value_string(user, "user_id", &user_id)); + printf("user_id=%s\n", user_id); + ITKCALL(SA_find_user2(user_id, &user_tag)); + ITKCALL(SA_ask_user_login_group(user_tag, &login_group)); + printf("333!\n"); + ITKCALL(SA_find_groupmembers(user_tag, login_group, &mem_cnt, &members)); + printf("mem_cnt=%d\n", mem_cnt); + printf("444!\n"); + ITKCALL(EPM_create_adhoc_signoff(tmp_select_signoff_task, members[0], &signoff_cnt, &signoffs));*/ + ITKCALL(EPM_create_adhoc_signoff(tmp_select_signoff_task, user, &signoff_cnt, &signoffs)); + printf("555!\n"); + ITKCALL(EPM_set_adhoc_signoff_selection_done(tmp_select_signoff_task, true)); + printf("666!\n"); + if (signoffs) + { + MEM_free(signoffs); + signoffs = NULL; + } + } + + } + + // ITKCALL(EPM_trigger_action(tmp_select_signoff_task,EPM_complete_action, "")); + break; + } + //} + //} + } + } + } + + } + + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("流程自动指派审批人 结束\n"); + printf("===================================\n"); + return ifail; +} +//pdf名称修改 +int HS_mod_pdf_name(EPM_action_message_t msg) { + int ifail = ITK_ok; + //流程节点相关 + tag_t root_task = NULLTAG, * sub_tasks = NULL, current_task = NULLTAG, type_tag = NULLTAG; + int sub_task_count = 0; + char root_task_name[128] = "", task_name[128] = ""; + int occur_of_counts = 0; + tag_t* taskAttches = NULLTAG; + char tgt_type[WSO_name_size_c + 1] = "", * type_class; + ////循环内部变量 + tag_t cur_task = NULLTAG; + //循环变量 + int count = 0; + //节点循环处理变量 + tag_t itemrevision = NULLTAG; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + int arg_cnt = 0; + char item_type[1024] = ""; + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + //获取下一个参数(从0开始) + arg = TC_next_argument(msg.arguments); + //获取参数的名称和值 + ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (strcmp(argflag, "type") == 0) + { + if (argvalue != NULL) + { + strcpy(item_type, argvalue); + } + } + + } + MEM_free(argflag); + MEM_free(argvalue); + } + current_task = msg.task; + //CreateLogFile("PLA8_signoff",&txtfile); + ECHO("=========================================================\n"); + ECHO("pdf名称修改 开始执行\n"); + ECHO("=========================================================\n"); + //获取属性 + EPM_ask_root_task(msg.task, &root_task); + EPM_ask_sub_tasks(root_task, &sub_task_count, &sub_tasks); + EPM_ask_attachments(root_task, EPM_target_attachment, &occur_of_counts, &taskAttches); + ECHO("%d target attachment found", occur_of_counts); + + for (count = 0; count < occur_of_counts; count++) + { + ITKCALL(TCTYPE_ask_object_type(taskAttches[count], &type_tag)); + ITKCALL(ifail = TCTYPE_ask_class_name2(type_tag, &type_class)); + + //过滤掉非版本对象 + if (strcmp(type_class, item_type) == 0) + { + char* item_id, * item_name, * item_rev; + int level = 0; + itemrevision = taskAttches[count]; + ITKCALL(AOM_ask_value_string(itemrevision, "item_id", &item_id)); + ITKCALL(AOM_ask_value_string(itemrevision, "object_name", &item_name)); + ITKCALL(AOM_ask_value_string(itemrevision, "item_revision_id", &item_rev)); + + //获得数据集 + tag_t relation_type = NULLTAG; + //tag_t attach_relation_type = NULLTAG; + ITKCALL(GRM_find_relation_type(TC_specification_rtype, &relation_type)); + tag_t* secondary_objects = NULLTAG; + int ds_count = 0; + char* dataset_type = NULL; + ITKCALL(GRM_list_secondary_objects_only(itemrevision, relation_type, &ds_count, &secondary_objects)); + for (int j = 0; j < ds_count; j++) + { + char dataset_name[512] = "\0"; + printf("进1\n"); + ITKCALL(AOM_ask_value_string(secondary_objects[j], "object_type", &dataset_type)); + int des_count = 0; + tag_t* dess = NULL; + + printf("dataset_type=%s\n", dataset_type); + if (strcmp(dataset_type, "PDF") != 0) { + + if (dataset_type != NULL) { + MEM_free(dataset_type); + dataset_type = NULL; + } + + continue; + } + ITKCALL(AOM_ask_value_tags(secondary_objects[j], "ref_list", &des_count, &dess)); + if (des_count < 1) { + printf("该数据集引用数量错误\n"); + continue; + } + tag_t spec_dataset_rev = NULLTAG, + ref_object = NULLTAG; + char* ref_object_name = NULL; + AE_reference_type_t reference_type; + //char* datasetName = NULL; + char* pathname; + char* origin_file_name; + vector type_vec; + printf("开始判断类型\n"); + if (strcmp(dataset_type, "PDF") == 0) { + printf("pdf类型\n"); + sprintf(dataset_name, "%s_%s_%s", item_id, item_name, item_rev); + if (level != 0) { + char level_num[64] = "\0"; + sprintf(level_num, "%d", level); + strcat(dataset_name, "_"); + strcat(dataset_name, level_num); + } + level++; + AOM_lock(secondary_objects[j]); + AOM_set_value_string(secondary_objects[j], "object_name", dataset_name); + AOM_save(secondary_objects[j]); + AOM_unlock(secondary_objects[j]); + //AOM_ask_value_string(secondary_objects[j], "object_name", &datasetName); + AE_ask_dataset_latest_rev(secondary_objects[j], &spec_dataset_rev); + AOM_ask_value_string(spec_dataset_rev, "object_name", &ref_object_name); + printf("ref_object_name=%s\n", ref_object_name); + char ref_name[WSO_name_size_c + 1] = "PDF_Reference"; + + AE_ask_dataset_named_ref2(spec_dataset_rev, ref_name, &reference_type, &ref_object); + if (ref_object == NULLTAG) + { + printf("\nref_object is NULLTAG\n"); + return ITK_ok; + } + printf("reference_type=%d\n", reference_type); + if (reference_type == AE_PART_OF) + { + ITKCALL(IMF_ask_file_pathname2(ref_object, SS_WNT_MACHINE, &pathname)); + IMF_ask_original_file_name2(ref_object, &origin_file_name); + char new_ds_name[WSO_name_size_c + 1] = ""; + char* new_file_name = USER_new_file_name(new_ds_name, ref_name, "pdf", 0); + char* temp_dir = getenv("temp"); + char temp_file[SS_MAXPATHLEN] = ""; + strcpy(temp_file, temp_dir); + strcat(temp_file, "\\"); + strcat(temp_file, new_file_name); + IMF_export_file(ref_object, temp_file); + printf("\ntemp_file=%s\n", temp_file); + tag_t new_file_tag = NULLTAG; + IMF_file_t file_descriptor; + IMF_import_file(temp_file, new_file_name, SS_BINARY, &new_file_tag, &file_descriptor); + IMF_set_original_file_name2(new_file_tag, dataset_name); + IMF_close_file(file_descriptor); + AOM_save(new_file_tag); + //AOM_unlock(new_file_tag); + AOM_lock(spec_dataset_rev); + AE_remove_dataset_named_ref_by_tag2(spec_dataset_rev, ref_name, ref_object); + AE_add_dataset_named_ref2(spec_dataset_rev, ref_name, AE_PART_OF, new_file_tag); + AOM_save(spec_dataset_rev); + AOM_unlock(spec_dataset_rev); + } + } + MEM_free(dataset_type); + + } + DOFREE(secondary_objects); + } + } + POM_AM__set_application_bypass(false); + DOFREE(taskAttches); + ECHO("=========================================================\n"); + ECHO("pdf名称修改 结束\n"); + ECHO("=========================================================\n"); + return ifail; +} +//黏贴图纸后操作 +int HS_SendToSRM(void* returnValue) +{ + int ifail = 0; + char* strs = NULL; + char* user = NULL; + char* person_name = NULL; + char* user_id = NULL; + tag_t userTag = NULLTAG; + POM_AM__set_application_bypass(true); + ITKCALL(ifail = USERARG_get_string_argument(&strs)); + ITKCALL(ifail = USERARG_get_string_argument(&user)); + printf("strs=%s\n", strs); + printf("user=%s\n", user); + ITK__convert_uid_to_tag(user, &userTag); + ITKCALL(AOM_ask_value_string(userTag, "user_id", &user_id)); + SA_ask_user_person_name2(userTag, &person_name); + printf("user_id=%s\n", user_id); + printf("person_name=%s\n", person_name); + char* url; + //图纸接口的首选项 + ITKCALL(PREF_ask_char_value("HS_DRAW_URL", 0, &url)); + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char file_name[256] = ""; + + char cmd[1000] = ""; + char* tc_root_dir = getenv("tc_root"); + sprintf(file_name, "%s-%d%d%d%d%d%d", user_id, lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); + printf("file_name====%s\n", file_name); + char path[128] = "\0"; + strcat(path, getenv("TEMP")); + strcat(path, "\\"); + strcat(path, file_name); + strcat(path, ".txt"); + FILE* fpWrite = fopen(path, "w"); + printf("path=%s\n", path); + char Draw_value[10480] = "\0"; + strcat(Draw_value, strs); + fprintf(fpWrite, "%s", Draw_value); + fclose(fpWrite); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HSSendSRM.jar"); + strcat(cmd, " "); + strcat(cmd, "DRAW"); + strcat(cmd, " "); + strcat(cmd, path); + strcat(cmd, " "); + strcat(cmd, person_name); + strcat(cmd, " "); + strcat(cmd, url); + printf("%s", cmd); + WinExec(cmd, SW_NORMAL); + POM_AM__set_application_bypass(false); + return 0; +} +//图纸信息传递SRM +int HS_SRM_Drawing(EPM_action_message_t msg) { + ECHO("===================================\n"); + ECHO("图纸信息传递SRM 开始\n"); + ECHO("===================================\n"); + int ifail = ITK_ok; + ECHO("开超级权限\n"); + POM_AM__set_application_bypass(true); + //从流程中的参数 + tag_t task_tag = NULL_TAG, + root_task_tag = NULLTAG, + * attachments, + * comps; + task_tag = msg.task; + int att_cnt = 0; + int value_count = 0; + int count = 0; + char** values; + char* url; + //ITKCALL(PREF_ask_char_values("HS_UNIT_CODE", &value_count, &values)); + //图纸接口的首选项 + ITKCALL(PREF_ask_char_value("HS_DRAW_URL", 0, &url)); + tag_t executor; + char* user_id; + char* user_uid; + char* person_name; + char* valueid = "null";//零件id + char* revvalueid = "null";//零件版本id + EPM_ask_root_task(task_tag, &root_task_tag); + // + ITKCALL(AOM_ask_value_tag(task_tag, "owning_user", &executor)); + ITKCALL(AOM_ask_value_string(executor, "user_id", &user_id)); + POM_tag_to_uid(executor, &user_uid); + SA_ask_user_person_name2(executor, &person_name); + EPM_ask_attachments(root_task_tag, EPM_target_attachment, &att_cnt, &attachments); + char* taget_type; + vector Draw_vec; + SPM_DRAW Draw; + char* rootUid; + ITK__convert_tag_to_uid(root_task_tag, &rootUid); + for (int i = 0; i < att_cnt; i++) + { + tag_t target = attachments[i]; + boolean flag = false; + int form_count = 0; + int num = 0; + tag_t* forms = NULLTAG; + tag_t* num_tags = NULLTAG; + + tag_t master_form = NULLTAG; + tag_t systemItem = NULLTAG; + tag_t lastrev = NULLTAG; + char* status; + ITKCALL(AOM_ask_value_string(target, "object_type", &taget_type)); + + ECHO("3.15流程目标类型======%s\n", taget_type); + + if (((strstr(taget_type, "Revision") != NULL) || (strstr(taget_type, "revision") != NULL)) + && (strstr(taget_type, "Master") == NULL) && (strstr(taget_type, "master") == NULL) + && (strstr(taget_type, "BOM") == NULL) && (strstr(taget_type, "bom") == NULL) && (strstr(taget_type, "Bom") == NULL)) + { + //判断是否为零件版本 + if (strcmp(taget_type, "Part Revision") == 0) { + //获取发布状态,判断是否发布 + ITKCALL(AOM_ask_value_tags(target, "release_status_list", &num, &num_tags)); + if (num > 0) { + printf("进入Part Revision的判断\n"); + //1、先获取零件id + ITKCALL(AOM_ask_value_string(target, "item_id", &valueid)); + ECHO("3.15物料id===1===%s\n", valueid); + + //获取关系文件夹下的图纸 + ITKCALL(AOM_ask_value_tags(target, "TC_Is_Represented_By", &count, &comps)); + //获取所有版本的图纸 + if (count > 0) { + for (int j = 0; j < count; j++) { + tag_t comp = comps[j]; + char* tustatus; + ITKCALL(AOM_ask_value_tags(comp, "release_status_list", &num, &num_tags)); + if (num > 0) + { + //先通过版本获取对象 + ITEM_ask_item_of_rev(comp, &systemItem); + //再通过对象获取最新版本 + ITEM_ask_latest_rev(systemItem, &lastrev); + //2、通过最新版本,获取版本id + ITKCALL(AOM_ask_value_string(lastrev, "item_revision_id", &revvalueid)); + ECHO("3.15版本id===1===%s\n", revvalueid); + //将获取到的零件id和图纸版本id写进集合中 + if (strcmp(valueid, "") != 0 && strcmp(valueid, " ") != 0) { + Draw.cInvCode.assign(valueid); + } + else { + Draw.cInvCode.assign(" "); + } + if (strcmp(revvalueid, "") != 0 && strcmp(revvalueid, " ") != 0) { + Draw.VersionNo.assign(revvalueid); + } + else { + Draw.VersionNo.assign(" "); + } + Draw_vec.push_back(Draw); + } + else + { + WriteLog("图纸未发布"); + ECHO("图纸未发布\n"); + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("图纸未发布"))); + goto end; + } + } + } + else + { + ECHO("不存在图纸\n"); + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("不存在图纸"))); + goto end; + } + + } + else + { + WriteLog("零件未发布"); + ECHO("零件未发布\n"); + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("零件未发布"))); + goto end; + } + }//判断是否为图纸版本 + else if (strcmp(taget_type, "HS2_ProductPartRevision") == 0) { + //获取发布状态,判断是否发布 + ITKCALL(AOM_ask_value_tags(target, "release_status_list", &num, &num_tags)); + if (num > 0) { + //1、先获取版本id + ITKCALL(AOM_ask_value_string(target, "item_revision_id", &revvalueid)); + ECHO("3.15版本id===2===%s\n", revvalueid); + //获取关系文件夹下的零件 + ITKCALL(AOM_ask_value_tags(target, "representation_for", &count, &comps)); + //判断是否有零件 + if (count > 0) { + for (int j = 0; j < count; j++) { + tag_t comp = comps[j]; + char* tustatus; + ITKCALL(AOM_ask_value_tags(comp, "release_status_list", &num, &num_tags)); + if (num > 0) + { + //2、获取零件id + ITKCALL(AOM_ask_value_string(comp, "item_id", &valueid)); + ECHO("3.15物料id===2===%s\n", valueid); + //将获取到的零件id和图纸版本id写进集合中 + if (strcmp(valueid, "") != 0 && strcmp(valueid, " ") != 0) { + Draw.cInvCode.assign(valueid); + } + else { + Draw.cInvCode.assign(" "); + } + if (strcmp(revvalueid, "") != 0 && strcmp(revvalueid, " ") != 0) { + Draw.VersionNo.assign(revvalueid); + } + else { + Draw.VersionNo.assign(" "); + } + Draw_vec.push_back(Draw); + } + } + } + } + else + { + WriteLog("图纸未发布"); + ECHO("图纸未发布\n"); + ifail = ITK_err; + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_error, ITK_err, ("图纸未发布"))); + goto end; + } + + } + + } + //else { + // ECHO("不存在图纸版本\n"); + // ifail = ITK_err; + // ITKCALL(ifail = EMH_store_error_s1(EMH_severity_information, ITK_err, ("不存在图纸版本,请发布!!")));//错误弹窗 + // goto end; + //} + } + + + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char file_name[256] = ""; + + char cmd[1000] = ""; + char* tc_root_dir = getenv("tc_root"); + sprintf(file_name, "%s-%d%d%d%d%d%d", user_id, lt->tm_year, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); + printf("file_name====%s\n", file_name); + char path[128] = "\0"; + strcat(path, getenv("TEMP")); + strcat(path, "\\"); + strcat(path, file_name); + strcat(path, ".txt"); + FILE* fpWrite = fopen(path, "w"); + printf("path=%s\n", path); + char Draw_value[10480] = "\0"; + + for (int i = 0; i < Draw_vec.size(); i++) + { + + strcat(Draw_value, (Draw_vec[i].cInvCode).c_str()); + strcat(Draw_value, ";"); + strcat(Draw_value, (Draw_vec[i].VersionNo).c_str()); + + if (i < Draw_vec.size() - 1) { + + strcat(Draw_value, "&"); + } + } + fprintf(fpWrite, "%s", Draw_value); + fclose(fpWrite); + strcpy(cmd, "java -jar "); + strcat(cmd, tc_root_dir); + strcat(cmd, "\\bin\\HSSendSRM.jar"); + strcat(cmd, " "); + strcat(cmd, "DRAW"); + strcat(cmd, " "); + strcat(cmd, path); + strcat(cmd, " "); + strcat(cmd, person_name); + strcat(cmd, " "); + strcat(cmd, url); + strcat(cmd, " "); + strcat(cmd, rootUid); + printf("%s", cmd); + WinExec(cmd, SW_NORMAL); + //system(cmd); + +end: + ECHO("关超级权限\n"); + POM_AM__set_application_bypass(false); + ECHO("===================================\n"); + ECHO("图纸信息传递SRM 结束\n"); + ECHO("===================================\n"); + return ifail; +} +//时间表任务通知 +int Connor_Schedule_Task_Mail(EPM_action_message_t msg) { + bool debug = false; + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, task_count = 0, user_cnt = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL, * task_name = NULL, * task_type = NULL; + char* user_id = NULL, * user_name = NULL, * job_name = NULL, * task_state = NULL; + tag_t task_tag = NULLTAG, rootTask_tag = NULLTAG, user_tag = NULLTAG; + tag_t* attachments = NULL, * task_tags = NULL; + vector all_user_tags; + vector mail_addrs; + tag_t memberTag = NULLTAG; + SIGNOFF_TYPE_t memberType; + ITKCALL(POM_get_user(&user_name, &user_tag)); + ITKCALL(SA_ask_user_identifier2(user_tag, &user_id)); + DOFREE(user_id); + char* url; + ITKCALL(PREF_ask_char_value("Autocode_SendEmailServer_URL", 0, &url)); + printf("=============================================================\n"); + printf("开始执行:Connor_Schedule_Task_Mail\n"); + printf("=============================================================\n"); + printf("开超级权限\n"); + POM_AM__set_application_bypass(true); + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + //获取handler的参数的个数 + char sign_attr[2048] = ""; + + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + //获取下一个参数(从0开始) + arg = TC_next_argument(msg.arguments); + + //获取参数的名称和值 + ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (strcmp(argflag, "flag") == 0) + { + if (argvalue != NULL) + { + strcpy(sign_attr, argvalue); + } + } + + } + MEM_free(argflag); + MEM_free(argvalue); + } + //char* task_uid; + //POM_tag_to_uid(task_tag, &task_uid); + //char mail_content[1024] = "您有一个项目任务,请查看:"; + char mail_content[1024] = "\0"; + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + ITKCALL(ifail = AOM_ask_value_string(rootTask_tag, "job_name", &job_name)); + printf("流程名称:%s\n", job_name); + strcpy(mail_content, job_name); + ITKCALL(ifail = EPM_ask_name2(task_tag, &task_name)); + ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_type", &task_type)); + if (ifail != ITK_ok) { + DOFREE(task_name); + DOFREE(task_type); + } + ECHO("task_type = %s\n", task_type); + char mail_subject[512] = "\0"; + if (strcmp("EPMDoTask", task_type) == 0) { + + //获取所属项目,开始日期,完成日期 + //时间任务表对象,时间表对象 + tag_t* schedule_tasks = NULL; + tag_t schedule_tag = NULL; + int task_num = 0; + //所属项目 + char start_date_s[512] = "\0"; + char finish_date_s[512] = "\0"; + char* projects_list = NULL; + date_t start_date, finish_date; + ITKCALL(ifail = AOM_ask_value_tags(task_tag, "fnd0RootScheduleTask", &task_num, &schedule_tasks)); + //if (task_num > 0) { + if (task_num == 0) { + ITKCALL(ifail = AOM_ask_value_tags(task_tag, "root_reference_attachments", &task_num, &schedule_tasks)); + } + ITKCALL(ifail = AOM_ask_value_tag(schedule_tasks[0], "schedule_tag", &schedule_tag)); + ITKCALL(ifail = AOM_ask_value_string(schedule_tag, "projects_list", &projects_list)); + ITKCALL(ifail = AOM_ask_value_date(schedule_tasks[0], "start_date", &start_date)); + ITKCALL(ifail = AOM_ask_value_date(schedule_tasks[0], "finish_date", &finish_date)); + + if (strcmp("start", sign_attr) == 0) { + strcpy(mail_subject, "您有一个项目任务,请查看"); + ITKCALL(ifail = AOM_ask_value_tag(task_tag, "fnd0Performer", &user_tag)); + if (user_tag == NULLTAG) { + printf("未找到执行者\n"); + } + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_state", &task_state)); + printf(">> DO任务信息:%s|%s\n", user_name, task_state); + all_user_tags.push_back(user_tag); + + sprintf(start_date_s, "%d-%d-%d-%02d:%02d", start_date.year, start_date.month + 1, start_date.day, start_date.hour, start_date.minute); + sprintf(finish_date_s, "%d-%d-%d-%02d:%02d", finish_date.year, finish_date.month + 1, finish_date.day, finish_date.hour, finish_date.minute); + /*sprintf(start_date_s, "%d-%d-%d-%d:%d", start_date.year, start_date.month + 1, start_date.day, start_date.hour, start_date.minute); + sprintf(finish_date_s, "%d-%d-%d-%d:%d", finish_date.year, finish_date.month + 1, finish_date.day, finish_date.hour, finish_date.minute);*/ + strcat_s(mail_content, "-项目名称:"); + strcat_s(mail_content, projects_list); + strcat_s(mail_content, "-开始日期:"); + strcat_s(mail_content, start_date_s); + strcat_s(mail_content, "-完成日期:"); + strcat_s(mail_content, finish_date_s); + + } + else if (strcmp("end", sign_attr) == 0) { + strcpy(mail_subject, "您有一个项目任务已完成,请查看"); + ITKCALL(ifail = AOM_ask_value_tag(task_tag, "owning_user", &user_tag)); + if (user_tag == NULLTAG) { + printf("未找任务所有者\n"); + } + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + ITKCALL(ifail = AOM_ask_value_string(task_tag, "task_state", &task_state)); + printf(">> 完成任务信息:%s|%s\n", user_name, task_state); + all_user_tags.push_back(user_tag); + //实际开始时间 + char actual_start_date_s[512] = "\0"; + //系统当前时间作为实际完成时间 + time_t t; + struct tm* lt; + time(&t);//获取Unix时间戳。 + lt = localtime(&t);//转为时间结构。 + char current_date_s[512] = "\0"; //当前年份 + strftime(current_date_s, 64, "%Y-%m-%d-%H:%M:%S", lt); + //sprintf(current_date_s, "%d-%d-%d-%d:%d", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday,lt->tm_hour,lt->tm_min); + //char actual_finish_date_s[512] = "\0"; + date_t actual_start_date; + /*int hour = start_date.hour; + string hour_s = "0"; + if (hour < 10) {s + hour_s.append(to_string(hour)); + }*/ + sprintf(start_date_s, "%d-%d-%d-%02d:%02d", start_date.year, start_date.month + 1, start_date.day, start_date.hour, start_date.minute); + //sprintf(start_date_s, "%d-%d-%d-%d:%d", start_date.year, start_date.month + 1, start_date.day, start_date.hour, start_date.minute); + sprintf(finish_date_s, "%d-%d-%d-%02d:%02d", finish_date.year, finish_date.month + 1, finish_date.day, finish_date.hour, finish_date.minute); + ITKCALL(ifail = AOM_ask_value_date(schedule_tasks[0], "actual_start_date", &actual_start_date)); + sprintf(actual_start_date_s, "%d-%d-%d-%02d:%02d", actual_start_date.year, actual_start_date.month + 1, actual_start_date.day, actual_start_date.hour, actual_start_date.minute); + //sprintf(actual_finish_date_s, "%d-%d-%d", actual_finish_date.year, actual_finish_date.month + 1, actual_finish_date.day); + ITKCALL(ifail = AOM_ask_value_tag(task_tag, "fnd0Performer", &user_tag)); + if (user_tag == NULLTAG) { + printf("未找到执行者\n"); + } + ITKCALL(ifail = AOM_ask_value_string(user_tag, "user_name", &user_name)); + strcat_s(mail_content, "-项目名称:"); + strcat_s(mail_content, projects_list); + strcat_s(mail_content, "-开始日期:"); + strcat_s(mail_content, start_date_s); + strcat_s(mail_content, "-完成日期:"); + strcat_s(mail_content, finish_date_s); + strcat_s(mail_content, "-实际开始日期:"); + strcat_s(mail_content, actual_start_date_s); + strcat_s(mail_content, "-实际完成日期:"); + strcat_s(mail_content, current_date_s); + strcat_s(mail_content, "-任务指派人:"); + strcat_s(mail_content, user_name); + + + } + else { + printf(">> 未配置任务参数flag或任务参数配置错误\n"); + } + printf("邮件内容=%s\n", mail_content); + DOFREE(user_name); + DOFREE(task_state); + //else { + //printf(">> 当前流程不存在时间表任务\n"); + //} + + } + else { + printf(">> 未知任务类型\n"); + } + user_cnt = all_user_tags.size(); + printf("处理用户数据:%d\n", user_cnt); + for (int i = 0; i < user_cnt; i++) { + tag_t mail_user = all_user_tags[i], person_tag = NULLTAG; + char* user_str = NULL, * mail_str = NULL; + ITKCALL(ifail = AOM_ask_value_tag(mail_user, "person", &person_tag)); + if (ifail != ITK_ok || person_tag == NULLTAG) { + continue; + } + ITKCALL(ifail = AOM_ask_value_string(person_tag, "PA9", &mail_str)); + if (ifail != ITK_ok) { + continue; + } + ITKCALL(ifail = AOM_ask_value_string(mail_user, "user_name", &user_str)); + printf(">> %d. %s -> %s\n", i + 1, user_str, mail_str); + if (mail_str == NULL || strcmp("", mail_str) == 0 || std::find(mail_addrs.begin(), mail_addrs.end(), mail_str) != mail_addrs.end()) { + printf(">> Skip\n"); + } + else { + mail_addrs.push_back(mail_str); + } + DOFREE(user_str); + DOFREE(mail_str); + } + user_cnt = mail_addrs.size(); + + + printf("发送邮件:%d", user_cnt); + char user_mail[2048] = "\0"; + for (int i = 0; i < user_cnt; i++) { + string mail_addr = mail_addrs[i]; + WriteLog(">> %d. 发送邮件给[%s]", i + 1, mail_addr.c_str()); + strcat(user_mail, mail_addr.c_str()); + if (i < user_cnt - 1) { + strcat(user_mail, ","); + } + } + char cmd[1024] = ""; + char jarfile[512] = ""; + sprintf(jarfile, "%s\\bin\\SendToEmail.jar", getenv("TC_ROOT")); + //strcpy_s(cmd, "java -jar "); + //strcat_s(cmd, jarfile); + //strcat_s(cmd, " \""); + //strcat_s(cmd, user_mail); + //strcat_s(cmd, "\" \"【TeamCenter】-"); + //strcat_s(cmd, mail_subject); + //strcat_s(cmd, "\" \""); + ///*strcat_s(cmd, " 收到"); + //strcat_s(cmd, job_name); + //strcat_s(cmd, "任务,请尽快处理!!");*/ + //strcat_s(cmd, mail_content); + //strcat_s(cmd, "\""); + //strcat_s(cmd, url); + + + strcpy_s(cmd, "java -jar "); + strcat_s(cmd, jarfile); + strcat_s(cmd, " 【TeamCenter】-"); + strcat_s(cmd, mail_subject); + strcat_s(cmd, " "); + strcat_s(cmd, user_mail); + strcat_s(cmd, " "); + strcat_s(cmd, mail_content); + strcat_s(cmd, " "); + strcat_s(cmd, url); + printf("CMD:%s", cmd); + WinExec(cmd, SW_NORMAL); + //system(cmd); + printf("执行完成"); + printf("关超级权限\n"); + POM_AM__set_application_bypass(false); +end: + all_user_tags.clear(); + printf("=============================================================\n"); + printf("执行结束:Connor_Schedule_Task_Mail\n"); + printf("=============================================================\n"); + return ITK_ok; +} +//检查流程目标对象下数据集的大小 +int HS2_Check_Dataset_Size(EPM_rule_message_t msg) { + printf("===================================\n"); + printf("检查流程目标对象下数据集的大小 开始\n"); + printf("===================================\n"); + + int ifail = ITK_ok; + //流程节点相关 + tag_t root_task = NULLTAG, * sub_tasks = NULL, current_task = NULLTAG, type_tag = NULLTAG; + int sub_task_count = 0; + char root_task_name[128] = "", task_name[128] = ""; + int occur_of_counts = 0; + tag_t* taskAttches = NULLTAG; + char tgt_type[WSO_name_size_c + 1] = "", * type_class; + ////循环内部变量 + tag_t cur_task = NULLTAG; + //循环变量 + int count = 0; + + //节点循环处理变量 + tag_t itemrevision = NULLTAG, master_form_rel_type = NULLTAG; + int form_count = 0; + tag_t* form_list = NULL, master_form = NULLTAG; + + //开旁路 + //参数相关 + int arg_cnt = 0; + char* argflag = NULL, * argvalue = NULL, * arg = NULL; + char TZ[16] = ""; + arg_cnt = TC_number_of_arguments(msg.arguments); + ECHO("参数个数为:%d\n", arg_cnt); + POM_AM__set_application_bypass(true); + + + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ifail = ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue); + if (stricmp(argflag, "type") == 0) + { + if (argvalue != NULL) + { + strcpy(TZ, argvalue); + } + } + } + if (argflag != NULL) { + MEM_free(argflag); + argflag = NULL; + } + } + EPM_ask_attachments(root_task, EPM_target_attachment, &occur_of_counts, &taskAttches); + for (count = 0; count < occur_of_counts; count++) + { + ITKCALL(TCTYPE_ask_object_type(taskAttches[count], &type_tag)); + ITKCALL(ifail = TCTYPE_ask_class_name2(type_tag, &type_class)); + + if (((strstr(type_class, "Revision") != NULL) || (strstr(type_class, "revision") != NULL)) + && (strstr(type_class, "Master") == NULL) && (strstr(type_class, "master") == NULL) + && (strstr(type_class, "BOM") == NULL) && (strstr(type_class, "bom") == NULL) && (strstr(type_class, "Bom") == NULL)) + { + //获得数据集 + tag_t relation_type = NULLTAG; + //tag_t attach_relation_type = NULLTAG; + ITKCALL(GRM_find_relation_type(TC_specification_rtype, &relation_type)); + tag_t* secondary_objects = NULLTAG; + int ds_count = 0; + char* dataset_type = NULL, * desc_value = NULL, * file_path = NULL, * desc_path; + + ITKCALL(GRM_list_secondary_objects_only(itemrevision, relation_type, &ds_count, &secondary_objects)); + for (int j = 0; j < ds_count; j++) + { + int des_count = 0; + tag_t* dess = NULL; + tag_t des = NULL; + char* size = NULL; + ITKCALL(AOM_ask_value_tags(secondary_objects[j], "ref_list", &des_count, &dess)); + if (des_count < 1) { + printf("该数据集引用数量错误\n"); + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_information, ITK_err, ("该数据集引用数量错误,无引用文件!!")));//错误弹窗 + continue; + } + for (int h = 0; h < des_count; h++) { + des = dess[h]; + ITKCALL(ifail = AOM_ask_value_string(des, "file_size", &size)); + if (strcmp(size, "0 bytes") != 0) { + ITKCALL(ifail = EMH_store_error_s1(EMH_severity_information, ITK_err, ("该数据集大小错误,引用错误!!")));//错误弹窗 + continue; + } + } + } + } + } + //关旁路 + POM_AM__set_application_bypass(false); + printf("===================================\n"); + printf("检查流程目标对象下数据集的大小 结束\n"); + printf("===================================\n"); + return ifail; +} diff --git a/jf_itk/yb_send_to_erp.h b/jf_itk/yb_send_to_erp.h new file mode 100644 index 0000000..1fd6a25 --- /dev/null +++ b/jf_itk/yb_send_to_erp.h @@ -0,0 +1,78 @@ +#include "erp_utils.h" +#include "ocilib.h" +#include "common_itk_util.h" +#include "string_utils.h" +#include "string_helper.h" +#include "error_handling.h" +#include "connor_util.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +#define ERROR_QRY_NOT_FOUND (EMH_USER_error_base + 120) +int HS_ERP_Part(EPM_action_message_t msg); +int HS_ERP_BOM_ALL(EPM_action_message_t msg); +int HS_ERP_BOM(EPM_action_message_t msg); +int HS_SRM_Drawing(EPM_action_message_t msg); +int Connor_set_bypass(void* returnValue); +int Connor_close_bypass(void* returnValue); +int Connor_bypass(EPM_action_message_t msg); +int HS_pdf_signoff(EPM_action_message_t msg); +int Connor_Send_Mail_To_All_Users(EPM_action_message_t msg); +int HS2_set_process_name(EPM_action_message_t msg); +int HS_set_signoff(EPM_action_message_t msg); +int HS2_AutoAssign(EPM_action_message_t msg); +int HS_mod_pdf_name(EPM_action_message_t msg); +int Connor_Schedule_Task_Mail(EPM_action_message_t msg); +int HS2_Check_Dataset_Size(EPM_rule_message_t msg); +int HS_SendToSRM(void* returnValue); +struct EPR_PRAT +{ + string id; ///item_id + string name; ///object_name + string code; //- + string unit_code; //-λԣhs2_unit + string spec; //񣨷ƴӣ + string class_id; //ID + string bzs;//ͻװ +}; +struct EPR_ZJ +{ + string invCode; + string sortSeq; + string baseQtyN; + string baseQtyD; +}; +struct EPR_BOM +{ + string cinvCode; + string version; + vector zjs; +}; +struct SPM_DRAW +{ + string cInvCode; + string VersionNo; +}; + + + + + + + + diff --git a/x64/Release/YB_ERP_itk.dll b/x64/Release/YB_ERP_itk.dll new file mode 100644 index 0000000..a5056b1 Binary files /dev/null and b/x64/Release/YB_ERP_itk.dll differ diff --git a/x64/Release/YB_ERP_itk.exp b/x64/Release/YB_ERP_itk.exp new file mode 100644 index 0000000..5757af6 Binary files /dev/null and b/x64/Release/YB_ERP_itk.exp differ diff --git a/x64/Release/YB_ERP_itk.lib b/x64/Release/YB_ERP_itk.lib new file mode 100644 index 0000000..aea0da6 Binary files /dev/null and b/x64/Release/YB_ERP_itk.lib differ diff --git a/x64/Release/YB_ERP_itk.pdb b/x64/Release/YB_ERP_itk.pdb new file mode 100644 index 0000000..b3edf9c Binary files /dev/null and b/x64/Release/YB_ERP_itk.pdb differ