37 if (
object ==
nullptr) { printf(
"Assertion object != NULL failed\n");
return; }
39 if (
top() ==
object ) {
58 assert(junior != NULL);
59 assert(senior != NULL);
64 object =
object->parent;
65 }
while (
object != senior );
69 assert(
object != NULL);
87 if (
object ==
nullptr) { printf(
"assertion object != NULL failed\n");
return; }
89 if (
bottom() ==
object ) {
95 }
else if (
bottom()->isAncestorOf(
object)) {
97 }
else if (
top() ==
object ) {
99 }
else if (
top()->isAncestorOf(
object)) {
130 assert(junior != NULL);
131 assert(senior != NULL);
133 if ( junior != senior ) {
140 assert(
object != NULL);
148 assert(this->
_hierarchy.front().object ==
object);
161 sigc::connection connection
162 =
object->connectRelease(
165 return Record(
object, connection);
ObjectHierarchy(SPObject *top=nullptr)
Create new object hierarchy.
void _trim_for_release(SPObject *released)
void clear()
Remove all entries.
void _detach(Record &record)
void _trimAbove(SPObject *limit)
Remove all objects above limit from hierarchy.
void setBottom(SPObject *object)
Trim or expand hierarchy at bottom such that object becomes bottom entry.
void _addTop(SPObject *senior, SPObject *junior)
Add hierarchy from junior's parent to senior to this hierarchy's top.
void setTop(SPObject *object)
Trim or expand hierarchy on top such that object becomes top entry.
std::list< Record > _hierarchy
sigc::signal< void(SPObject *)> _added_signal
Record _attach(SPObject *object)
sigc::signal< void(SPObject *)> _removed_signal
sigc::signal< void(SPObject *, SPObject *)> _changed_signal
void _trimBelow(SPObject *limit)
Remove all objects under given object.
void _addBottom(SPObject *senior, SPObject *junior)
Add hierarchy from senior to junior, in range (senior, junior], to this hierarchy's bottom.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
bool isAncestorOf(SPObject const *object) const
True if object is non-NULL and this is some in/direct parent of object.
Helper class to stream background task notifications as a series of messages.
SPObject * sp_object_unref(SPObject *object, SPObject *owner)
Decrease reference count of object, with possible debugging and finalization.
SPObject * sp_object_ref(SPObject *object, SPObject *owner)
Increase reference count of object, with possible debugging.
sigc::connection connection