|
@@ -384,16 +384,19 @@ public:
|
|
/// \brief Convert a textual representation of an RR type to the
|
|
/// \brief Convert a textual representation of an RR type to the
|
|
/// corresponding 16-bit integer code.
|
|
/// corresponding 16-bit integer code.
|
|
///
|
|
///
|
|
- /// This method searches the \c RRParamRegistry for the mapping from the
|
|
|
|
- /// given textual representation of RR type to the corresponding integer
|
|
|
|
- /// code. If a mapping is found, it returns the associated type code;
|
|
|
|
- /// otherwise, if the given string is in the form of "TYPEnnnn", it returns
|
|
|
|
- /// the corresponding number as the type code; otherwise, it throws an
|
|
|
|
- /// exception of class \c InvalidRRType.
|
|
|
|
|
|
+ /// This method searches the \c RRParamRegistry for the mapping from
|
|
|
|
+ /// the given textual representation of RR type to the corresponding
|
|
|
|
+ /// integer code. If a mapping is found, it returns true with the
|
|
|
|
+ /// associated type code in \c type_code; otherwise, if the given
|
|
|
|
+ /// string is in the form of "TYPEnnnn", it returns true with the
|
|
|
|
+ /// corresponding number as the type code in \c type_code;
|
|
|
|
+ /// otherwise, it returns false and \c type_code is untouched.
|
|
///
|
|
///
|
|
/// \param type_string The textual representation of the RR type.
|
|
/// \param type_string The textual representation of the RR type.
|
|
- /// \return The RR type code for \c type_string.
|
|
|
|
- uint16_t textToTypeCode(const std::string& type_string) const;
|
|
|
|
|
|
+ /// \param type_code Returns the RR type code in this argument.
|
|
|
|
+ /// \return true if conversion is successful, false otherwise.
|
|
|
|
+ bool textToTypeCode(const std::string& type_string,
|
|
|
|
+ uint16_t& type_code) const;
|
|
|
|
|
|
/// \brief Convert type code into its textual representation.
|
|
/// \brief Convert type code into its textual representation.
|
|
///
|
|
///
|