From: Mukund Sivaraman Date: Thu, 21 Feb 2013 18:13:12 +0000 (+0530) Subject: [2386] Add/update API doc for DS-like constructors X-Git-Tag: bind10-1.1.0beta1-release~73^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48027b5c30dfb02a9e54bf1a362b9561bc4772bc;p=thirdparty%2Fkea.git [2386] Add/update API doc for DS-like constructors --- diff --git a/src/lib/dns/rdata/generic/detail/ds_like.h b/src/lib/dns/rdata/generic/detail/ds_like.h index d309c2c331..50389c1cae 100644 --- a/src/lib/dns/rdata/generic/detail/ds_like.h +++ b/src/lib/dns/rdata/generic/detail/ds_like.h @@ -58,10 +58,21 @@ template class DSLikeImpl { public: /// \brief Constructor from string. /// - /// Exceptions + /// The given string must represent a valid DS-like RDATA. There + /// can be extra space characters at the beginning or end of the + /// text (which are simply ignored), but other extra text, including + /// a new line, will make the construction fail with an exception. + /// + /// The tag field must be a valid decimal representation of an + /// unsigned 16-bit integer. The protocol and algorithm fields must + /// be valid decimal representations of unsigned 8-bit integers + /// respectively. The digest field may contain whitespace. /// - /// \c InvalidRdataText is thrown if the method cannot process the - /// parameter data for any of the number of reasons. + /// \throw MasterLexer::LexerError General parsing error such as + /// missing field. + /// \throw InvalidRdataText if any fields are out of their valid range. + /// + /// \param ds_str A string containing the RDATA to be created DSLikeImpl(const std::string& ds_str) { try { std::istringstream ss(ds_str); @@ -82,6 +93,22 @@ public: } } + /// \brief Constructor with a context of MasterLexer. + /// + /// The \c lexer should point to the beginning of valid textual + /// representation of a DS-like RDATA. + /// + /// The tag field must be a valid decimal representation of an + /// unsigned 16-bit integer. The protocol and algorithm fields must + /// be valid decimal representations of unsigned 8-bit integers + /// respectively. + /// + /// \throw MasterLexer::LexerError General parsing error such as + /// missing field. + /// \throw InvalidRdataText if any fields are out of their valid range. + /// + /// \param lexer A \c MasterLexer object parsing a master file for the + /// RDATA to be created DSLikeImpl(MasterLexer& lexer, const Name*, MasterLoader::Options, MasterLoaderCallbacks&) {