OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dns_config_parser.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef __DNS_CONFIG_PARSER__
6 #define __DNS_CONFIG_PARSER__
7 
8 #include <list>
9 #include "base/util.h"
10 
11 class DB;
12 struct DBRequest;
13 namespace pugi {
14 class xml_node;
15 }
16 
17 // Convert an xml file into a set of IFMapTable requests.
19 public:
20  typedef std::list<DBRequest *> RequestList;
21 
22  explicit DnsConfigParser(DB *db);
23  bool Parse(const std::string &content);
24 
25 private:
26  bool ParseConfig(const pugi::xml_node &root, bool add_change,
27  RequestList *requests) const;
28 
29  DB *db_;
31 };
32 
33 #endif // __DNS_CONFIG_PARSER__
DISALLOW_COPY_AND_ASSIGN(DnsConfigParser)
Definition: db.h:24
std::list< DBRequest * > RequestList
bool ParseConfig(const pugi::xml_node &root, bool add_change, RequestList *requests) const
bool Parse(const std::string &content)