~ubuntu-branches/ubuntu/maverick/asc/maverick

« back to all changes in this revision

Viewing changes to source/libs/libsigc++/sigc++/node.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Eddy Petrișor, Gonéri Le Bouder, Cyril Brulebois, Barry deFreese
  • Date: 2008-01-08 19:54:18 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080108195418-n19fc4eobhhqxcy5
Tags: 2.0.1.0-1
[ Eddy Petrișor ]
* fixed Homepage semifield

[ Gonéri Le Bouder ]
* add a watchfile
* move homepage from the description to the new Homepage field

[ Cyril Brulebois ]
* Added Vcs-Svn and Vcs-Browser fields in the control file.

[ Barry deFreese ]
* Fix make-clean lintian warning
* New upstream release
* Bump debhelper build-dep to match compat
* Add desktop file
* Update watch file for new upstream naming
* Remove nostrip check from rules
* Bump Standards Version to 3.7.3
* Add myself to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- c++ -*-
2
 
/*  
3
 
  Copyright 2000, Karl Einar Nelson
4
 
 
5
 
  This library is free software; you can redistribute it and/or
6
 
  modify it under the terms of the GNU Lesser General Public
7
 
  License as published by the Free Software Foundation; either
8
 
  version 2 of the License, or (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
 
  Lesser General Public License for more details.
14
 
 
15
 
  You should have received a copy of the GNU Lesser General Public
16
 
  License along with this library; if not, write to the Free Software
17
 
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
18
 
*/
19
 
#include "sigc++/node.h"
20
 
 
21
 
#ifdef SIGC_CXX_NAMESPACES
22
 
namespace SigC
23
 
{
24
 
#endif
25
 
 
26
 
NodeBase::Link* NodeBase::link()
27
 
  {
28
 
    return 0;
29
 
  }
30
 
 
31
 
 
32
 
void NodeBase::notify(bool /*from_child*/)
33
 
  {
34
 
    notified_=1;
35
 
  }
36
 
 
37
 
NodeBase::NodeBase()
38
 
  : count_(0), notified_(0), blocked_(0), defered_(0)
39
 
  {}
40
 
 
41
 
NodeBase::~NodeBase()
42
 
  {}
43
 
 
44
 
/**************************************************************/
45
 
 
46
 
bool Node::valid() const
47
 
  {
48
 
    if (node_)
49
 
      if (!node_->notified_)
50
 
        return true;
51
 
      else
52
 
        clear();
53
 
    return false;
54
 
  }
55
 
 
56
 
void Node::assign(NodeBase* node)
57
 
  {
58
 
    node_=node;
59
 
    if (node_) 
60
 
      node_->reference();
61
 
  }
62
 
 
63
 
void Node::clear() const
64
 
  {
65
 
    if (node_) 
66
 
      node_->unreference();
67
 
    node_=0;
68
 
  }
69
 
 
70
 
Node& Node::operator =(const Node& node)
71
 
  {
72
 
    node.valid();
73
 
    if (node_==node.node_) 
74
 
      return *this;
75
 
    clear();
76
 
    assign(node.node_);
77
 
    return *this;
78
 
  }
79
 
 
80
 
#ifdef SIGC_CXX_NAMESPACES
81
 
}
82
 
#endif
83
 
 
84