summaryrefslogtreecommitdiff
path: root/ace/Future_Node.h
blob: 8590cbaccca6375558698f2ed76a93e48b8f48d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    ace
//
// = FILENAME
//    Future_Node.h
//
// = AUTHOR
//    John Tucker <jtucker@infoglide.com>
//
// ============================================================================

#ifndef ACE_FUTURE_NODE_H
#define ACE_FUTURE_NODE_H

#include "ace/Future.h"
#include "ace/Thread.h"
#include "ace/Containers_T.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if defined (ACE_HAS_THREADS)

// Forward decl.
template <class T> class ACE_Future_Node;
template <class T> class ACE_DLList_Future_Node;

template <class T>
class ACE_DLList_Future_Node
{
  // = TITLE
  //     Implementation of element in a ACE_Future list.
  //     Needed for ACE_Double_Linked_List.

  friend class ACE_Double_Linked_List<ACE_DLList_Future_Node>;
  friend class ACE_Double_Linked_List_Iterator<ACE_DLList_Future_Node>;

public:
  // = Initialization
  ACE_DLList_Future_Node (const ACE_Future<T> &future,
                          ACE_DLList_Future_Node *n = 0,
                          ACE_DLList_Future_Node *p = 0);
  ~ACE_DLList_Future_Node (void);

  ACE_ALLOC_HOOK_DECLARE;
  // Declare the dynamic allocation hooks.

  ACE_Future<T> item_;
  ACE_DLList_Future_Node *next_;
  ACE_DLList_Future_Node *prev_;

protected:
  ACE_DLList_Future_Node (void);
};


#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "ace/Future_Node.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Future_Node.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#endif /* ACE_HAS_THREADS */
#endif /* ACE_FUTURE_NODE_H */