~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/tao/Refcounted_ObjectKey.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
 
3
 
//=============================================================================
4
 
/**
5
 
 *  @file Refcounted_ObjectKey.h
6
 
 *
7
 
 *  Refcounted_ObjectKey.h,v 1.3 2003/10/28 18:29:19 bala Exp
8
 
 *
9
 
 *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
10
 
 */
11
 
//=============================================================================
12
 
 
13
 
#ifndef TAO_REFCOUNTED_OBJECTKEY_H
14
 
#define TAO_REFCOUNTED_OBJECTKEY_H
15
 
 
16
 
#include /**/ "ace/pre.h"
17
 
 
18
 
#include "tao/Object_KeyC.h"
19
 
 
20
 
#if !defined (ACE_LACKS_PRAGMA_ONCE)
21
 
# pragma once
22
 
#endif /* ACE_LACKS_PRAGMA_ONCE */
23
 
 
24
 
namespace TAO
25
 
{
26
 
  /**
27
 
   * @class Refcounted_ObjectKey
28
 
   *
29
 
   * @brief A wrapper class that ties together a refcount to an
30
 
   * ObjectKey.
31
 
   *
32
 
   * The refounts in this class is manipulated within the context of
33
 
   * the lock in the TAO::ObjectKey_Table. Manipulating the refcounts
34
 
   * from anywhere else is strictly forbidden.
35
 
   */
36
 
  class TAO_Export Refcounted_ObjectKey
37
 
  {
38
 
  public:
39
 
    /// Constructor
40
 
    Refcounted_ObjectKey (const ObjectKey &ref);
41
 
 
42
 
    /// Accessor for the underlying ObjectKey.
43
 
    const ObjectKey &object_key (void) const;
44
 
 
45
 
  protected:
46
 
    friend class ObjectKey_Table;
47
 
 
48
 
    /// Protected destructor
49
 
    ~Refcounted_ObjectKey (void);
50
 
 
51
 
    /// Methods for incrementing and decrementing refcounts.
52
 
    long incr_refcount (void);
53
 
    long decr_refcount (void);
54
 
 
55
 
  private:
56
 
    /// The object key
57
 
    ObjectKey object_key_;
58
 
 
59
 
    /// The refcount on the object key..
60
 
    long ref_count_;
61
 
  };
62
 
}
63
 
 
64
 
#if defined (__ACE_INLINE__)
65
 
#include "Refcounted_ObjectKey.inl"
66
 
#endif /* defined INLINE */
67
 
 
68
 
#include /**/ "ace/post.h"
69
 
 
70
 
#endif /*TAO_REFCOUNTED_OBJECTKEY_H*/