// MyString.h: interface for the CMyString class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TRIVIAL_CSV_PARSER_H__537F8841_1127_436C_8AB8_FEADB9FA2091__INCLUDED_)
#define AFX_TRIVIAL_CSV_PARSER_H__537F8841_1127_436C_8AB8_FEADB9FA2091__INCLUDED_

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

#ifdef  BUILD_UTILITYDLL
#define     UTILITYDLL  __declspec(dllexport)
#else
#define     UTILITYDLL  __declspec(dllimport)
#endif

#define MAX_PARSE_PARM       64
#define MAX_TOK_LENGTH       15
#define MAX_PARSE_STRING_LEN 256

class UTILITYDLL CTrivialCsvParser
{
public:
    CTrivialCsvParser();
    CTrivialCsvParser(char* tok, int nparm);

    ~CTrivialCsvParser();
    bool SetToken(char * tok);
    bool SetMaxParm(int maxParm);

    int Parse(char* inStr,  char** parmList, char* tok, int maxParmExp, bool keepInputStrUnchanged);
    int Parse(char* inStr,  char** parmList, int numParm);
    int Parse(char* inStr,  char** parmList);
private:
    char buf[MAX_PARSE_STRING_LEN];
    char mTok[MAX_TOK_LENGTH + 1];
    int  m_iParam;
};

#endif // !defined(AFX_TRIVIAL_CSV_PARSER_H__537F8841_1127_436C_8AB8_FEADB9FA2091__INCLUDED_)
