Commit 4cecaf0b authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

cleanup: hide section enumbs inside the class.

remove redundant postfix "U"s in enumerator values.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@724 e5f2f494-b856-4b98-b285-d166d9295462
parent dd50aa40
......@@ -399,22 +399,23 @@ Rcode::RESERVED15()
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_;
};
......
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