summaryrefslogtreecommitdiff
path: root/TAO/tao/Storable_Base.inl
blob: 53d866ce8934969b15d2b62f0d0eabef46178390 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
// -*- C++ -*-

//=============================================================================
/**
 *  @file   Storable_Base.inl
 *
 *  @author Bruce Trask <trask_b@ociweb.com>
 *  @author Chanaka Liyanaarachchi <chanaka@ociweb.com>
 *  @author Byron Harris <harrisb@ociweb.com>
 */
//=============================================================================

#include "tao/Storable_Base.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE
TAO::Storable_Base::Storable_Base (bool use_backup, bool retry_ebadf)
  : use_backup_ (use_backup)
  , retry_on_ebadf_ (retry_ebadf)
  , state_ (goodbit)
{
}

ACE_INLINE
TAO::Storable_Base::~Storable_Base ()
{
}

ACE_INLINE void
TAO::Storable_Base::clear (TAO::Storable_Base::Storable_State state)
{
  this->state_ = state;
}

ACE_INLINE void
TAO::Storable_Base::setstate (TAO::Storable_Base::Storable_State state)
{
  this->clear (static_cast <TAO::Storable_Base::Storable_State> (
               this->rdstate () | state));
}

ACE_INLINE TAO::Storable_Base::Storable_State
TAO::Storable_Base::rdstate () const
{
  return this->state_;
}

ACE_INLINE bool
TAO::Storable_Base::good () const
{
  return (this->state_ == goodbit);
}

ACE_INLINE bool
TAO::Storable_Base::bad () const
{
  return (this->state_ & badbit);
}

ACE_INLINE bool
TAO::Storable_Base::eof () const
{
  return (this->state_ & eofbit);
}

ACE_INLINE bool
TAO::Storable_Base::fail () const
{
  return (this->state_ & failbit);
}

TAO_END_VERSIONED_NAMESPACE_DECL