summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/parser/multiroot/protocol-pimpl.cxx
blob: b5ec1b2ddd4243dcb3cdfe3b9c2a7415ca17c8a2 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// file      : examples/cxx/parser/multiroot/protocol-pimpl.cxx
// copyright : not copyrighted - public domain

#include "protocol-pimpl.hxx"

namespace protocol
{
  // request_pimpl
  //
  void request_pimpl::
  account (unsigned int account)
  {
    account_ = account;
  }

  request* request_pimpl::
  post_request ()
  {
    // This parser is never used directly.
    //
    return 0;
  }

  // balance_pimpl
  //
  balance* balance_pimpl::
  post_balance ()
  {
    return new balance (account_);
  }

  // withdraw_pimpl
  //
  void withdraw_pimpl::
  amount (unsigned int amount)
  {
    amount_ = amount;
  }

  withdraw* withdraw_pimpl::
  post_withdraw ()
  {
    return new withdraw (account_, amount_);
  }
}