s/Uint/UInt/g
[ACE_TAO.git] / TAO / tao / Storable_Base.cpp
bloba04f09d1564f940640c0b81764a522d353d2f523
1 //=============================================================================
2 /**
3 * @file Storable_Base.cpp
5 * @author Bruce Trask <trask_b@ociweb.com>
6 * @author Chanaka Liyanaarachchi <chanaka@ociweb.com>
7 * @author Byron Harris <harrisb@ociweb.com>
8 */
9 //=============================================================================
11 #include "tao/Storable_Base.h"
13 #if !defined (__ACE_INLINE__)
14 #include "tao/Storable_Base.inl"
15 #endif /* __ACE_INLINE__ */
17 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
19 bool TAO::Storable_Base::use_backup_default = false;
20 bool TAO::Storable_Base::retry_on_ebadf_default = false;
22 void
23 TAO::Storable_Base::remove ()
25 if (this->use_backup_)
27 this->remove_backup ();
29 this->do_remove ();
32 bool
33 TAO::Storable_Base::use_backup ()
35 return this->use_backup_;
38 ACE_CString
39 TAO::Storable_Base::state_as_string (Storable_State state)
41 ACE_CString state_string;
42 if (state == goodbit)
43 state_string = "goodbit";
44 else
46 if (state & badbit)
47 state_string = "badbit ";
48 if (state & eofbit)
49 state_string += "eofbit ";
50 if (state & failbit)
51 state_string += "failbit";
53 return state_string;
56 TAO::Storable_Exception::
57 Storable_Exception (const ACE_CString & file_name)
58 : file_name_ (file_name)
62 TAO::Storable_Exception::
63 ~Storable_Exception ()
67 const ACE_CString &
68 TAO::Storable_Exception::get_file_name () const
70 return file_name_;
73 TAO::Storable_Read_Exception::
74 Storable_Read_Exception (Storable_Base::Storable_State state,
75 const ACE_CString & file_name)
76 : Storable_Exception (file_name)
77 , storable_state_ (state)
81 TAO::Storable_Base::Storable_State
82 TAO::Storable_Read_Exception::get_state () const
84 return storable_state_;
88 TAO::Storable_Write_Exception::
89 Storable_Write_Exception (Storable_Base::Storable_State state,
90 const ACE_CString & file_name)
91 : Storable_Exception (file_name)
92 , storable_state_ (state)
96 TAO::Storable_Base::Storable_State
97 TAO::Storable_Write_Exception::get_state () const
99 return storable_state_;
103 TAO_END_VERSIONED_NAMESPACE_DECL