00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __XMLSINK_H__
00025 #define __XMLSINK_H__
00026
00027 #include "common.h"
00028 #include "exprTree.h"
00029 #include <vector>
00030 #include <utility>
00031 #include <string>
00032
00033 BEGIN_NAMESPACE( classad )
00034
00035
00036 class ClassAdXMLUnParser
00037 {
00038 public:
00040 ClassAdXMLUnParser( );
00041
00043 virtual ~ClassAdXMLUnParser( );
00044
00046 void SetCompactSpacing(bool use_compact_spacing);
00047
00052 void Unparse(std::string &buffer, ExprTree *expr);
00053
00054 private:
00059 void Unparse(std::string &buffer, ExprTree *expr, int indent);
00060
00061 void Unparse(std::string &buffer, Value &val, int indent);
00062 virtual void UnparseAux(std::string &buffer,
00063 std::vector< std::pair< std::string, ExprTree*> >& attrlist,
00064 int indent);
00065 virtual void UnparseAux(std::string &buffer, std::vector<ExprTree*>&,
00066 int indent);
00067
00068 bool compact_spacing;
00069
00070 };
00071
00072
00073 END_NAMESPACE
00074
00075 #endif