CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Parser.h
1 // Parser.h: interface for the Parser class.
2 //
5 
6 #if !defined(PARSER_H_INCLUDED)
7 #define PARSER_H_INCLUDED
8 
9 #pragma once
10 
11 #define ALLOC_SIZE 32768 * 16
12 
13 #include <string>
14 
15 namespace Larson
16 {
18  class Parser
19  {
20  public:
23  Parser(std::wstring inputFile);
24  ~Parser(void);
25 
27 
33  long getNextElement(CGMI_DS *pCgmi_ds, long *klass, long *element, long *count);
34 
35  long m_error;
41  FILE* m_fid;
42 
43  protected:
44  long ctxGetNextElement(CGMI_DS *pCgmi_ds, long *klass, long *elem, long *count);
45 
46  unsigned char* m_databuf;
47  long m_databuflen;
48 
49  unsigned char m_ctxBuf[512];// clear text decoder read buffer
50  long m_ctxIndex; // clear text decoder read buffer index
51  long m_bytesInCtxBuf;
52 
53  };
54 };
55 #endif
long getNextElement(CGMI_DS *pCgmi_ds, long *klass, long *element, long *count)
get next CGM element
Definition: Parser.cpp:149
long m_startBytePos
starting byte position of last parsed element
Definition: Parser.h:37
Parser – CGM input element parser.
Definition: Parser.h:18
FILE * m_fid
CGM input file handle.
Definition: Parser.h:41
decoder data stream structure
Definition: CgmDecode.h:74
long m_endBytePos
ending byte position of last parsed element
Definition: Parser.h:39
Parser(std::wstring inputFile)
Definition: Parser.cpp:37