]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/memory.h
Add move semantics to Variant
[libs/core.git] / source / io / memory.h
index 75cf7f5a6056ff052ebef19b4622692f6bf138d5..e009cfdd24965d701d745e4dd865734615d4e85c 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_IO_MEMORY_H_
 #define MSP_IO_MEMORY_H_
 
+#include <msp/core/mspcore_api.h>
 #include "seekable.h"
 
 namespace Msp {
 namespace IO {
 
-class Memory: public Seekable
+class MSPCORE_API Memory: public Seekable
 {
 private:
        char *begin = nullptr;
@@ -14,10 +15,10 @@ private:
        char *pos = nullptr;
 
 public:
-       Memory(char *d, std::size_t s, Mode m = M_RDWR): Memory(d, d+s, m) { }
+       Memory(char *d, std::size_t s, Mode m = M_RDWR);
        Memory(char *, char *, Mode = M_RDWR);
-       Memory(const char *d, std::size_t s): Memory(const_cast<char *>(d), const_cast<char *>(d+s), M_READ) { }
-       Memory(const char *b, const char *e): Memory(const_cast<char *>(b), const_cast<char *>(e), M_READ) { }
+       Memory(const char *d, std::size_t s);
+       Memory(const char *b, const char *e);
 
        void set_block(bool) override;
        void set_inherit(bool) override;