2
* Whiteboard session manager
3
* XML node tracking facility
6
* David Yip <yipdw@rose-hulman.edu>
8
* Copyright (c) 2005 Authors
10
* Released under GNU GPL, read the file 'COPYING' for more information
13
#ifndef __WHITEBOARD_TRACKER_NODE_H__
14
#define __WHITEBOARD_TRACKER_NODE_H__
18
#include "gc-managed.h"
19
#include "gc-finalized.h"
26
namespace Whiteboard {
28
// set _size in TrackerNode private members if you add or delete
38
struct TrackerNode : public GC::Managed<> {
40
TrackerNode(XML::Node const* n) : _node(n)
44
virtual ~TrackerNode()
48
void lock(ListenerType listener)
50
if (listener < _size) {
51
this->_listener_locks.set(listener, true);
55
void unlock(ListenerType listener)
57
if (listener < _size) {
58
this->_listener_locks.set(listener, false);
62
bool isLocked(ListenerType listener)
64
return (this->_listener_locks[listener]);
67
XML::Node const* _node;
70
// change this if any other flags are added
71
static unsigned short const _size = 5;
72
std::bitset< _size > _listener_locks;
74
// noncopyable, nonassignable
75
TrackerNode(TrackerNode const&);
76
TrackerNode& operator=(TrackerNode const&);
88
c-file-style:"stroustrup"
89
c-file-offsets:((innamespace . 0)(inline-open . 0))
94
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :