diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2008-09-23 23:34:58 +0000 |
|---|---|---|
| committer | tweenk <tweenk@users.sourceforge.net> | 2008-09-23 23:34:58 +0000 |
| commit | 3547b1082098934d583f2c483c8eb5a59e9c2bbb (patch) | |
| tree | d62ab547cdc178ec6d4028d27aa6ba75714168c7 /src/xml/repr-util.cpp | |
| parent | add a path parameter to doeffect_stack_test to test a bug + fix a stupid erro... (diff) | |
| download | inkscape-3547b1082098934d583f2c483c8eb5a59e9c2bbb.tar.gz inkscape-3547b1082098934d583f2c483c8eb5a59e9c2bbb.zip | |
* Lots of documentation for the Inkscape::XML namespace
* Doxygen fixes for a few files
* Garbage-collected allocator for STL containers
(bzr r6877)
Diffstat (limited to 'src/xml/repr-util.cpp')
| -rw-r--r-- | src/xml/repr-util.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 59563a7fc..528902fef 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -344,6 +344,7 @@ long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, char const *k * 0 positions are equivalent * 1 first object's position is greater than the second * -1 first object's position is less than the second + * @todo Rewrite this function's description to be understandable */ int sp_repr_compare_position(Inkscape::XML::Node *first, Inkscape::XML::Node *second) @@ -397,7 +398,15 @@ sp_repr_compare_position(Inkscape::XML::Node *first, Inkscape::XML::Node *second } /** - * lookup child by \a key, \a value. + * @brief Find an element node using an unique attribute + * + * This function returns the first child of the specified node that has the attribute + * @c key equal to @c value. Note that this function does not recurse. + * + * @param repr The node to start from + * @param key The name of the attribute to use for comparisons + * @param value The value of the attribute to look for + * @relatesalso Inkscape::XML::Node */ Inkscape::XML::Node * sp_repr_lookup_child(Inkscape::XML::Node *repr, @@ -417,11 +426,16 @@ sp_repr_lookup_child(Inkscape::XML::Node *repr, } /** - * \brief Recursively find the Inkscape::XML::Node matching the given XML name. - * \return A pointer to the matching Inkscape::XML::Node - * \param repr The Inkscape::XML::Node to start from - * \param name The desired XML name - * + * @brief Find an element node with the given name + * + * This function searches the descendants of the specified node depth-first for + * the first XML node with the specified name. + * + * @param repr The node to start from + * @param name The name of the element node to find + * @param maxdepth Maximum search depth, or -1 for an unlimited depth + * @return A pointer to the matching Inkscape::XML::Node + * @relatesalso Inkscape::XML::Node */ Inkscape::XML::Node * sp_repr_lookup_name( Inkscape::XML::Node *repr, gchar const *name, gint maxdepth ) |
