[svn] commit: r3535 - /branches/trac397/src/bin/auth/rbt_datasrc.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Nov 16 13:09:38 UTC 2010
Author: hanfeng
Date: Tue Nov 16 13:09:37 2010
New Revision: 3535
Log:
fix some comment and code style problem
Modified:
branches/trac397/src/bin/auth/rbt_datasrc.h
Modified: branches/trac397/src/bin/auth/rbt_datasrc.h
==============================================================================
--- branches/trac397/src/bin/auth/rbt_datasrc.h (original)
+++ branches/trac397/src/bin/auth/rbt_datasrc.h Tue Nov 16 13:09:37 2010
@@ -67,14 +67,14 @@
/// \todo Is it meaningful to return the absolute of the node?
const Name& getName() const {return (name_); }
- // \breif return the data
+ // \breif return the data store in this node
T& getData() { return (data_);}
// \brief return next node whose name is bigger than current node
RBNode<T>* successor();
//@}
/// \name Modify functions
- // \brief return the data stored in the node
+ // \brief set the data stored in the node
void setData(const T& data) { data_ = data;}
private:
@@ -112,9 +112,14 @@
/// data to carry dns info
Name name_;
+ /// this will make type T should have default constructor
+ /// without any parameters
T data_;
RBTree<T>* down_;
- bool is_shadow_; ///the node willn't return to end user, if the node is shadow
+ ///the node willn't return to end user, if the node is shadow
+ ///shadow node is created by rbtree for inner use, it's opaque to
+ ///end user.
+ bool is_shadow_;
};
@@ -201,8 +206,8 @@
public:
/// \brief The return value for the \c find() method
/// - EXACTMATCH: return the node in the tree exactly same with the target
- /// - FINDREFERRAL: return the node which is an ancestor of the target
- /// containing NS record
+ /// - PARTIALMATCH: return the node which is an ancestor of the target
+ /// which also is the longest match
/// - NOTFOUND: other conditions except EXACTMATCH & FINDREFERRAL
enum FindResult{EXACTMATCH, PARTIALMATCH, NOTFOUND};
@@ -440,9 +445,9 @@
// otherwise return 1
if (current->is_shadow_) {
current->is_shadow_ = false;
- return 0;
+ return(0);
} else {
- return 1;
+ return(1);
}
} else {
int common_label_count = compare_result.getCommonLabels();
More information about the bind10-changes
mailing list