22 #ifndef _HDF5SERIE_FILE_H_
23 #define _HDF5SERIE_FILE_H_
25 #include <hdf5serie/group.h>
26 #include <boost/filesystem.hpp>
27 #include <boost/date_time/posix_time/posix_time_types.hpp>
28 #include <boost/shared_ptr.hpp>
31 namespace interprocess {
33 class windows_shared_memory;
35 class shared_memory_object;
38 class interprocess_mutex;
39 class interprocess_condition;
55 File(
const boost::filesystem::path &filename, FileAccess type_);
58 static void reopenAllFilesAsSWMR();
59 static int getDefaultCompression() {
return defaultCompression; }
60 static void setDefaultCompression(
int comp) { defaultCompression=comp; }
61 static int getDefaultChunkSize() {
return defaultChunkSize; }
62 static void setDefaultChunkSize(
int chunk) { defaultChunkSize=chunk; }
66 void requestWriterFlush();
67 bool waitForWriterFlush();
69 void flushIfRequested();
70 static void flushAllFiles();
71 static void flushAllFilesIfRequested();
72 void refreshAfterWriterFlush();
73 static void refreshAllFiles();
74 static void refreshFilesAfterWriterFlush(
const std::set<H5::File*> &files);
75 static void refreshAllFilesAfterWriterFlush();
78 boost::filesystem::path filename;
79 std::string interprocessName;
81 boost::shared_ptr<boost::interprocess::windows_shared_memory> shm;
83 boost::shared_ptr<boost::interprocess::shared_memory_object> shm;
85 boost::shared_ptr<boost::interprocess::mapped_region> shmmap;
87 boost::interprocess::interprocess_mutex *mutex;
88 boost::interprocess::interprocess_condition *cond;
89 boost::posix_time::ptime flushRequestTime;
96 static int defaultCompression;
97 static int defaultChunkSize;
99 static std::set<File*> writerFiles;
100 static std::set<File*> readerFiles;
101 std::string interprocessName;
103 void addFileToNotifyOnRefresh(
const boost::filesystem::path &filename);
104 std::vector<IPC> ipcAdd;
Definition: interface.h:238