diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-05 15:00:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-05 15:02:18 +0200 |
commit | 8488de0d5bdf95334cd2e61927515ca98f80344f (patch) | |
tree | 9c7816353f46f27d34ba37a6794918bf7d82ccf2 | |
parent | 8360a96ff5cfa251ea9d07cdd1c4d4f1fa3a2839 (diff) |
Add ability to mark unloaded section as loaded
Can be useful to skip loading state that is going to be overwritten.
-rw-r--r-- | odb/section.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/odb/section.hxx b/odb/section.hxx index 93c5d66..c6f0da7 100644 --- a/odb/section.hxx +++ b/odb/section.hxx @@ -32,6 +32,15 @@ namespace odb state_.restore = 0; } + // Mark an unloaded section as loaded. This, for example, can be useful if + // you don't want to load the old data before overwriting it with update(). + // + void + load () + { + state_.loaded = 1; + } + // Change state. // bool |