mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
81 lines
1.2 KiB
C++
81 lines
1.2 KiB
C++
|
#include <sigc++/slot.h>
|
||
|
|
||
|
#ifdef SIGC_CXX_NAMESPACES
|
||
|
namespace SigC
|
||
|
{
|
||
|
#endif // SIGC_CXX_NAMESPACES
|
||
|
|
||
|
SlotDependent::~SlotDependent()
|
||
|
{}
|
||
|
|
||
|
SlotDependent::Dep::~Dep()
|
||
|
{}
|
||
|
|
||
|
SlotNode::SlotNode(void):next_(0)
|
||
|
{}
|
||
|
|
||
|
SlotNode::~SlotNode(void)
|
||
|
{}
|
||
|
|
||
|
SlotData::~SlotData(void)
|
||
|
{}
|
||
|
|
||
|
void SlotDependent::Dep::erase()
|
||
|
{
|
||
|
parent->invalid();
|
||
|
}
|
||
|
|
||
|
void SlotDependent::erase()
|
||
|
{
|
||
|
dep.parent->invalid();
|
||
|
}
|
||
|
|
||
|
void SlotData::connect()
|
||
|
{
|
||
|
reference();
|
||
|
invalid();
|
||
|
set_weak();
|
||
|
unreference();
|
||
|
}
|
||
|
|
||
|
void SlotList_::clear()
|
||
|
{
|
||
|
Iterator current=begin();
|
||
|
Iterator next=current;
|
||
|
head_=0;
|
||
|
|
||
|
while (current!=end())
|
||
|
{
|
||
|
next++;
|
||
|
delete current.node();
|
||
|
current=next;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
SlotList_::Iterator SlotList_::insert_direct(Iterator pos,NodeType *node)
|
||
|
{
|
||
|
NodeType *loc=pos.node();
|
||
|
if (pos==begin())
|
||
|
{
|
||
|
node->next_=head_;
|
||
|
head_=node;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Iterator i,j;
|
||
|
j=begin();
|
||
|
while (i=j++,j!=end()&&j!=pos);
|
||
|
|
||
|
NodeType *parent=i.node();
|
||
|
parent->next_=node;
|
||
|
node->next_=loc;
|
||
|
}
|
||
|
return Iterator(node);
|
||
|
}
|
||
|
|
||
|
#ifdef SIGC_CXX_NAMESPACES
|
||
|
} // namespace
|
||
|
#endif // SIGC_CXX_NAMESPACES
|
||
|
|
||
|
|