/*------------------------------------------------------------------------------*
 *	File Name: 	outils.h														*
 *	Purpose:	OC-string utility functions										*
 *	Author:		TD																*
 *  Date:		2-24-05 														*
 *  Copyright OriginLab Corp. 2000-2005											*
 *																				*
 *	Modification Log															*
 *	DSC 3/4/05  MOVE_OC_THEME_FUNCTIONS_TO_VC									*
 *	ML 3/16/2005 QA70-7498 NEW_GROBJ_BASED_X_VARIABLE_TYPES						*
 *	DSC 3/24/05 CHECK_NEW_FILE													*
 *	RVD 4/15/2005 QA70-7597 v8.0223 MARKER_GROBJ								*
 *	ML 4/18/2005 XFUNCTION_TREE_MANIPULATION_IN_VC								*
 *	ML 4/28/2005 XFT_GETTING_IO													*
 *	ML 5/9/2005 RETURNING_VALUE_FROM_XFUNCTION									*
 *	RVD 5/9/2005 VOID_BAD_IDEA_MINUS_ONE_IS_ERROR								*
 *	ML 5/3/2005 QA70-7686 X_FUNCTIONS_DRIVEN_MENU_CUSTOMIZATION					*
 *	YuI 05/11/05 XFUNCTION_ORIGINOBJECT_XVARIABLE								*
 *	ML 5/17/2005 QA70-7686 X_FUNCTION_DRIVEN_MENUS_WITH_TREE					*
 *	DSC 5//23/05 MOVE_GET_CLASS_SETTINGS_TO_VC									*
 *	ML 6/1/2005 STYLE_LINKS_WITH_OFFSETS										*
 *	DSC 6/27/05	CONSTRUCT_THEME_FILE_FROM_COMPOSITE_NAME						*
 *	DSC 6/28/05 QA70-7841 CLASS_PATH_IN_REGISTRY								*
 *	DSC 7/7/2005 QA70-7877 COMPOSITE_NAME_DISPLAY_OPTION						*
 *	ML 7/18/2005 FIND_FILE_RETURN_VALUE											*
 *	DSC 8/17/05 FAST_XF_LIST_MATCHING_START_STRING								*
 *	SY 08/23/2005 QA70-8040 v8.0293 SWITCHES_PROCESSING_FUNCTION				*
 *	YuI 08/29/05 QA70-7921 FILE_IMPORTING_XFUCNTIONS							*
 *	DSC 8/31/05 FIND_GRAPHIC_OBJECT_X_FUNCTIONS									*
 *	CPY 9/14/05 QA70-8097 XF_REPORTING_AS_TREE_VAR								*
 *	YuI 09/19/05 QA70-8119 SUPPORT_FOR_OUTPUT_TO_BE_SAME_AS_INPUT				*
 *	DSC 9/13/05 TREE_COUNT_ITEMS_TO_VC											*
 *	DSC 9/21/05 QA70-8131 FIND_MATCHING_STRINGS_IN_ARRAY						*
 *	ML 10/5/2005 QA70-8157 SPECIAL_NAMES_STYLES_IN_FLAT_SHEETS					*
 *	EJP 2005-10-14 v8.0317 QA70-8166 XML_REPLACEMENT_FOR_OPK					*
 *	DSC 10/11/2005 QA70-8167 FIND_FILES_GET_VERSION_OR_DATE						*
 *	DSC 10/11/2005 QA70-8167 FIND_FILES_FROM_SPECIFIED_LOCATION					*
 *	DSC 10/18/05 QA70-8167 CONSTRUCT_XF_FDF_TREE_FOR_UPDATE						*
 *	YuI 10/10/05 QA70-8158 GENERAL_X_STRING_CONVENTION_TO_ACCESS_OBJECTS		*
 *	DSC 10/25/05 QA70-8218 REGISTER_COM_SERVER									*
 *	CPY 10/26/05 SEPARATE_OUT_CONST_INTO_OC_SYS_H								*
 *	ML 11/1/2005 QA70-8254 INVOKING_OPERATION_FROM_XFUNCTION					*
 *	DSC ML 11/23/05 8.0341 QA70-8362 MAKE_UID_FOR_PFM_PEAK						*
 *  SY 01/05/2006 QA80-8451 v8.0354 OC_READ_WRITE_OGS_LIKE_FILE_SECTION			*
 *	ML 1/13/2006 XVARIABLEBASE_TO_VC											*
 *	DSC 1/24/06 QA70-7635 NEW_NAME_OKUTIL_FIND_FILES_FROM_MAP					*
 *	ML 1/13/2006 XVARIABLEBASE_TO_VC											*
 *	DSC 1/23/06 QA70-7635 NEW_FILE_TYPE_EXTERNDATA_ODS_OQS						*
 *  SY 02/01/2006 QA70-8498 v8.0364 TEMPLATE_INFO_INTERNAL_ACCESS				*
 *	DSC 2/3/06 CLEANUP_XFT_LOAD													*
 *	EJP 2006-02-16 v8.0366 MOVE_IMPORT_FILE_INFO_FROM_OC_TO_VC					*
 *	DSC 2/23/06 8.50369 QA70-8462 ADD_ORIGIN_PATH_CUSTOM						*
 *	DSC 3/1/06 v8.0371 FF_FILTER_XF_BY_ARGUMENT_INFO							*
 *	DSC 3/6/06 MAKE_TREE_FROM_MAP												*
 *	DSC 3/15/06	QA70-7540 FIND_SAME_NAMED_FILES_PER_PATH						*
 *	DSC 3/23/06 QA70-8586 CUSTOM_OGS_FILES										*
 *	DSC 4/5/06 ADD_FILE_SIZE_TO_MAP												*
 *------------------------------------------------------------------------------*/



