📄 steelcutrun.h
字号:
// SteelCut1.h: interface for the CSteelCut class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_STEELCUT1_H__799FF204_5C74_4F3E_8600_13C3396F642C__INCLUDED_)
#define AFX_STEELCUT1_H__799FF204_5C74_4F3E_8600_13C3396F642C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/* Store product and raw materials chain. */
typedef struct list
{
int len;
int num;
struct list *next;
}ST;
/* Store cutting way chain. */
typedef struct rlist
{
int len;
int num;
int times;
struct rlist *next;
}RST;
class CSteelCut
{
public:
CSteelCut();
virtual ~CSteelCut();
void Run();
private:
/*!
Stroe the cutted count of product,
if the count is more than plan then
go to next product
*/
int m_Rawtotallen;
int m_Wastelen;
int cn ;
int m_MillLen;
bool m_Flag;
/* Add product list*/
ST *tmpP;
ST *headP;
/* Add Raw list*/
ST *tmpR;
ST *headR;
/*! Store the path of output file*/
char Path[255];
FILE *fp ;
char m_COMBO[5][1024];
char m_EDIT_MC[5][1024];
char m_IDC[4][1024];
char m_EDIT_PL[5][1024];
char m_EDIT_PC[5][1024];
private:
/*! Add Product to product chain*/
ST *AddProduct(int pLen, int pNum, bool pSortFlag);
/*! Create product chain and sort by product length*/
ST *InitProduct();
/*! Create Raw chain */
ST *InitRaw();
/*! Search for suitable product ,pRawLen is remainder length */
RST *Rselect(ST *h, int pRawLen, int pMillLen);
/*! Print title of cutting way*/
void PrintProTitle();
/*! output a result*/
ST *Hregulate(ST *h,RST *rstWay, ST *Raw);
/*! Set rename path*/
void GetrenamePath(char *p);
/*! Set output file path*/
void SetPath();
/*! Write into target file*/
void WriteInfo(char *p);
/*! Get time for path*/
void GetDate(char *pdate);
/*! Search for the best way of cutting and output*/
void Product(ST *Prod, ST *pRaw, int pMillLen);
/*! Print Raw information*/
void PrintRowInfo(ST *pstRaw);
/*! Print total waste rate*/
void PrintTotalRate();
};
#endif // !defined(AFX_STEELCUT1_H__799FF204_5C74_4F3E_8600_13C3396F642C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -