[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / Auto_IncDec_T.h
blob01677101db5e561fa6d2fd83d2fae9ce6758cb78
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Auto_IncDec_T.h
7 * $Id: Auto_IncDec_T.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Edan Ayal <EdanA@cti2.com>
11 //=============================================================================
14 #ifndef ACE_AUTO_INCDEC_T_H
15 #define ACE_AUTO_INCDEC_T_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/config-all.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "ace/Global_Macros.h"
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 /**
30 * @class ACE_Auto_IncDec
32 * @brief This class automatically increments and decrements a
33 * parameterized counter.
35 * This data structure is meant to be used within a method,
36 * function, or scope. The actual parameter given for the
37 * <ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> template parameter
38 * must provide at least operators ++ and --.
40 template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>
41 class ACE_Auto_IncDec
43 public:
45 /// Implicitly increment the counter.
46 ACE_Auto_IncDec (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter);
48 /// Implicitly decrement the counter.
49 ~ACE_Auto_IncDec (void);
51 /// Dump the state of an object.
52 void dump (void) const;
54 protected:
55 /// Reference to the <ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> counter
56 /// we're incrementing/decrementing.
57 ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter_;
59 private:
60 // = Prevent assignment and initialization.
61 ACE_UNIMPLEMENTED_FUNC (void operator= (const
62 ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &))
63 ACE_UNIMPLEMENTED_FUNC (ACE_Auto_IncDec (const
64 ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &))
67 ACE_END_VERSIONED_NAMESPACE_DECL
69 #if defined (__ACE_INLINE__)
70 #include "ace/Auto_IncDec_T.inl"
71 #endif /* __ACE_INLINE__ */
73 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
74 #include "ace/Auto_IncDec_T.cpp"
75 // On Win32 platforms, this code will be included as template source
76 // code and will not be inlined. Therefore, we first turn off
77 // ACE_INLINE, set it to be nothing, include the code, and then turn
78 // ACE_INLINE back to its original setting. All this nonsense is
79 // necessary, since the generic template code that needs to be
80 // specialized cannot be inlined, else the compiler will ignore the
81 // specialization code. Also, the specialization code *must* be
82 // inlined or the compiler will ignore the specializations.
83 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
85 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
86 #pragma implementation ("Auto_IncDec_T.cpp")
87 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
89 #include /**/ "ace/post.h"
91 #endif /* ACE_AUTO_INCDEC_T_H */