commit
13379ada3f
@ -0,0 +1,113 @@
|
||||
/**
|
||||
* @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 <tccore/imantype.hxx>
|
||||
#include <ae/datasettype.h>
|
||||
#include <time.h>
|
||||
#include<tc/tc_macros.h>
|
||||
#include <tccore/tctype.h>
|
||||
#include<tccore/workspaceobject.h>
|
||||
#include "error_handling.h"
|
||||
#include "common_itk_util.h"
|
||||
|
||||
int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] )
|
||||
{
|
||||
if( datasettype_ref == NULL || ext == NULL )
|
||||
return -1;
|
||||
|
||||
strcpy( ext, "" );
|
||||
|
||||
int ref_count = 0, i;
|
||||
char **ref_templates = NULL, **ref_formats = NULL;
|
||||
ITKCALL( AE_ask_datasettype_file_refs( datasettype, datasettype_ref,
|
||||
&ref_count, &ref_templates, &ref_formats ) );
|
||||
for( i=0; i<ref_count; i++ )
|
||||
{
|
||||
if( stricmp( ref_formats[i], "BINARY" ) == 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
if( i<ref_count )
|
||||
{
|
||||
strcpy( ext, ref_templates[i] + 2 );
|
||||
}
|
||||
|
||||
MEM_free( ref_templates );
|
||||
MEM_free( ref_formats );
|
||||
|
||||
return ITK_ok;
|
||||
}
|
||||
|
||||
int CompareDate( date_t date1, date_t date2 )
|
||||
{
|
||||
int comp_ret = 0;
|
||||
char str_date1[30] = "";
|
||||
char str_date2[30] = "";
|
||||
|
||||
sprintf( str_date1, "%d%2d%2d%2d%2d%2d", date1.year, date1.month, date1.day,
|
||||
date1.hour, date1.minute, date1.second );
|
||||
sprintf( str_date2, "%d%2d%2d%2d%2d%2d", date2.year, date2.month, date2.day,
|
||||
date2.hour, date2.minute, date2.second );
|
||||
|
||||
comp_ret = strcmp( str_date1, str_date2 );
|
||||
return comp_ret;
|
||||
}
|
||||
|
||||
int GetRandomTempFile( char tempFile[256] )
|
||||
{
|
||||
time_t now;
|
||||
srand( (unsigned)time(&now) );
|
||||
struct tm *p = localtime(&now);
|
||||
|
||||
sprintf( tempFile, "TEMP%d%d%d%d%d%d-%d", p->tm_year+1900, p->tm_mon+1,
|
||||
p->tm_yday, p->tm_hour, p->tm_min, p->tm_sec, rand() );
|
||||
return 0;
|
||||
}
|
||||
|
||||
logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] )
|
||||
{
|
||||
logical is_rev = FALSE;
|
||||
|
||||
tag_t cur_type = NULLTAG, parent_type = NULLTAG, temp_type = NULLTAG;
|
||||
//ITKCALL( IMANTYPE_find_type( object_type, NULL, &cur_type ) );
|
||||
ITKCALL(TCTYPE_find_type(object_type, "", &cur_type));
|
||||
|
||||
parent_type = cur_type;
|
||||
temp_type = cur_type;
|
||||
|
||||
do
|
||||
{
|
||||
if( cur_type != NULLTAG )
|
||||
{
|
||||
char* cur_type_name = NULL;
|
||||
ITKCALL(TCTYPE_ask_name2( cur_type, &cur_type_name ) );
|
||||
//TC8===================
|
||||
//if( stricmp( cur_type_name, "ItemRevision" ) == 0 )
|
||||
if( strstr( cur_type_name, "Revision" ) != 0 )
|
||||
{
|
||||
is_rev = TRUE;
|
||||
break;
|
||||
}
|
||||
else {}
|
||||
}
|
||||
|
||||
ITKCALL(TCTYPE_ask_parent_type( cur_type, &temp_type ) );
|
||||
if( temp_type != NULLTAG )
|
||||
parent_type = temp_type;
|
||||
cur_type = parent_type;
|
||||
} while ( temp_type != NULLTAG );
|
||||
|
||||
return is_rev;
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @file common_itk_util.h
|
||||
* @brief itk warpper utility function
|
||||
* @author James
|
||||
* @history
|
||||
* ===================================================================================
|
||||
* Date Name Description of Change
|
||||
* 09-July-2008 James
|
||||
*/
|
||||
#include<tccore/workspaceobject.h>
|
||||
#ifndef COMMON_ITK_UTIL
|
||||
#define COMMON_ITK_UTIL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
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
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
||||
/*!
|
||||
* @addtogroup common
|
||||
* \file error_handling.h
|
||||
* \brief 错误处理函数
|
||||
* \date 2008/6/10
|
||||
* \author James Pang
|
||||
*/
|
||||
|
||||
#ifndef SIMPLE_ERR_H_INCLUDED
|
||||
#define SIMPLE_ERR_H_INCLUDED
|
||||
|
||||
//! @headerfile Tceng ITK 头文件
|
||||
#include <pom/pom/pom_errors.h>
|
||||
#include <base_utils/mem.h>
|
||||
|
||||
#include <tc/emh.h>
|
||||
#include <common/emh_const.h>
|
||||
|
||||
#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<n_ifails; err_count++ ) \
|
||||
{ \
|
||||
printf( "ERROR: %d ERROR MSG: %s.\n", ifails[i], texts[i] ); \
|
||||
} \
|
||||
MEM_free( serverities ); \
|
||||
MEM_free( ifails ); \
|
||||
MEM_free( texts ); \
|
||||
return (stat); \
|
||||
} \
|
||||
} \
|
||||
|
||||
#define CHECK_FILE(x,ret) { \
|
||||
FILE *stream = NULL; \
|
||||
if( (stream = fopen(x,"rb")) == NULL ) { \
|
||||
printf( "%s doesn't exists, please check!\n", x ); \
|
||||
IMAN_write_syslog( "%s doesn't exists, please check!\n", x) ; \
|
||||
ret = -1; \
|
||||
} \
|
||||
else { \
|
||||
fclose(stream); \
|
||||
stream = NULL; \
|
||||
ret = 0; \
|
||||
} \
|
||||
} \
|
||||
|
||||
//check file not exists
|
||||
#define CHECK_FILE_NOT_EXISTS(x,ret) { \
|
||||
FILE *stream = NULL; \
|
||||
if( (stream = fopen(x,"rb")) != NULL ) { \
|
||||
fclose(stream); \
|
||||
stream = NULL; \
|
||||
printf( "%s exists, please check!\n", x ); \
|
||||
IMAN_write_syslog( "%s exists, please check!\n", x) ; \
|
||||
ret = -1; \
|
||||
} \
|
||||
else { \
|
||||
ret = 0; \
|
||||
} \
|
||||
} \
|
||||
|
||||
#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
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#endif //End of error_hanling.h
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @addtogroup service
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file itk_service_common.cpp
|
||||
* @brief declarion of all custom service exits functions
|
||||
* @date 2009/2/13
|
||||
* @author James Pang
|
||||
* @history
|
||||
* ===================================================================================
|
||||
* Date Name Description
|
||||
* 13-Feb-2009 James created
|
||||
*/
|
||||
|
||||
#ifndef ITK_SERVICE_COMMON
|
||||
#define ITK_SERVICE_COMMON
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
int GetFolderTagandCreate (void * returnValueType);
|
||||
int SERVICE_part_no( void *retValType );
|
||||
int SERVICE_internal_part_no( const char *argMark, int length, int start_num, int end_num,int step, char **newID /*OF*/);
|
||||
|
||||
int SERVICE_parts_frequency( void *revValType );
|
||||
int SERVICE_get_lov_desc( void* revValType );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include <epm/epm.h>
|
||||
|
||||
int POM_AM__set_application_bypass(logical bypass);
|
||||
int jy_create_material_code(EPM_action_message_t msg);
|
||||
int xy_assign_form_props(EPM_action_message_t msg);
|
||||
int ORIGIN_EPM_auto_signoff(EPM_action_message_t msg);
|
||||
int ORIGIN_EPM_check_and_signoff(EPM_action_message_t msg);
|
@ -0,0 +1,117 @@
|
||||
|
||||
#include <tccore/custom.h>
|
||||
#include <server_exits/user_server_exits.h>
|
||||
#include <tccore/item_msg.h>
|
||||
#include <epm/epm.h>
|
||||
//#include "register_handler_head.h"
|
||||
#include "register_handler_methods.h"
|
||||
|
||||
|
||||
//供流程调用的
|
||||
// 标准的注册供流程调用服务handler的入口 TC_save_msg
|
||||
|
||||
|
||||
|
||||
int USERSERVICE_custom_register_handlers(int* decision, va_list args)
|
||||
{
|
||||
int ifail = ITK_ok, n = 0;
|
||||
char date_buf[80], * expire_date, env[512], temp1[512], temp2[512];
|
||||
time_t now;
|
||||
struct tm* p;
|
||||
|
||||
*decision = ALL_CUSTOMIZATIONS;
|
||||
|
||||
int status = ITK_ok;
|
||||
|
||||
|
||||
|
||||
|
||||
(ifail = EPM_register_action_handler("Auto-Signoff-Info", "", (EPM_action_handler_t)ORIGIN_EPM_auto_signoff));
|
||||
if (ifail == 0) {
|
||||
printf("Registering action handler Auto-Signoff-Info successful\n");
|
||||
}
|
||||
else {
|
||||
printf("Registering action handler Auto-Signoff-Info failed %d\n", ifail);
|
||||
}
|
||||
|
||||
|
||||
(ifail = EPM_register_action_handler("Check-And-Signoff", "", (EPM_action_handler_t)ORIGIN_EPM_check_and_signoff));
|
||||
if (ifail == 0) {
|
||||
printf("Registering action handler Check-And-Signoff successful\n");
|
||||
}
|
||||
else {
|
||||
printf("Registering action handler Check-And-Signoff failed %d\n", ifail);
|
||||
}
|
||||
|
||||
|
||||
(ifail = EPM_register_action_handler("jy-create-material-code", "", (EPM_action_handler_t)jy_create_material_code));
|
||||
if (ifail == 0) {
|
||||
printf("Registering action handler jy-create-material-code successful\n");
|
||||
}
|
||||
else {
|
||||
printf("Registering action handler jy-create-material-code failed %d\n", ifail);
|
||||
}
|
||||
|
||||
(ifail = EPM_register_action_handler("xy-assign-form-props", "", (EPM_action_handler_t)xy_assign_form_props));
|
||||
if (ifail == 0) {
|
||||
printf("Registering action handler xy-assign-form-props successful\n");
|
||||
}
|
||||
else {
|
||||
printf("Registering action handler xy-assign-form-props failed %d\n", ifail);
|
||||
}
|
||||
|
||||
return ifail;
|
||||
}
|
||||
|
||||
|
||||
int Connor_open_bypass(void* returnValue)
|
||||
{
|
||||
int ifail = ITK_ok;
|
||||
char* propname;
|
||||
ITKCALL(ifail = USERARG_get_string_argument(&propname));
|
||||
printf("propname=================%s\n", propname);
|
||||
if (strcmp(propname, "true") == 0) {
|
||||
POM_AM__set_application_bypass(TRUE);
|
||||
}
|
||||
else {
|
||||
POM_AM__set_application_bypass(FALSE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
//定义JAVA调用的服务
|
||||
//register service method
|
||||
int USERSERVICE_custom_register_methods(int* decision, va_list args)
|
||||
{
|
||||
|
||||
|
||||
int ifail = ITK_ok;
|
||||
int status = ITK_ok,
|
||||
numberOfArguments = 0,
|
||||
returnValueType = USERARG_STRING_TYPE,
|
||||
* argumentList = NULL;
|
||||
USER_function_t functionPtr;
|
||||
|
||||
//开旁路
|
||||
|
||||
numberOfArguments = 1;
|
||||
functionPtr = Connor_open_bypass;
|
||||
argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int));
|
||||
argumentList[0] = USERARG_STRING_TYPE;
|
||||
returnValueType = USERARG_VOID_TYPE;
|
||||
|
||||
ITKCALL(status = USERSERVICE_register_method("setbypass", functionPtr, numberOfArguments,
|
||||
argumentList, returnValueType));
|
||||
MEM_free(argumentList);
|
||||
if (status == ITK_ok)
|
||||
{
|
||||
fprintf(stdout, "\n Registering setbypass finished\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stdout, "\n Registering setbypass failed %d\n", status);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#ifndef REGISTER_HANDLER_METHODS
|
||||
#define REGISTER_HANDLER_METHODS
|
||||
|
||||
#include <epm/epm.h>
|
||||
#include <tccore/custom.h>
|
||||
#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);
|
||||
|
||||
int USERSERVICE_custom_register_handlers(int*, va_list);
|
||||
int USERSERVICE_custom_register_methods(int* decision, va_list args);
|
||||
|
||||
int POM_AM__set_application_bypass(logical bypass);
|
||||
int jy_create_material_code(EPM_action_message_t msg);
|
||||
int xy_assign_form_props(EPM_action_message_t msg);
|
||||
int ORIGIN_EPM_auto_signoff(EPM_action_message_t msg);
|
||||
int ORIGIN_EPM_check_and_signoff(EPM_action_message_t msg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by xy2.rc
|
||||
|
||||
// 新对象的下一组默认值
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
@ -0,0 +1,131 @@
|
||||
/**
|
||||
* @file string_helper.cpp
|
||||
* @brief string utility functions' implemention
|
||||
* @author James
|
||||
* @history
|
||||
* ===================================================================================
|
||||
* Date Name Description of Change
|
||||
* 09-July-2008 James
|
||||
*/
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
//#include <stdio.h>
|
||||
//#include <iostream>
|
||||
//#include <windows.h>
|
||||
//#include "stdafx.h"
|
||||
#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<string> &ans )
|
||||
{
|
||||
ans.clear();
|
||||
size_t index0 = 0;
|
||||
string one_arg;
|
||||
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<string> &ans )
|
||||
{
|
||||
ans.clear();
|
||||
size_t index0;
|
||||
string one_arg;
|
||||
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());}
|
||||
|
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @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 <string>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
//extern string loginUser;
|
||||
//extern string loginPassword;
|
||||
string TrimString( string strArg );
|
||||
void Split( string strArg, char spliter, vector<string> &ans );
|
||||
void Split( string strArg, string spliter, vector<string> &ans );
|
||||
void RemoveLiner( string &in, string &out );
|
||||
//string ws2s(wstring& inputws);
|
||||
//wstring s2ws(const string& s);
|
||||
|
||||
#endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\vc142.pdb
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\xy_create_material_code.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\string_helper.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\service_part_no.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\main_lib.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\jy_create_material_code.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\epm_auto_signoff_dataset.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\common_itk_util.obj
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\xy2.tlog\cl.command.1.tlog
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\xy2.tlog\cl.read.1.tlog
|
||||
d:\source\锡压\xy2\xy2\xy2\x64\release\xy2.tlog\cl.write.1.tlog
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>D:\source\锡压\xy2\xy2\x64\Release\xy2.dll</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionMFC=14.29.30136:TargetPlatformVersion=10.0.19041.0:
|
||||
Release|x64|D:\source\锡压\xy2\xy2\|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,60 @@
|
||||
// Microsoft Visual C++ 生成的资源脚本。
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 从 TEXTINCLUDE 2 资源生成。
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 中文(简体,中国) 资源
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 4, 2
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // 中文(简体,中国) 资源
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 从 TEXTINCLUDE 3 资源生成。
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // 不是 APSTUDIO_INVOKED
|
@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="common_itk_util.h" />
|
||||
<ClInclude Include="error_handling.h" />
|
||||
<ClInclude Include="itk_service_common.h" />
|
||||
<ClInclude Include="register_handler_head.h" />
|
||||
<ClInclude Include="register_handler_methods.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="string_helper.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="common_itk_util.cpp" />
|
||||
<ClCompile Include="epm_auto_signoff_dataset.cpp" />
|
||||
<ClCompile Include="jy_create_material_code.cpp" />
|
||||
<ClCompile Include="main_lib.cpp" />
|
||||
<ClCompile Include="register_handler_methods.cpp" />
|
||||
<ClCompile Include="service_part_no.cpp" />
|
||||
<ClCompile Include="string_helper.cpp" />
|
||||
<ClCompile Include="xy_create_material_code.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="xy2.rc" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{ea48841c-4b5f-4555-b8f9-4e2ce1ed35ef}</ProjectGuid>
|
||||
<RootNamespace>xy2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>
|
||||
</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>D:\WorkEnvironment\tc14ITK\include;D:\WorkEnvironment\tc14ITK\include_cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>D:\WorkEnvironment\tc14ITK\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>D:\WorkEnvironment\tc14ITK\lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>libuser_exits.ar.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="common">
|
||||
<UniqueIdentifier>{1c86beb0-ba33-4f2f-8c71-74ecb379da02}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="register_handler_methods.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="common_itk_util.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="error_handling.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="string_helper.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="itk_service_common.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="register_handler_head.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main_lib.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="register_handler_methods.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="epm_auto_signoff_dataset.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="jy_create_material_code.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="xy_create_material_code.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="common_itk_util.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="string_helper.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="service_part_no.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="xy2.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Loading…
Reference in new issue