xml-copy-editor-code/src/xmlwordcount.h

27 lines
512 B
C
Raw Normal View History

2007-09-07 23:17:30 +02:00
#ifndef XML_WORD_COUNT_H
#define XML_WORD_COUNT_H
#include <string>
#include "wrapexpat.h"
struct WordCountData : public ParserData
{
2007-09-08 00:25:30 +02:00
std::string buffer;
size_t wordCount;
2007-09-07 23:17:30 +02:00
};
class XmlWordCount : public WrapExpat
{
2007-09-08 00:25:30 +02:00
public:
2007-09-07 23:17:30 +02:00
XmlWordCount();
virtual ~XmlWordCount();
2007-09-08 00:25:30 +02:00
2007-09-07 23:17:30 +02:00
int getWordCount();
2007-09-08 00:25:30 +02:00
private:
2007-09-07 23:17:30 +02:00
std::auto_ptr<WordCountData> wcd;
2007-09-08 00:25:30 +02:00
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
static void XMLCALL end ( void *data, const XML_Char *el );
2007-09-07 23:17:30 +02:00
};
2007-09-08 00:25:30 +02:00
2007-09-07 23:17:30 +02:00
#endif