#include <origin.h>
#include <GetNBox.h>
#include <xfutils.h>
enum{
	method_lm,
	method_s,
};
//put additional include files here
#include <operation.h>
/// Hong 01/22/08 QA80-10929 LTNL_ACCESS_FITSESSION_PONTER
#ifdef _FOR_SMART_LOADING_ONLY
#include <..\originlab\nlsf_utils.h>
#include <xfgraph_utils.h> /// Hong 12/01/08 NL_LT_XFS_ALLOW_DASH_H_SEPARATELY
#include <..\originlab\wksOperation.h>
#include <stats_utils.h>
#include <..\originlab\stats_guis.h>
#include <event_utils.h>
#include <report_utils.h>
#include <..\originlab\graph_utils.h>
#include <..\originlab\stats_operations.h>
#include <..\originlab\StatsOpBase.h>
#include <FitterOperation.h>
#include <..\originlab\FitNL.h> /// end NL_LT_XFS_ALLOW_DASH_H_SEPARATELY
#endif
/// end LTNL_ACCESS_FITSESSION_PONTER
#include <..\originlab\op_utils.h>
///===================end of include headers=============================

///////////////////////////////////////////////////////////////////////
//////// modification log
/// Hong 11/04/08 v8.0965b NLLT_NO_NEED_CHECK_ITERATE_RESULT
/// Hong 12/01/08 NL_LT_XFS_ALLOW_DASH_H_SEPARATELY
///////////////////////////////////////////////////////////////////////

//put your own support static functions here



void nlfit(const int& n, const int& method)
{
	/// Hong 11/04/08 v8.0965b NLLT_NO_NEED_CHECK_ITERATE_RESULT
	//if ( lt_nlf_iterate(n, method) )
	//	XF_THROW(XFERR_NO_CREATED_NLFIT_OBJ);		
	int			nRet = lt_nlf_iterate(n, method);
	if ( OP_NOERROR != nRet )
		XF_THROW( cvt_op_err_to_nlf_xf_err(nRet) );
	/// end NLLT_NO_NEED_CHECK_ITERATE_RESULT
}

//nGetNDialog = 0,1,2, corresponding to the XF GetN dropdown, 0 = dialog is not used
//you can change nRet to be one of XFEVT_PROCEED (defualt), XFEVT_ABORT, XFEVT_PROCEED_NO_DLG or XFEVT_PROCEED_WITH_DLG(when nGetNDialog = 0)
//nGetNDialog = -1 when Ok on GetN dialog to allow handler to preocess <auto> etc variables
//dwCntrl is combination of bits
//LTXF_FROM_GUI_MENU, LTXF_FROM_GUI_PROMPT, LTXF_FROM_AUTO_UPDATE, LTXF_FROM_FUNCTION, LTXF_THEME_USED, LTXF_CHANGE_PARAM
void nlfit_before_execute(TreeNode& trGetN, int nGetNDialog, int& nRet, int dwCntrl)
{

}
