class project;
struct Location;
-#if 0
-namespace xml {
-
- template <typename T>
- struct element_traits {
- typedef T element_type;
-#ifdef XSD_WITH_BOOST
- typedef typename boost::shared_ptr<element_type> element_sptr;
-#elif defined(XSD_WITH_AEB)
- typedef typename aeb::shared_ptr<element_type> element_sptr;
-#else
- typedef typename std::shared_ptr<element_type> element_sptr;
-#endif
- typedef typename std::vector<element_sptr> element_sequence;
- };
- /// Usefulle template to create a static
- // array of all avaialable attributes for an element
- template <typename T>
- struct element_attributes {
- const char *m_Name;
- void (T::*m_Setter)(const std::string &_v);
- };
-
- template <typename T,bool ns>
- struct element {
- typedef typename element_traits<T>::element_type t_type;
- typedef typename element_traits<T>::element_sptr t_sptr;
- public:
- };
-
- template <typename T>
- struct element<T,true > {
- typedef typename element_traits<T>::element_type t_type;
- typedef typename element_traits<T>::element_sptr t_sptr;
- element(const t_sptr &s,const char *n) : m_content(s) ,m_name(n){};
- friend std::ostream & operator <<(std::ostream &os,const element &e)
- {
- os<<"<:"<<e.m_name;
- e.m_content->serialize_attributes(os);
- os<<">";
- os<<*(e.m_content);
- os<<"</:"<<e.m_name<<">";
- return os;
- };
- t_sptr m_content;
- const char *m_name;
- };
-
- template <typename T>
- struct element<T,false> {
- typedef typename element_traits<T>::element_type t_type;
- typedef typename element_traits<T>::element_sptr t_sptr;
- element(const t_sptr &s,const char *n) : m_content(s) ,m_name(n){};
- friend std::ostream & operator <<(std::ostream &os,const element &e)
- {
- os<<"<"<<e.m_name;
- e.m_content->serialize_attributes(os);
- os<<">";
- os<<*(e.m_content);
- os<<"<"<<e.m_name<<">";
- return os;
- };
- t_sptr m_content;
- const char *m_name;
- };
-
- } // end xml ns
-#endif
// Ok, lets define ant_element
struct Element
{