libiqxmlrpc  0.12.4
 All Classes Namespaces Files Functions Typedefs Enumerations
value_parser.h
1 // Libiqxmlrpc - an object-oriented XML-RPC solution.
2 // Copyright (C) 2011 Anton Dedov
3 
4 #ifndef _iqxmlrpc_value_parser_h_
5 #define _iqxmlrpc_value_parser_h_
6 
7 #include "parser2.h"
8 #include "value.h"
9 
10 namespace iqxmlrpc {
11 
13 public:
14  ValueBuilderBase(Parser& parser, bool expect_text = false);
15 
16  Value_type*
17  result()
18  {
19  return retval.release();
20  }
21 
22 protected:
23  std::auto_ptr<Value_type> retval;
24 };
25 
27 public:
28  ValueBuilder(Parser& parser);
29 
30 private:
31  virtual void
32  do_visit_element(const std::string&);
33 
34  virtual void
35  do_visit_element_end(const std::string&);
36 
37  virtual void
38  do_visit_text(const std::string&);
39 
40  StateMachine state_;
41 };
42 
43 } // namespace iqxmlrpc
44 
45 #endif
46 // vim:sw=2:ts=2:et: