aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/tree/custom/double/driver.cxx
blob: 2e5b44de72a24ba82d5fe8dd1a5249e5d4eec8ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// file      : examples/cxx/tree/custom/double/driver.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain

#include <iostream>

#include "order.hxx"

using std::cerr;
using std::endl;

int
main ()
{
  try
  {
    // Order one Airbus A380.
    //
    order o;
    o.item ().push_back (item ("Airbus A380", 317000000.90));


    // Serialize.
    //
    order_ (std::cout, o);
  }
  catch (const xml_schema::exception& e)
  {
    cerr << e << endl;
    return 1;
  }
}