]> git.lyx.org Git - lyx.git/blob - sigc++/slot.cc
remove bogus define
[lyx.git] / sigc++ / slot.cc
1 #include <sigc++/slot.h>
2
3 #ifdef SIGC_CXX_NAMESPACES
4 namespace SigC
5 {
6 #endif // SIGC_CXX_NAMESPACES
7
8 SlotDependent::~SlotDependent()
9   {}
10
11 SlotDependent::Dep::~Dep()
12   {}
13
14 SlotNode::SlotNode(void):next_(0)
15   {}
16
17 SlotNode::~SlotNode(void)
18   {}
19
20 SlotData::~SlotData(void)
21   {}
22
23 void SlotDependent::Dep::erase()
24   {
25    parent->invalid();
26   }
27
28 void SlotDependent::erase()
29   {
30    dep.parent->invalid();
31   }
32
33 void SlotData::connect()
34   {
35    reference();
36    invalid();
37    set_weak();
38    unreference();
39   } 
40
41 void SlotList_::clear()
42   {
43    Iterator current=begin();
44    Iterator next=current;
45    head_=0;
46     
47    while (current!=end())
48      {
49       next++;
50       delete current.node();
51       current=next;
52      }
53   }
54
55 SlotList_::Iterator SlotList_::insert_direct(Iterator pos,NodeType *node)
56   {
57    NodeType *loc=pos.node();
58    if (pos==begin())
59      {
60       node->next_=head_;
61       head_=node;
62      } 
63    else
64      {
65       Iterator i,j;  
66       j=begin();
67       while (i=j++,j!=end()&&j!=pos);
68
69       NodeType *parent=i.node();
70       parent->next_=node;
71       node->next_=loc;
72      }
73    return Iterator(node);
74   }
75
76 #ifdef SIGC_CXX_NAMESPACES
77 } // namespace
78 #endif // SIGC_CXX_NAMESPACES
79
80