You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/Module/GeoSigmaDraw/InterfaceCloseCurve.cpp

41 lines
941 B
C++

#include "stdafx.h"
#include "SigmaView.h"
#include "SectionDoc.h"
#include "ItemCurveProcess.h"
static CItemCurveProcess * GetItemCloseCurveFromView(CSigmaView * pView)
{
if (pView == NULL)
return 0;
CItem * item = pView->GetItem();
if (item == NULL)
return 0;
CItemCurveProcess * itemCurveProcess = dynamic_cast<CItemCurveProcess *>(item);
if (itemCurveProcess == NULL)
return 0;
return itemCurveProcess;
}
extern "C" __declspec(dllexport)
int ItemCurveProcess_SetType(CSigmaView* pView, int type)
{
CItemCurveProcess * itemCurveProcess = GetItemCloseCurveFromView(pView);
if (itemCurveProcess == NULL)
return -1;
return itemCurveProcess->SetProcessIdea(type);
}
extern "C" __declspec(dllexport)
int ItemCurveProcess_GetResult(CSigmaView* pView)
{
CItemCurveProcess * itemCurveProcess = GetItemCloseCurveFromView(pView);
if (itemCurveProcess == NULL)
return -1;
return itemCurveProcess->GetProcessResult();
}