DragonNest/Server/ServiceManager/csvreader.h
2024-12-19 09:48:26 +08:00

27 lines
1,018 B
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#pragma once
#include <tchar.h>
class CCSVReader
{
public :
CCSVReader();
~CCSVReader();
bool Load(const TCHAR *fname);
int CountLine() { return m_iLine; }
int GetData(int col, int row, TCHAR * outptr, int outlen) ;
int Scan(int col, int row, TCHAR * form, ...);
private :
TCHAR * m_pBuffer;
int * m_pOffset;
int m_iLine;
int CountLine(const TCHAR *buffer, int * offset);
int PassToken(const TCHAR *str);
void Clear();
TCHAR * ReadFile(const TCHAR *fname);
} ;