Commit 10589471 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

added missing minimum level document


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1456 e5f2f494-b856-4b98-b285-d166d9295462
parent 4ae9174b
......@@ -326,7 +326,14 @@ public:
/// that is to be filled in later, e.g, by \ref writeUint16At().
/// \param len The length of the gap to be inserted in bytes.
void skip(size_t len) { data_.insert(data_.end(), len, 0); }
/// \brief TBD
/// \brief Trim the specified length of data from the end of the buffer.
///
/// The specified length must not exceed the current data size of the
/// buffer; otherwise an exception of class \c isc::OutOfRange will
/// be thrown.
///
/// \param len The length of data that should be trimmed.
void trim(size_t len)
{
if (len > data_.size()) {
......
......@@ -147,9 +147,11 @@ struct MessageRendererImpl {
OutputBuffer nbuffer_;
/// A set of compression pointers.
std::set<NameCompressNode, NameCompare> nodeset_;
/// TBD
/// The maximum length of rendered data that can fit without
/// truncation.
uint16_t msglength_limit_;
/// A boolean flag that indicates truncation has occurred while rendering
/// the data.
bool truncated_;
};
......
......@@ -99,11 +99,22 @@ public:
const void* getData() const;
/// \brief Return the length of data written in the internal buffer.
size_t getLength() const;
/// \brief TBD
/// \brief Return whether truncation has occurred while rendering.
///
/// Once the return value of this method is \c true, it doesn't make sense
/// to try rendering more data, although this class itself doesn't reject
/// the attempt.
///
/// This method never throws an exception.
///
/// \return true if truncation has occurred; otherwise \c false.
bool isTruncated() const;
/// \brief TBD
/// \brief Return the maximum length of rendered data that can fit in the
/// corresponding DNS message without truncation.
///
/// This method never throws an exception.
///
/// \return The maximum length in bytes.
size_t getLengthLimit() const;
//@}
......@@ -111,11 +122,18 @@ public:
/// \name Setter Methods
///
//@{
/// \brief TBD
void setLengthLimit(size_t len);
/// \brief TBD
/// \brief Mark the renderer to indicate truncation has occurred while
/// rendering.
///
/// This method never throws an exception.
void setTruncated();
/// \brief Set the maximum length of rendered data that can fit in the
/// corresponding DNS message without truncation.
///
/// This method never throws an exception.
///
/// \param len The maximum length in bytes.
void setLengthLimit(size_t len);
//@}
///
......@@ -130,8 +148,16 @@ public:
///
/// \param len The length of the gap to be inserted in bytes.
void skip(size_t len);
/// \brief TBD
/// \brief Trim the specified length of data from the end of the internal
/// buffer.
///
/// This method is provided for such cases as DNS message truncation.
///
/// The specified length must not exceed the current data size of the
/// buffer; otherwise an exception of class \c isc::OutOfRange will
/// be thrown.
///
/// \param len The length of data that should be trimmed.
void trim(size_t len);
/// \brief Clear the internal buffer and other internal resources.
///
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment