# The following build order must be maintained.
SUBDIRS = exceptions util log hooks cryptolink dns cc asiolink dhcp config stats \
- asiodns testutils dhcp_ddns dhcpsrv cfgrpt
+ asiodns testutils dhcp_ddns dhcpsrv cfgrpt eval
return (output.str());
}
+std::string
+Option::toString() {
+ /// @todo: Implement actual conversion in derived classes.
+ return (toText(0));
+}
+
+
std::string
Option::headerToText(const int indent, const std::string& type_name) {
std::stringstream output;
/// @return string with text representation.
virtual std::string toText(int indent = 0);
+ /// @brief Returns string representation of the value
+ ///
+ /// This is terse repesentation used in cases where client classification
+ /// refers to a specific option.
+ ///
+ /// @return string that represents the value of the option.
+ virtual std::string toString();
+
/// Returns option type (0-255 for DHCPv4, 0-65535 for DHCPv6)
///
/// @return option type
return (output.str());
}
+std::string
+OptionString::toString() {
+ return (getValue());
+}
+
} // end of isc::dhcp namespace
} // end of isc namespace
///
/// @return Option information in the textual format.
virtual std::string toText(int indent = 0);
+
+ /// @brief Returns actual value of the option in string format.
+ ///
+ /// This method is used in client classification.
+ /// @return Content of the option.
+ virtual std::string toString();
};
/// Pointer to the OptionString object.