[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5572] Move comments, rephrasing some
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5572] Move comments, rephrasing some |
Date: |
Thu, 04 Oct 2012 10:49:31 +0000 |
Revision: 5572
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5572
Author: chicares
Date: 2012-10-04 10:49:31 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Move comments, rephrasing some
Modified Paths:
--------------
lmi/trunk/xml_lmi.cpp
lmi/trunk/xml_lmi.hpp
Modified: lmi/trunk/xml_lmi.cpp
===================================================================
--- lmi/trunk/xml_lmi.cpp 2012-10-03 12:24:34 UTC (rev 5571)
+++ lmi/trunk/xml_lmi.cpp 2012-10-04 10:49:31 UTC (rev 5572)
@@ -282,6 +282,8 @@
fatal_error() << "Cannot add comment to rootless document." << LMI_FLUSH;
}
+/// Find an element subnode by name, throwing if it is not found.
+
xml::node::const_iterator retrieve_element
(xml::element const& parent
,std::string const& name
@@ -300,6 +302,13 @@
return i;
}
+/// Retrieve an xml element's full text-node contents.
+///
+/// The contents of all text-node children are concatenated.
+///
+/// Only direct children are considered: children of child nodes
+/// are not.
+
std::string get_content(xml::element const& element)
{
try
@@ -326,6 +335,8 @@
}
}
+/// Retrieve an xml element's name.
+
std::string get_name(xml::element const& element)
{
try
@@ -340,6 +351,11 @@
}
}
+/// Get a named attribute of an xml element.
+///
+/// If the element has no such attribute, then return false and
+/// guarantee not to modify 'value'.
+
bool get_attr
(xml::element const& element
,std::string const& name
@@ -367,6 +383,11 @@
}
}
+/// Get a named attribute of an xml element; convert it to integer.
+///
+/// If the element has no such attribute, then return false and
+/// guarantee not to modify 'value'.
+
bool get_attr
(xml::element const& element
,std::string const& name
@@ -385,6 +406,8 @@
}
}
+/// Set a named attribute of an xml element.
+
void set_attr
(xml::element& element
,std::string const& name
@@ -402,6 +425,8 @@
}
}
+/// Set a named attribute of an xml element.
+
void set_attr
(xml::element& element
,std::string const& name
Modified: lmi/trunk/xml_lmi.hpp
===================================================================
--- lmi/trunk/xml_lmi.hpp 2012-10-03 12:24:34 UTC (rev 5571)
+++ lmi/trunk/xml_lmi.hpp 2012-10-04 10:49:31 UTC (rev 5572)
@@ -31,9 +31,9 @@
#include <boost/scoped_ptr.hpp>
-#include <xmlwrapp/node.h> // (for xml::element)
+#include <xmlwrapp/node.h> // xml::element
-#include <cstddef> // std::size_t
+#include <cstddef> // std::size_t
#include <iosfwd>
#include <string>
@@ -80,33 +80,15 @@
boost::scoped_ptr<Document> document_;
};
- /// Find an element subnode by name, throwing if it is not found.
-
xml::node::const_iterator retrieve_element
(xml::element const& parent
,std::string const& name
);
- /// Retrieve an xml element's full text-node contents.
- ///
- /// The contents of all text-node children are concatenated.
- ///
- /// Only direct children are considered: children of child nodes
- /// are not.
-
std::string get_content(xml::element const&);
- /// Retrieve an xml element's name.
-
std::string get_name(xml::element const&);
- // Attribute functions.
-
- /// Get a given attribute of an xml element.
- ///
- /// If the element has no such attribute, then return false and
- /// guarantee not to modify 'value'.
-
bool get_attr
(xml::element const&
,std::string const& name
@@ -118,8 +100,6 @@
,int& value
);
- /// Set a given attribute of an xml element.
-
void set_attr
(xml::element&
,std::string const& name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5572] Move comments, rephrasing some,
Greg Chicares <=