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.
mitlib.pub/MITLIB/Utility/TrivialCsvParser.h

42 lines
1.2 KiB
C++

// 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_)