aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/parser/multiroot/protocol-pimpl-tiein.cxx
blob: def6f98529540017ef73425169175d665cd8045e (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
47
48
49
50
51
52
53
54
55
56
57
58
59
// file      : examples/cxx/parser/multiroot/protocol-pimpl-tiein.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain

#include "protocol-pimpl-tiein.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_pimpl::
  balance_pimpl ()
      : balance_pskel (&base_impl_)
  {
  }

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

  // withdraw_pimpl
  //
  withdraw_pimpl::
  withdraw_pimpl ()
      : withdraw_pskel (&base_impl_)
  {
  }

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

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