// TextLineParser.h: interface for the CTextLineParser class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TEXTLINEPARSER_H__5543D106_A45E_11D3_AF30_5CBB68000000__INCLUDED_)
#define AFX_TEXTLINEPARSER_H__5543D106_A45E_11D3_AF30_5CBB68000000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

enum TLP_FORMAT {TLP_INT, TLP_ZSTR, TLP_DOUBLE};

struct TLP_TYPE1
{
	int		nParam1;
	int		nParam2;
	char*	szParam3;
};

class CTextLineParser  
{
	TLP_FORMAT*		m_pFormat;
	int				m_nFormatSize;
	char			m_cDelimiter;

public:
	CTextLineParser();
	~CTextLineParser();

	void SetFormat(TLP_FORMAT* pFormat, int nFormatSize, char cDelimiter);
	bool ParseTextLine(char** pszText, void* pStruct);
	void SetParam(int nParam, BYTE*& pStructField, char* p);

#ifdef _DEBUG
	BOOL CheckStruct(void* pStruct);
#endif
};

#endif // !defined(AFX_TEXTLINEPARSER_H__5543D106_A45E_11D3_AF30_5CBB68000000__INCLUDED_)
