diff options
Diffstat (limited to 'ACE/ace/Refcountable_T.inl')
-rw-r--r-- | ACE/ace/Refcountable_T.inl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ACE/ace/Refcountable_T.inl b/ACE/ace/Refcountable_T.inl new file mode 100644 index 00000000000..fe0d39bfecf --- /dev/null +++ b/ACE/ace/Refcountable_T.inl @@ -0,0 +1,35 @@ +// -*- C++ -*- +// +//$Id$ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template <class ACE_LOCK> +ACE_INLINE +ACE_Refcountable_T<ACE_LOCK>::ACE_Refcountable_T (long refcount) + : refcount_ (refcount) +{ +} + +template <class ACE_LOCK> +ACE_INLINE long +ACE_Refcountable_T<ACE_LOCK>::increment (void) +{ + return ++this->refcount_; +} + +template <class ACE_LOCK> +ACE_INLINE long +ACE_Refcountable_T<ACE_LOCK>::decrement (void) +{ + return --this->refcount_; +} + +template <class ACE_LOCK> +ACE_INLINE long +ACE_Refcountable_T<ACE_LOCK>::refcount (void) const +{ + return this->refcount_.value (); +} + +ACE_END_VERSIONED_NAMESPACE_DECL |