[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Refcountable_T.h
blob36e4c508d6ed300536821f75d582027e7895c980
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Refcountable_T.h
7 * $Id: Refcountable_T.h 81409 2008-04-24 08:30:48Z johnnyw $
9 * @author Doug Schmidt
10 * @author Johnny Willemsen
12 //=============================================================================
13 #ifndef ACE_REFCOUNTABLE_T_H
14 #define ACE_REFCOUNTABLE_T_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/ACE_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/Atomic_Op.h"
24 #include "ace/Synch_Traits.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 template <class ACE_LOCK>
29 class ACE_Refcountable_T
31 public:
32 /// Destructor.
33 virtual ~ACE_Refcountable_T (void);
35 // = Increment/Decrement refcount
36 long increment (void);
37 long decrement (void);
39 /// Returns the current refcount.
40 long refcount (void) const;
42 protected:
43 /// Protected constructor.
44 ACE_Refcountable_T (long refcount);
46 /// Current refcount.
47 ACE_Atomic_Op <ACE_LOCK, long> refcount_;
50 typedef ACE_Refcountable_T<ACE_Null_Mutex> ACE_Refcountable;
52 ACE_END_VERSIONED_NAMESPACE_DECL
54 #if defined (__ACE_INLINE__)
55 #include "ace/Refcountable_T.inl"
56 #endif /* __ACE_INLINE__ */
58 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
59 #include "ace/Refcountable_T.cpp"
60 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
62 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
63 #pragma implementation ("Refcountable_T.cpp")
64 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
66 #include /**/ "ace/post.h"
67 #endif /*ACE_REFCOUNTABLE_T_H*/