object changes
This commit is contained in:
@@ -5,22 +5,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace matador::object {
|
||||
// basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
// const std::vector<attribute> &attributes,
|
||||
// utils::identifier &&pk,
|
||||
// const std::shared_ptr<attribute> &pk_as_fk_column)
|
||||
// : node_(std::move(node))
|
||||
// , attributes_(attributes)
|
||||
// , identifier_(std::move(pk))
|
||||
// , pk_as_fk_column_(pk_as_fk_column) {
|
||||
// }
|
||||
//
|
||||
// basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
// const std::vector<attribute> &attributes)
|
||||
// : node_(std::move(node))
|
||||
// , attributes_(attributes) {}
|
||||
|
||||
basic_object_info::basic_object_info(std::shared_ptr<repository_node> node, std::unique_ptr<class object>&& obj)
|
||||
basic_object_info::basic_object_info(std::shared_ptr<repository_node> node, std::shared_ptr<class object>&& obj)
|
||||
: object_(std::move(obj))
|
||||
, node_(std::move(node)) {}
|
||||
|
||||
@@ -32,8 +17,8 @@ std::string basic_object_info::name() const {
|
||||
return node_->name();
|
||||
}
|
||||
|
||||
const class object & basic_object_info::object() const {
|
||||
return *object_;
|
||||
std::shared_ptr<class object> basic_object_info::object() const {
|
||||
return object_;
|
||||
}
|
||||
|
||||
const std::list<attribute>& basic_object_info::attributes() const {
|
||||
@@ -56,7 +41,7 @@ attribute* basic_object_info::primary_key_attribute() const {
|
||||
return object_->primary_key_attribute();
|
||||
}
|
||||
|
||||
void basic_object_info::update_name(const std::string& name) {
|
||||
void basic_object_info::update_name(const std::string& name) const {
|
||||
object_->update_name(name);
|
||||
}
|
||||
|
||||
@@ -112,4 +97,4 @@ std::size_t basic_object_info::endpoints_size() const {
|
||||
bool basic_object_info::endpoints_empty() const {
|
||||
return relation_endpoints_.empty();
|
||||
}
|
||||
} // namespace matador::object
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user