diff options
Diffstat (limited to 'TAO/tao/Storable_Base.inl')
-rw-r--r-- | TAO/tao/Storable_Base.inl | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/TAO/tao/Storable_Base.inl b/TAO/tao/Storable_Base.inl new file mode 100644 index 00000000000..ede6db13cdb --- /dev/null +++ b/TAO/tao/Storable_Base.inl @@ -0,0 +1,71 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Storable_Base.inl + * + * $Id$ + * + * @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() + : 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 (void) const +{ + return this->state_; +} + +ACE_INLINE bool +TAO::Storable_Base::good (void) const +{ + return (this->state_ == goodbit); +} + +ACE_INLINE bool +TAO::Storable_Base::bad (void) const +{ + return (this->state_ & badbit); +} + +ACE_INLINE bool +TAO::Storable_Base::eof (void) const +{ + return (this->state_ & eofbit); +} + +ACE_INLINE bool +TAO::Storable_Base::fail (void) const +{ + return (this->state_ & failbit); +} |