aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file-cache.ixx
diff options
context:
space:
mode:
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&)
+ {
+ }
}