|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 2012 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or (at 00008 // your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License along 00016 // with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef LIBAEGIS_XML_NODE_ISO_3166_H 00020 #define LIBAEGIS_XML_NODE_ISO_3166_H 00021 00022 #include <common/config.h> 00023 #include <map> 00024 00025 #include <common/nstring.h> 00026 #include <libaegis/xml_node.h> 00027 00033 class xml_node_iso_3166: 00034 public xml_node 00035 { 00036 public: 00040 virtual ~xml_node_iso_3166(); 00041 00045 xml_node_iso_3166(); 00046 00052 bool need_setup(void); 00053 00063 bool is_a_valid_code(const nstring &code_name) const; 00064 00065 protected: 00066 // See base class for documentation. 00067 void element_begin(const nstring &name); 00068 00069 // See base class for documentation. 00070 void attribute(const nstring &name, const nstring &value); 00071 00072 // See base class for documentation. 00073 void element_end(const nstring &name); 00074 00075 private: 00076 typedef std::map<nstring, nstring> codes_t; 00077 00082 codes_t codes; 00083 00089 nstring alpha_2_code; 00090 00096 nstring alpha_3_code; 00097 00107 void assign(const nstring &key, const nstring &value); 00108 00112 xml_node_iso_3166(const xml_node_iso_3166 &); 00113 00117 xml_node_iso_3166 &operator=(const xml_node_iso_3166 &); 00118 }; 00119 00120 // vim: set ts=8 sw=4 et : 00121 #endif // LIBAEGIS_XML_NODE_ISO_3166_H
1.7.6.1