Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 8bc6759a6f32712e5bc0cdfb80b23784 > files > 3523

boost-examples-1.60.0-6.mga6.noarch.rpm

//  Copyright (c) 2005 Carl Barron. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef SIMPLE_XML_TAG_H
#define SIMPLE_XML_TAG_H

#include <boost/variant.hpp>
#include <list>
#include <map>
#include <string>

struct tag
{
    std::string id;
    std::map<std::string,std::string> attributes;
    typedef boost::variant<
        std::string,
        boost::recursive_wrapper<tag>
        >
    variant_type;
    std::list<variant_type> children;
};


struct walk_data
{
    typedef void result_type;
    void operator () (const std::string &x);
    void operator () (const tag &t);
};

#endif