Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
68
GameTools/Zallad3D SceneClass/SimpleParser.h
Normal file
68
GameTools/Zallad3D SceneClass/SimpleParser.h
Normal file
@@ -0,0 +1,68 @@
|
||||
// SimpleParser.h: interface for the CSimpleParser class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 2000. 1. 4 : CSimpleParser 일단 완성
|
||||
// 2000. 1. 8 : comment ( '// blah blah...' ) 지원
|
||||
// 2000. 1.11 : 괄호에 대한 토큰분리 지원( '()' '{}' '[]' '<>' )
|
||||
// 2000. 1.11 : 1문자 연산자에 대한 토큰분리 지원( '+' '-' ... 등등등-_-; )
|
||||
|
||||
#define SIMPLE_PARSER_MASK_STRING "Z_all_A_3D"
|
||||
|
||||
|
||||
#if !defined(AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_)
|
||||
#define AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class CSimpleParser
|
||||
{
|
||||
public:
|
||||
CSimpleParser();
|
||||
virtual ~CSimpleParser();
|
||||
|
||||
bool Reset();
|
||||
bool OpenFile( const char* szFileName, const char* szMaskString = SIMPLE_PARSER_MASK_STRING );
|
||||
|
||||
int ReadLine(); // returns # of tokens read
|
||||
char* GetToken( int n );
|
||||
int GetTokenNum();
|
||||
int GetLineNum();
|
||||
char* GetFileName();
|
||||
void Close()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
char* GetNextToken(); // line과 무관하게 token 순서대로 출력
|
||||
|
||||
int GetChrFromFile(); // decrypting read 를 위해 fgetc를 대체하는 함수
|
||||
|
||||
|
||||
protected:
|
||||
char* m_szMaskString;
|
||||
long m_lMaskLen;
|
||||
long m_lPointerInMask;
|
||||
|
||||
char* m_szFileName;
|
||||
FILE* m_pFile;
|
||||
//long m_lTokenCount;
|
||||
long m_lLineCount;
|
||||
|
||||
long m_lTokenInLine; // used for GetNextToken()
|
||||
|
||||
std::vector<char*> m_vec_szTokens;
|
||||
|
||||
std::vector<char> m_vec_szTmpLine;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_)
|
||||
Reference in New Issue
Block a user