diff options
author | Marcin Siodelski <marcin@isc.org> | 2014-09-16 17:54:43 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2014-09-16 17:54:43 +0200 |
commit | 31a9ba394107c03767371c5ac045e484ed5404ac (patch) | |
tree | 0d93a8ae4e0e29aacfc5ee131acede7cb93d8765 /src/lib/dhcp/option_definition.cc | |
parent | [master] Added ChangeLog for #3534. (diff) | |
download | kea-31a9ba394107c03767371c5ac045e484ed5404ac.tar.xz kea-31a9ba394107c03767371c5ac045e484ed5404ac.zip |
[3588] Implemented CfgOptionDef class to represent user-defined option defs
Diffstat (limited to 'src/lib/dhcp/option_definition.cc')
-rw-r--r-- | src/lib/dhcp/option_definition.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index f4a205c85c..ba9644acfa 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -92,6 +92,25 @@ OptionDefinition::OptionDefinition(const std::string& name, encapsulated_space_(encapsulated_space) { } +OptionDefinition::OptionDefinition(const OptionDefinition& def) + : name_(def.getName()), + code_(def.getCode()), + type_(def.getType()), + array_type_(def.getArrayType()), + encapsulated_space_(def.getEncapsulatedSpace()), + record_fields_(def.getRecordFields()) { +} + +bool +OptionDefinition::equals(const OptionDefinition& other) const { + return (name_ == other.name_ && + code_ == other.code_ && + type_ == other.type_ && + array_type_ == other.array_type_ && + encapsulated_space_ == other.encapsulated_space_ && + record_fields_ == other.record_fields_); +} + void OptionDefinition::addRecordField(const std::string& data_type_name) { OptionDataType data_type = OptionDataTypeUtil::getDataType(data_type_name); |