aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file-cache.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-17 08:41:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-17 08:41:34 +0200
commite33c0e75d468fcbd78197b27c2e9cc981045ddd9 (patch)
tree599bf6362a87584a666976fbf05227c361c787c9 /libbuild2/file-cache.ixx
parente89205dd0cab3f64c21ebe09873efb6f23057f5f (diff)
Move file cache inline functions out of interface
Diffstat (limited to 'libbuild2/file-cache.ixx')
-rw-r--r--libbuild2/file-cache.ixx82
1 files changed, 82 insertions, 0 deletions
diff --git a/libbuild2/file-cache.ixx b/libbuild2/file-cache.ixx
index 259d348..6d73387 100644
--- a/libbuild2/file-cache.ixx
+++ b/libbuild2/file-cache.ixx
@@ -5,6 +5,61 @@
namespace build2
{
+ // file_cache::write
+ //
+ inline void file_cache::write::
+ close ()
+ {
+ }
+
+ // file_cache::read
+ //
+ inline file_cache::read::
+ ~read ()
+ {
+ }
+
+ // file_cache::entry
+ //
+ inline const path& file_cache::entry::
+ path () const
+ {
+ return path_;
+ }
+
+ inline file_cache::write file_cache::entry::
+ init_new ()
+ {
+ return write ();
+ }
+
+ inline void file_cache::entry::
+ init_existing ()
+ {
+ }
+
+ inline file_cache::read file_cache::entry::
+ open ()
+ {
+ return read ();
+ }
+
+ inline void file_cache::entry::
+ pin ()
+ {
+ }
+
+ inline void file_cache::entry::
+ unpin ()
+ {
+ }
+
+ inline file_cache::entry::
+ operator bool () const
+ {
+ return !path_.empty ();
+ }
+
inline file_cache::entry::
entry (path_type p, bool t)
: temporary (t), path_ (move (p))
@@ -35,4 +90,31 @@ namespace build2
}
return *this;
}
+
+ // file_cache
+ //
+ inline file_cache::entry file_cache::
+ create (path f, optional<bool>)
+ {
+ return entry (move (f), true /* temporary */);
+ }
+
+ inline file_cache::entry file_cache::
+ create_existing (path f)
+ {
+ entry e (move (f), false /* temporary */);
+ e.init_existing ();
+ return e;
+ }
+
+ inline string file_cache::
+ compressed_extension (const char*)
+ {
+ return string ();
+ }
+
+ inline file_cache::
+ file_cache (scheduler&)
+ {
+ }
}