File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2017-2020 the nyan authors, LGPLv3+. See copying.md for legal info.
1+ // Copyright 2017-2025 the nyan authors, LGPLv3+. See copying.md for legal info.
22
33#include " view.h"
44
@@ -25,6 +25,13 @@ Object View::get_object(const fqon_t &fqon) {
2525 return Object{fqon, shared_from_this ()};
2626}
2727
28+ const std::shared_ptr<Object> View::get_object_ptr (const fqon_t &fqon) {
29+ // test for object existence
30+ this ->get_info (fqon);
31+
32+ return std::make_shared<Object>(Object::Restricted{}, fqon, shared_from_this ());
33+ }
34+
2835
2936const std::shared_ptr<ObjectState> &View::get_raw (const fqon_t &fqon, order_t t) const {
3037 auto state = this ->state .get_obj_state (fqon, t);
Original file line number Diff line number Diff line change 1- // Copyright 2017-2020 the nyan authors, LGPLv3+. See copying.md for legal info.
1+ // Copyright 2017-2025 the nyan authors, LGPLv3+. See copying.md for legal info.
22#pragma once
33
44#include < memory>
@@ -31,6 +31,7 @@ class View : public std::enable_shared_from_this<View> {
3131 View (const std::shared_ptr<Database> &database);
3232
3333 Object get_object (const fqon_t &fqon);
34+ const std::shared_ptr<Object> get_object_ptr (const fqon_t &fqon);
3435
3536 const std::shared_ptr<ObjectState> &get_raw (const fqon_t &fqon, order_t t = LATEST_T) const ;
3637
You can’t perform that action at this time.
0 commit comments