20#ifndef MS_CACHE_FILE_HPP
21#define MS_CACHE_FILE_HPP
32namespace matrix_science {
39 class ms_cache_stream;
42 struct ms_cache_record
47 inline ms_cache_record()
55 class MS_MASCOTRESFILE_API ms_cache_file :
59 static const unsigned OPEN_FLAG_READ_ONLY = 1;
65 bool open(
const std::string & filename,
unsigned flags = 0);
69 bool readStream(ms_cache_stream * stream);
70 bool writeStream(ms_cache_stream * stream);
71 bool deleteStream(ms_cache_stream * stream);
73 std::string getFileName()
const {
return filename_; }
77 ms_cache_file(
const ms_cache_file & src);
78 ms_cache_file& operator=(
const ms_cache_file & right);
81 INT64 lastAssignedId_;
83 std::string filename_;
86 std::map<INT64, ms_cache_record> recordMap_;