Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACE_OS_ERRNO_H
00014 #define ACE_OS_ERRNO_H
00015 #include "ace/pre.h"
00016
00017 #include "ace/ACE_export.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "ace/OS_NS_errno.h"
00024
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class ACE_Export ACE_Errno_Guard
00047 {
00048 public:
00049
00050
00051 ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref,
00052 int error);
00053
00054
00055 ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref);
00056
00057
00058 ~ACE_Errno_Guard (void);
00059
00060 #if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
00061
00062 int operator= (const ACE_ERRNO_TYPE &errno_ref);
00063 #endif
00064
00065
00066 int operator= (int error);
00067
00068
00069 bool operator== (int error);
00070
00071
00072 bool operator!= (int error);
00073
00074 private:
00075
00076 ACE_Errno_Guard (const ACE_Errno_Guard &);
00077 ACE_Errno_Guard &operator= (const ACE_Errno_Guard &);
00078
00079 #if defined (ACE_MT_SAFE)
00080 ACE_ERRNO_TYPE *errno_ptr_;
00081 #endif
00082 int error_;
00083 };
00084
00085 ACE_END_VERSIONED_NAMESPACE_DECL
00086
00087
00088
00089
00090 #if defined (ACE_HAS_INLINED_OSCALLS) && \
00091 (!defined (__GNUG__) || !defined (__sun__))
00092 # if defined (ACE_INLINE)
00093 # undef ACE_INLINE
00094 # endif
00095 # define ACE_INLINE inline
00096 # include "ace/OS_Errno.inl"
00097 #endif
00098
00099 #include "ace/post.h"
00100 #endif