aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/hybrid/custom/wildcard/envelope.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
commitbce9d5a76072ec697ef69021818aa68709036da5 (patch)
tree9ec56eff60abacaea121d1602a1e48388ca34216 /examples/cxx/hybrid/custom/wildcard/envelope.hxx
parentbe19f3aae4e16b4dc9c980cb9b53e807616662ef (diff)
Add support for type customization in C++/Hybrid
examples/cxx/hybrid/custom/wildcard/: new example
Diffstat (limited to 'examples/cxx/hybrid/custom/wildcard/envelope.hxx')
-rw-r--r--examples/cxx/hybrid/custom/wildcard/envelope.hxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/custom/wildcard/envelope.hxx b/examples/cxx/hybrid/custom/wildcard/envelope.hxx
new file mode 100644
index 0000000..56abedd
--- /dev/null
+++ b/examples/cxx/hybrid/custom/wildcard/envelope.hxx
@@ -0,0 +1,39 @@
+// file : examples/cxx/hybrid/custom/wildcard/envelope.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#ifndef ENVELOPE_HXX
+#define ENVELOPE_HXX
+
+namespace email
+{
+ // Customized envelope type. It adds a sequence of body objects
+ // to the generated version.
+ //
+ class body;
+
+ class envelope: public envelope_base
+ {
+ public:
+ typedef xml_schema::var_seq<email::body> body_sequence;
+ typedef body_sequence::iterator body_iterator;
+ typedef body_sequence::const_iterator body_const_iterator;
+
+ const body_sequence&
+ body () const
+ {
+ return body_;
+ }
+
+ body_sequence&
+ body ()
+ {
+ return body_;
+ }
+
+ private:
+ body_sequence body_;
+ };
+}
+
+#endif // ENVELOPE_HXX