aboutsummaryrefslogtreecommitdiff
path: root/odb/context.ixx
blob: 20107e71053a1344ee7577d85da86570004355e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// file      : odb/context.ixx
// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license   : GNU GPL v3; see accompanying LICENSE file

inline bool user_section::
load_empty () const
{
  return !separate_load () || (total == 0 && !containers && !optimistic ());
}

inline bool user_section::
update_empty () const
{
  return total == inverse + readonly && !readwrite_containers;
}

inline bool user_section::
optimistic () const
{
  if (!context::optimistic (*object))
    return false;
  else
  {
    semantics::class_* poly_root (context::polymorphic (*object));
    return poly_root == 0 || poly_root == object;
  }
}