object generation
This commit is contained in:
@@ -21,7 +21,15 @@ public:
|
||||
auto obj = std::make_unique<object>(std::move(name), std::move(alias));
|
||||
obj->attributes_ = std::move(attribute_generator::generate<Type>(repo, *obj));
|
||||
obj->constraints_ = std::move(constraints_generator::generate<Type>(repo, *obj));
|
||||
return std::move(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
static std::unique_ptr<object> generate(const repository& repo, std::string name, std::string alias = "") {
|
||||
auto obj = std::make_unique<object>(std::move(name), std::move(alias));
|
||||
obj->attributes_ = std::move(attribute_generator::generate<Type>(repo, *obj));
|
||||
obj->constraints_ = std::move(constraints_generator::generate<Type>(repo, *obj));
|
||||
return obj;
|
||||
}
|
||||
|
||||
static const attribute& create_attribute(std::string name, object& obj);
|
||||
|
||||
Reference in New Issue
Block a user