node-fns.cpp revision 6cf4fe01f16c5713438743a95c971ed82c44c535
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <map>
#include <glib.h> // g_assert()
#include "xml/node-iterators.h"
#include "algorithms/find-if-before.h"
namespace Inkscape {
namespace XML {
/* the id_permitted stuff is a temporary-ish hack */
namespace {
}
} else {
return permitted;
}
}
}
return false;
}
}
struct node_matches {
};
/** Returns the sibling before \a node in \a node's parent's children,
* or NULL if \a node is the first of those children (or if child is
* NULL or has no parent).
*
* Useful in combination with Node::addChild, when you want to insert
* a new child _before_ a given existing child.
*
* Note: Involves a linear search (unlike next_node).
*
* \pre Links are correct, i.e. \a node isin its parent's children.
*
* \post (ret == NULL
* ? node == NULL || node->parent() == NULL || node->parent()->firstChild() == node
* : ret->next() == node).
*/
return NULL;
}
);
return previous;
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :