00001
00075 #ifndef INC_MI32_INTERLOCKEDINT32_H
00076 #define INC_MI32_INTERLOCKEDINT32_H
00077
00078 #ifndef INC_MI32_STDDEFNS_H
00079 #include <mi32/stddefns.h>
00080 #endif
00081
00082 #ifdef MISYSTEMDLL
00083 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00084 #else
00085 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00086 #endif
00087
00088 namespace MITHREAD {
00089
00140 class CLASSLIBEXPORT INTERLOCKEDINT32 {
00141 public:
00143 INTERLOCKEDINT32 (
00144 );
00145
00147 INTERLOCKEDINT32 (
00148 const INTERLOCKEDINT32& rhs
00149 );
00150
00152 INTERLOCKEDINT32 (
00153 INT32 value
00154 );
00155
00157 ~INTERLOCKEDINT32 (
00158 );
00159
00162 INTERLOCKEDINT32& operator= (
00163 const INTERLOCKEDINT32& rhs
00164 );
00165
00168 INTERLOCKEDINT32& operator++ (
00169 );
00170
00173 INT32 operator++ (int
00174 );
00175
00178 INTERLOCKEDINT32& operator-- (
00179 );
00180
00183 INT32 operator-- (int
00184 );
00185
00188 INTERLOCKEDINT32& operator+= (
00189 INT32 with
00190 );
00191
00194 INTERLOCKEDINT32& operator-= (
00195 INT32 with
00196 );
00197
00200 INTERLOCKEDINT32& operator&= (
00201 INT32 with
00202 );
00203
00206 INTERLOCKEDINT32& operator|= (
00207 INT32 with
00208 );
00209
00212 INTERLOCKEDINT32& operator^= (
00213 INT32 with
00214 );
00215
00220 #if defined(SUN) || defined(LINUX)
00221 operator INT32 (
00222 ) const;
00223 #else
00224 operator INT32 (
00225 ) const { return (m_Value); }
00226 #endif
00227
00231 INT32 CompareAndExchange (
00232 INT32 NewValue,
00233 INT32 TestValue
00234 );
00235
00236 private:
00237 #ifndef GENERATING_DOXYGEN_OUTPUT
00238 #if defined(MAC_OSX)
00239 INT32 m_Value;
00240 #elif defined(SUN) || defined(LINUX)
00241 class PRIV;
00242 PRIV* m_pPriv;
00243 #else
00244 INT32 volatile m_Value;
00245 #endif
00246 #endif // GENERATING_DOXYGEN_OUTPUT
00247 };
00248
00249 }
00250
00251 #undef CLASSLIBEXPORT
00252
00253 #endif // INC_MI32_INTERLOCKEDINT32_H