[svn] commit: r724 - /branches/parkinglot/src/lib/dns/cpp/message.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Feb 4 23:13:31 UTC 2010
Author: jinmei
Date: Thu Feb 4 23:13:31 2010
New Revision: 724
Log:
cleanup: hide section enumbs inside the class.
remove redundant postfix "U"s in enumerator values.
Modified:
branches/parkinglot/src/lib/dns/cpp/message.h
Modified: branches/parkinglot/src/lib/dns/cpp/message.h
==============================================================================
--- branches/parkinglot/src/lib/dns/cpp/message.h (original)
+++ branches/parkinglot/src/lib/dns/cpp/message.h Thu Feb 4 23:13:31 2010
@@ -399,22 +399,23 @@
class Section {
public:
+ /// \brief Returns the relative position of the \c Section in DNS messages.
unsigned int getCode() const { return (code_); }
bool operator==(const Section& other) const
{ return (code_ == other.code_); }
-
- enum {
- SECTION_QUESTION = 0U,
- SECTION_ANSWER = 1U,
- SECTION_AUTHORITY = 2U,
- SECTION_ADDITIONAL = 3U
- };
static const Section& QUESTION();
static const Section& ANSWER();
static const Section& AUTHORITY();
static const Section& ADDITIONAL();
private:
+ enum {
+ SECTION_QUESTION = 0,
+ SECTION_ANSWER = 1,
+ SECTION_AUTHORITY = 2,
+ SECTION_ADDITIONAL = 3
+ };
+
Section(int code) : code_(code) {}
unsigned int code_;
};
More information about the bind10-changes
mailing list