EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PyXMLGenerator.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, mmcs
24 */
25 
26 #ifndef __PYXMLGENERATOR_H_INCL__
27 #define __PYXMLGENERATOR_H_INCL__
28 
29 #include "python/PyVisitor.h"
30 
32 : public PyPfxVisitor
33 {
34 public:
35  PyXMLGenerator( FILE* into, const char* pfx = "" );
36 
37 protected:
39  bool VisitInteger( const PyInt* rep );
40  bool VisitLong( const PyLong* rep );
41  bool VisitReal( const PyFloat* rep );
42  bool VisitBoolean( const PyBool* rep );
43  bool VisitNone( const PyNone* rep );
44  bool VisitBuffer( const PyBuffer* rep );
45  bool VisitString( const PyString* rep );
46 
48  bool VisitPackedRow( const PyPackedRow* rep );
49 
51  bool VisitObject( const PyObject* rep );
52  bool VisitObjectEx( const PyObjectEx* rep );
53 
54  bool VisitSubStruct( const PySubStruct* rep );
55  bool VisitSubStream( const PySubStream* rep );
56  bool VisitChecksumedStream( const PyChecksumedStream* rep );
57 
58  bool VisitDict( const PyDict* rep );
59  bool VisitList( const PyList* rep );
60  bool VisitTuple( const PyTuple* rep );
61 
62 private:
63  FILE* const mInto;
65 };
66 
67 #endif
bool VisitChecksumedStream(const PyChecksumedStream *rep)
bool VisitInteger(const PyInt *rep)
primitive data visitors
Python string.
Definition: PyRep.h:430
bool VisitObject(const PyObject *rep)
Object type visitor.
Python's dictionary.
Definition: PyRep.h:719
bool VisitDict(const PyDict *rep)
bool VisitBoolean(const PyBool *rep)
bool VisitList(const PyList *rep)
bool VisitSubStruct(const PySubStruct *rep)
wrapper types Visitor
bool VisitNone(const PyNone *rep)
FILE *const mInto
Python floating point number.
Definition: PyRep.h:292
bool VisitReal(const PyFloat *rep)
Python tuple.
Definition: PyRep.h:567
Python boolean.
Definition: PyRep.h:323
bool VisitBuffer(const PyBuffer *rep)
Python extended object.
Definition: PyRep.h:861
Python object.
Definition: PyRep.h:826
Python's "none".
Definition: PyRep.h:352
bool VisitString(const PyString *rep)
Python integer.
Definition: PyRep.h:231
unsigned __int32 uint32
Definition: eve-compat.h:50
bool VisitPackedRow(const PyPackedRow *rep)
PackedRow type visitor.
bool VisitObjectEx(const PyObjectEx *rep)
bool VisitSubStream(const PySubStream *rep)
Python buffer.
Definition: PyRep.h:382
Packed row.
Definition: PyRep.h:961
bool VisitLong(const PyLong *rep)
PyXMLGenerator(FILE *into, const char *pfx="")
Python list.
Definition: PyRep.h:639
Python long integer.
Definition: PyRep.h:261
bool VisitTuple(const PyTuple *rep)
the nested types Visitor