Skip to content

Commit

Permalink
Add ConstObj::get_object_id()
Browse files Browse the repository at this point in the history
Change-Id: If858d07c61c050a66463cbeb5e68e9d20661e4b9
  • Loading branch information
jedelbo committed Oct 16, 2019
1 parent 3c75a00 commit 84f0b12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/realm/obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ ConstObj::ConstObj(const ClusterTree* tree_top, MemRef mem, ObjKey key, size_t r
m_storage_version = tree_top->get_storage_version(m_instance_version);
}

ObjectID ConstObj::get_object_id() const
{
return m_table->get_object_id(m_key);
}

const ClusterTree* ConstObj::get_tree_top() const
{
return &m_table->m_clusters;
Expand Down
3 changes: 3 additions & 0 deletions src/realm/obj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Replication;
class TableView;
class ConstLstBase;
class LstBase;
struct ObjectID;

template <class>
class ConstLstIf;
Expand Down Expand Up @@ -76,6 +77,8 @@ class ConstObj {
return m_key;
}

ObjectID get_object_id() const;

const Table* get_table() const
{
return m_table;
Expand Down

0 comments on commit 84f0b12

Please sign in to comment.