Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / XML_Utils / XSCRT / Writer.hpp
blob13c64d9b61b4f7ac74fe00d83bef5b7404f66fa5
1 // file : XSCRT/Writer.hpp
2 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
3 #ifndef XSCRT_WRITER_HPP
4 #define XSCRT_WRITER_HPP
6 #include <stack>
7 #include <string>
9 #include "ace/XML_Utils/XSCRT/XML.hpp"
11 namespace XSCRT
13 template <typename C>
14 class Writer
16 public:
17 Writer (XML::Element<C>& e)
18 : attr__ (0)
20 push_ (e);
23 protected:
24 // This c-tor should never be called.
26 Writer ()
28 abort ();
31 public:
32 void
33 push_ (XML::Element<C> const& e)
35 stack_.push (e);
38 void
39 pop_ ()
41 stack_.pop ();
44 XML::Element<C>&
45 top_ ()
47 return stack_.top ();
50 public:
51 XML::Attribute<C>*
52 attr_ ()
54 return attr__;
57 void
58 attr_ (XML::Attribute<C>* a)
60 attr__ = a;
63 private:
64 std::stack<XML::Element<C> > stack_;
66 XML::Attribute<C>* attr__;
68 private:
69 Writer (Writer const&);
71 void
72 operator= (Writer const&);
76 #endif // XSCRT_WRITER_HPP