EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EncodeGenerator.h
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Zhur
24 */
25 
26 #ifndef __ENCODEGENERATOR_H_INCL__
27 #define __ENCODEGENERATOR_H_INCL__
28 
29 #include "Generator.h"
30 
32 : public Generator
33 {
34 public:
35  ClassEncodeGenerator( FILE* outputFile = NULL );
36 
37 protected:
38  const char* top() const { return mVariableStack.top().c_str(); }
39  void pop() { mVariableStack.pop(); }
40  void push(const char *v) { mVariableStack.push( v ); }
41  void clear() { while( !mVariableStack.empty() ) pop(); }
42 
43  bool ProcessElementDef( const TiXmlElement* field );
44  bool ProcessElement( const TiXmlElement* field );
45  bool ProcessElementPtr( const TiXmlElement* field );
46 
47  bool ProcessRaw( const TiXmlElement* field );
48  bool ProcessInt( const TiXmlElement* field );
49  bool ProcessLong( const TiXmlElement* field );
50  bool ProcessReal( const TiXmlElement* field );
51  bool ProcessBool( const TiXmlElement* field );
52  bool ProcessNone( const TiXmlElement* field );
53  bool ProcessBuffer( const TiXmlElement* field );
54 
55  bool ProcessString( const TiXmlElement* field );
56  bool ProcessStringInline( const TiXmlElement* field );
57  bool ProcessWString( const TiXmlElement* field );
58  bool ProcessWStringInline( const TiXmlElement* field );
59  bool ProcessToken( const TiXmlElement* field );
60  bool ProcessTokenInline( const TiXmlElement* field );
61 
62  bool ProcessObject( const TiXmlElement* field );
63  bool ProcessObjectInline( const TiXmlElement* field );
64  bool ProcessObjectEx( const TiXmlElement* field );
65 
66  bool ProcessTuple( const TiXmlElement* field );
67  bool ProcessTupleInline( const TiXmlElement* field );
68  bool ProcessList( const TiXmlElement* field );
69  bool ProcessListInline( const TiXmlElement* field );
70  bool ProcessListInt( const TiXmlElement* field );
71  bool ProcessListLong( const TiXmlElement* field );
72  bool ProcessListStr( const TiXmlElement* field );
73  bool ProcessDict( const TiXmlElement* field );
74  bool ProcessDictInline( const TiXmlElement* field );
75  bool ProcessDictRaw( const TiXmlElement* field );
76  bool ProcessDictInt( const TiXmlElement* field );
77  bool ProcessDictStr( const TiXmlElement* field );
78 
79  bool ProcessSubStreamInline( const TiXmlElement* field );
80  bool ProcessSubStructInline( const TiXmlElement* field );
81 
82 private:
84  std::stack<std::string> mVariableStack;
85  const char* mName;
86 };
87 
88 
89 #endif
const char * top() const
bool ProcessObject(const TiXmlElement *field)
void push(const char *v)
bool ProcessToken(const TiXmlElement *field)
bool ProcessTupleInline(const TiXmlElement *field)
bool ProcessListInt(const TiXmlElement *field)
bool ProcessWStringInline(const TiXmlElement *field)
bool ProcessDictInt(const TiXmlElement *field)
bool ProcessElementPtr(const TiXmlElement *field)
bool ProcessRaw(const TiXmlElement *field)
bool ProcessStringInline(const TiXmlElement *field)
bool ProcessSubStructInline(const TiXmlElement *field)
bool ProcessDictInline(const TiXmlElement *field)
bool ProcessListLong(const TiXmlElement *field)
bool ProcessInt(const TiXmlElement *field)
std::stack< std::string > mVariableStack
bool ProcessReal(const TiXmlElement *field)
bool ProcessTuple(const TiXmlElement *field)
bool ProcessListInline(const TiXmlElement *field)
bool ProcessList(const TiXmlElement *field)
bool ProcessTokenInline(const TiXmlElement *field)
bool ProcessObjectInline(const TiXmlElement *field)
bool ProcessListStr(const TiXmlElement *field)
bool ProcessString(const TiXmlElement *field)
unsigned __int32 uint32
Definition: eve-compat.h:50
bool ProcessDictStr(const TiXmlElement *field)
ClassEncodeGenerator(FILE *outputFile=NULL)
Generic class for eve-xmlpktgen's generators.
Definition: Generator.h:37
bool ProcessLong(const TiXmlElement *field)
bool ProcessDictRaw(const TiXmlElement *field)
bool ProcessWString(const TiXmlElement *field)
bool ProcessElement(const TiXmlElement *field)
bool ProcessElementDef(const TiXmlElement *field)
bool ProcessNone(const TiXmlElement *field)
bool ProcessSubStreamInline(const TiXmlElement *field)
bool ProcessObjectEx(const TiXmlElement *field)
bool ProcessBool(const TiXmlElement *field)
bool ProcessDict(const TiXmlElement *field)
bool ProcessBuffer(const TiXmlElement *field)