CPN
Computational Process Networks
RemoteQueueHolder.h
Go to the documentation of this file.
1 //=============================================================================
2 // Computational Process Networks class library
3 // Copyright (C) 1997-2006 Gregory E. Allen and The University of Texas
4 //
5 // This library is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU Library General Public License as published
7 // by the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Library General Public License for more details.
14 //
15 // The GNU Public License is available in the file LICENSE, or you
16 // can write to the Free Software Foundation, Inc., 59 Temple Place -
17 // Suite 330, Boston, MA 02111-1307, USA, or you can find it on the
18 // World Wide Web at http://www.fsf.org.
19 //=============================================================================
25 #ifndef CPN_REMOTEQUEUEHOLDER_H
26 #define CPN_REMOTEQUEUEHOLDER_H
27 #pragma once
28 #include "common_priv.h"
29 #include "RemoteQueueBase.h"
30 #include <cpn/io/WakeupHandle.h>
33 #include <map>
34 #include <vector>
35 namespace CPN {
48  public:
49  typedef std::map<Key_t, shared_ptr<RemoteQueueBase> > QueueMap;
50  typedef std::vector<shared_ptr<RemoteQueueBase> > QueueList;
55  void AddQueue(shared_ptr<RemoteQueueBase> queue);
60  void CleanupQueue(Key_t key);
65  void Cleanup();
70  void Shutdown();
76  WakeupHandle *GetWakeup() { return &wakeup; }
77  private:
78  void PrintState();
84  };
85 }
86 #endif
std::map< Key_t, shared_ptr< RemoteQueueBase > > QueueMap
A convenience handle for event loops so that one can interrupt a Poll before it times out...
Definition: WakeupHandle.h:35
uint64_t Key_t
Definition: common.h:79
WakeupHandle * GetWakeup()
void AddQueue(shared_ptr< RemoteQueueBase > queue)
void CleanupQueue(Key_t key)
std::vector< shared_ptr< RemoteQueueBase > > QueueList