summaryrefslogtreecommitdiff
path: root/TAO/tao/Remote_Invocation.inl
blob: 8f03fddb6496cd34ef26182609caf00658916f8b (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
60
// -*- C++ -*-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  ACE_INLINE
  void
  Remote_Invocation::_tao_byte_order (int byte_order)
  {
    this->byte_order_ = byte_order;
  }

  ACE_INLINE
  int
  Remote_Invocation::_tao_byte_order ()
  {
    return this->byte_order_;
  }

  ACE_INLINE
  void
  Remote_Invocation::marshal_data (TAO_OutputCDR &out_stream)
  {
    // Marshal application data
    if (this->details_.marshal_args (out_stream) == false)
      {
        throw ::CORBA::MARSHAL ();
      }
  }

  ACE_INLINE
  CDR_Byte_Order_Guard::CDR_Byte_Order_Guard (
      TAO_OutputCDR& cdr, int byte_order)
      : cdr_(cdr), byte_order_ (byte_order)
      , present_byte_order_ (cdr.byte_order())
  {
    if (byte_order_ != present_byte_order_)
    {
      cdr_.reset_byte_order(byte_order_);
    }
  }

  ACE_INLINE
  void CDR_Byte_Order_Guard::reset ()
  {
    if (byte_order_ != present_byte_order_)
    {
      cdr_.reset_byte_order(byte_order_);
      present_byte_order_ = byte_order_;
    }
  }

  ACE_INLINE
  CDR_Byte_Order_Guard::~CDR_Byte_Order_Guard ()
  {
    reset ();
  }
}

TAO_END_VERSIONED_NAMESPACE_DECL