|
|
@ -48,11 +48,15 @@ struct ModifyAttr : OpUpdateRecord {
|
|
|
|
boost::any default_value_;
|
|
|
|
boost::any default_value_;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
struct NewAttr : OpUpdateRecord {
|
|
|
|
struct NewAttr : OpUpdateRecord {
|
|
|
|
NewAttr(const std::string& name, const std::string& remark)
|
|
|
|
NewAttr(const std::string& name, const std::string& remark,
|
|
|
|
: OpUpdateRecord({Type::kNewAttr, remark}), name_(name) {}
|
|
|
|
boost::any default_value)
|
|
|
|
|
|
|
|
: OpUpdateRecord({Type::kNewAttr, remark}),
|
|
|
|
|
|
|
|
name_(name),
|
|
|
|
|
|
|
|
default_value_(default_value) {}
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
std::string name_;
|
|
|
|
std::string name_;
|
|
|
|
|
|
|
|
boost::any default_value_;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class OpVersionDesc {
|
|
|
|
class OpVersionDesc {
|
|
|
@ -64,9 +68,10 @@ class OpVersionDesc {
|
|
|
|
return *this;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OpVersionDesc& NewAttr(const std::string& name, const std::string& remark) {
|
|
|
|
OpVersionDesc& NewAttr(const std::string& name, const std::string& remark,
|
|
|
|
infos_.push_back(
|
|
|
|
boost::any default_value) {
|
|
|
|
std::shared_ptr<OpUpdateRecord>(new compatible::NewAttr(name, remark)));
|
|
|
|
infos_.push_back(std::shared_ptr<OpUpdateRecord>(
|
|
|
|
|
|
|
|
new compatible::NewAttr(name, remark, default_value)));
|
|
|
|
return *this;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|