diff options
author | Mukund Sivaraman <muks@isc.org> | 2012-06-25 00:06:44 +0200 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2012-06-25 00:06:44 +0200 |
commit | 57c61f2f457ac99686706d05dda5cd39737c6bd0 (patch) | |
tree | b76eee174d2754852567df3b84d3e937a4b05bfe /src/lib/dns/labelsequence.h | |
parent | [master] renamed file name 'NOTES’to more specific one for its content. (diff) | |
download | kea-57c61f2f457ac99686706d05dda5cd39737c6bd0.tar.xz kea-57c61f2f457ac99686706d05dda5cd39737c6bd0.zip |
[2052] Add implementation and unit tests for dns::LabelSequence::compare()
Diffstat (limited to 'src/lib/dns/labelsequence.h')
-rw-r--r-- | src/lib/dns/labelsequence.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/dns/labelsequence.h b/src/lib/dns/labelsequence.h index b17eeb43ad..62986753e9 100644 --- a/src/lib/dns/labelsequence.h +++ b/src/lib/dns/labelsequence.h @@ -85,10 +85,10 @@ public: /// \return The length of the data of the label sequence in octets. size_t getDataLength() const; - /// \brief Compares two label sequences. + /// \brief Compares two label sequences for equality. /// /// Performs a (optionally case-insensitive) comparison between this - /// LabelSequence and another LabelSequence. + /// LabelSequence and another LabelSequence for equality. /// /// \param other The LabelSequence to compare with /// \param case_sensitive If true, comparison is case-insensitive @@ -96,6 +96,18 @@ public: /// and contain the same data. bool equals(const LabelSequence& other, bool case_sensitive = false) const; + /// \brief Compares two label sequences. + /// + /// Performs a (optionally case-insensitive) comparison between this + /// LabelSequence and another LabelSequence. + /// + /// \param other The LabelSequence to compare with + /// \param case_sensitive If true, comparison is case-insensitive + /// \return a <code>NameComparisonResult</code> object representing the + /// comparison result. + NameComparisonResult compare(const LabelSequence& other, + bool case_sensitive = false) const; + /// \brief Remove labels from the front of this LabelSequence /// /// \note No actual memory is changed, this operation merely updates the |