summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/labelsequence.h
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@isc.org>2012-06-29 01:52:47 +0200
committerMukund Sivaraman <muks@isc.org>2012-06-29 01:52:47 +0200
commit0bebde9e2558dd2303c8b522dfff54281cb5aa0a (patch)
tree22b6d7b3c966369721fab3b27a00c71b1003d793 /src/lib/dns/labelsequence.h
parentMerge branch 'master' into trac1774 (diff)
downloadkea-0bebde9e2558dd2303c8b522dfff54281cb5aa0a.tar.xz
kea-0bebde9e2558dd2303c8b522dfff54281cb5aa0a.zip
[2053] Add toText() method to dns::LabelSequence
Diffstat (limited to 'src/lib/dns/labelsequence.h')
-rw-r--r--src/lib/dns/labelsequence.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/dns/labelsequence.h b/src/lib/dns/labelsequence.h
index 12fb4f4bc6..f9711c8f1c 100644
--- a/src/lib/dns/labelsequence.h
+++ b/src/lib/dns/labelsequence.h
@@ -123,6 +123,22 @@ public:
/// \return The number of labels
size_t getLabelCount() const { return (last_label_ - first_label_); }
+ /// \brief Convert the LabelSequence to a string.
+ ///
+ /// This method returns a <code>std::string</code> object representing the
+ /// LabelSequence as a string. The returned string ends with a dot
+ /// '.' if the label sequence is absolute.
+ ///
+ /// This function assumes the underlying name is in proper
+ /// uncompressed wire format. If it finds an unexpected label
+ /// character including compression pointer, an exception of class
+ /// \c BadLabelType will be thrown. In addition, if resource
+ /// allocation for the result string fails, a corresponding standard
+ /// exception will be thrown.
+ //
+ /// \return a string representation of the <code>LabelSequence</code>.
+ std::string toText() const;
+
/// \brief Returns the original Name object associated with this
/// LabelSequence
///