#ifndef _STRING_UTILS2_H_
#define _STRING_UTILS2_H_ 

#ifdef __AFX_H__
	#ifndef OKUTIL_AS_EXTDLL
		#pragma message("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$we are NOT in okutil, but some other DLL")
	#else
		#pragma message("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$we are in okutil")
	#endif

	#define OC_API			OKUTIL_EXPORT_IMPORT
	#define	string			CString
	#define	StringArray		CScriptMocaObject
	/// ML 5/3/2005 QA70-7686 X_FUNCTIONS_DRIVEN_MENU_CUSTOMIZATION
	#define	IntArray		CScriptMocaObject
	/// end X_FUNCTIONS_DRIVEN_MENU_CUSTOMIZATION
	/// ML 4/18/2005 XFUNCTION_TREE_MANIPULATION_IN_VC
	#define TreeNode		OCXmlWrapperBase
	/// end XFUNCTION_TREE_MANIPULATION_IN_VC
	/// TD 9-12-05 QA70-7403 CODEBUILDER_XFN_INTERACTION_TO_VC
	#define	PointArray		CScriptMocaObject
	/// end CODEBUILDER_XFN_INTERACTION_TO_VC

	#define DoubleArray		CScriptMocaObject
//CPY 10/26/05 SEPARATE_OUT_CONST_INTO_OC_SYS_H
//	#define _LOCALIZED(x)	(x)
	extern "C" {
		#pragma message("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$extern C in outils.h")
#else
	#define OC_API
	/// TD 9-12-05 QA70-7403 CODEBUILDER_XFN_INTERACTION_TO_VC
	#define	PointArray		vector<point>
	/// end CODEBUILDER_XFN_INTERACTION_TO_VC
	/// ML 5/3/2005 QA70-7686 X_FUNCTIONS_DRIVEN_MENU_CUSTOMIZATION
	#define	IntArray	vector<int>
	/// end X_FUNCTIONS_DRIVEN_MENU_CUSTOMIZATION

	#define DoubleArray vector<double>

//CPY 10/26/05 SEPARATE_OUT_CONST_INTO_OC_SYS_H
//	#define _LOCALIZED(x)	_L(x)
	#pragma dll(okUtil80)	// Associate all functions below to okUtil80.dll which must be in the Origin EXE folder
#endif	//__AFX_H__



/** >Character/String Manipulation
		Reverse of atof with LabTalk formatting options
	Parameters:
		dVal = double value to convert
		lpcszFmt = LabTalk formatting string, default (NULL) will use "*", "" will use @SD significant digits
	Return:
		formatted string
	Example1:
	int ftoa_ex1()
	{
		double aa = PI;
		out_str(ftoa(aa));// default as "*", controlled by internal Origin preference settings
		out_str(ftoa(aa, "*3"));// show as 3 significant digits		
		return 0;
	}
*/
//OC_API string ftoa(double dVal, LPCSTR lpcszFmt = NULL);

//OC_API int okutil_convert_double_vector_to_string_vector(CArray<double, double>& vd, CStringArray &vs, UINT nSize, CStringArray &vsFormat );

//OC_API string okutil_str_pad_char(LPCSTR lpcstr, int nTotalLength, int nPaddingFormat, char chPading = ' ' );

#ifdef __AFX_H__
	}
#endif	//__AFX_H__

#endif //_STRING_UTILS_H_
