summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2004-09-28 16:36:36 +0000
committerbala <balanatarajan@users.noreply.github.com>2004-09-28 16:36:36 +0000
commitc3d9a94fe43bbae423f688f6fca602c880f74c14 (patch)
tree243bca87766c2d5d08ddd02aed73d607c863ac89
parentab09d45b33d24a0697a14cc9fea59f851dd8caca (diff)
downloadATCD-c3d9a94fe43bbae423f688f6fca602c880f74c14.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/XSCRT/Writer.hpp81
1 files changed, 81 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/XSCRT/Writer.hpp b/TAO/CIAO/DAnCE/Config_Handlers/XSCRT/Writer.hpp
new file mode 100644
index 00000000000..c3610209976
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/XSCRT/Writer.hpp
@@ -0,0 +1,81 @@
+// file : XSCRT/Writer.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef XSCRT_WRITER_HPP
+#define XSCRT_WRITER_HPP
+
+#include <stack>
+#include <string>
+
+#include <XSCRT/Parser.hpp> //@@ for XML stuff
+
+namespace XSCRT
+{
+ template <typename C>
+ class Writer
+ {
+ public:
+ Writer (XML::Element<C>& e)
+ : attr__ (0)
+ {
+ push_ (e);
+ }
+
+ protected:
+ // This c-tor should never be called.
+ //
+ Writer ()
+ {
+ abort ();
+ }
+
+ public:
+ void
+ push_ (XML::Element<C> const& e)
+ {
+ stack_.push (e);
+ }
+
+ void
+ pop_ ()
+ {
+ stack_.pop ();
+ }
+
+ XML::Element<C>&
+ top_ ()
+ {
+ return stack_.top ();
+ }
+
+ public:
+ XML::Attribute<C>*
+ attr_ ()
+ {
+ return attr__;
+ }
+
+ void
+ attr_ (XML::Attribute<C>* a)
+ {
+ attr__ = a;
+ }
+
+ private:
+ std::stack<XML::Element<C> > stack_;
+
+ XML::Attribute<C>* attr__;
+
+ private:
+ Writer (Writer const&);
+
+ void
+ operator= (Writer const&);
+ };
+}
+
+//#include <XSCRT/Writer.ipp>
+//#include <XSCRT/Writer.tpp>
+
+#endif // XSCRT_WRITER_HPP