|
//
// EntityParse.h
//
// Copyright 2005 Paul Higinbotham
//
#ifndef __ENTITYPARSE_H_
#define __ENTITYPARSE_H_
#include "..\..\collections\String.h"
namespace ZGraphics
{
class NVPair;
class EntityParse
{
public:
EntityParse()
{
_initMembers();
}
EntityParse(char * pBuf, int nBufSize)
{
_initMembers();
assert(pBuf);
assert(nBufSize > -1);
m_pBuf = pBuf;
m_nBufSize = nBufSize;
}
~EntityParse() {}
int GetFirstEntity();
int GetNextEntity();
bool GetFirstNVPair(NVPair & rNV);
bool GetNextNVPair(NVPair & rNV);
private:
void _initMembers()
{
m_pBuf = 0;
m_nBufSize = 0;
m_nEntityIndex = 0;
m_nNVIndex = 0;
}
bool _getNextString(cString & rString);
private:
char * m_pBuf;
int m_nBufSize;
int m_nEntityIndex;
int m_nNVIndex;
//
static const char s_charOpenBracket;
static const char s_charCloseBracket;
static const char s_charQuote;
static const char s_charLF;
};
class NVPair
{
public:
NVPair() : m_ulNameTag(0) {}
~NVPair() {}
cString m_Name;
cString m_Value;
unsigned long m_ulNameTag;
};
} /* namespace ZGraphics */
#endif /* __ENTITYPARSE_H_ */
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a senior software developer currently doing contract work for Microsoft. My educational background is in electrical engineering and I hold a masters degree from the University of Washington. I have experience in hardware and systems design but have done primarily software development for the last two decades. I have worked for various small companies as well as start-up companies, and have worked as a full time employee SDE at Microsoft Corporation.