Commit 38f6368c authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Streams can now be created from resources

Initial implementation of a basic I/O task
parent d60553b6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -67,11 +67,16 @@ liburd_aux_la_SOURCES = \
	logger.hpp \
	make-unique.hpp \
	resources.hpp \
	resources/local-path.cpp \
	resources/local-path.hpp \
	resources/make-resource.hpp \
	resources/make-stream.hpp \
	resources/memory-buffer.cpp \
	resources/memory-buffer.hpp \
	resources/remote-path.cpp \
	resources/remote-path.hpp \
	resources/resource.hpp \
	resources/resource-info.hpp \
	resources/shared-path.cpp \
	resources/shared-path.hpp \
	settings.cpp \
	settings.hpp \
+3 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@
#include <memory>
#include <boost/preprocessor/cat.hpp>

#include "resources/resource-info.hpp"
//#include "resources/resource-info.hpp"
#include "resources/resource.hpp"

namespace storage {

@@ -48,6 +49,7 @@ public:
    virtual void write_data() const = 0;

    virtual bool accepts(resource_info_ptr res) const = 0;
    virtual bool contains(resource_info_ptr res) const = 0;

    virtual std::string to_string() const = 0;

+4 −0
Original line number Diff line number Diff line
@@ -51,6 +51,10 @@ bool lustre::accepts(resource_info_ptr res) const {
    }
}

bool lustre::contains(resource_info_ptr res) const {
    return true; //XXX do actual check
}

void lustre::read_data() const {
}

+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public:
    std::string mount() const override;
    uint32_t quota() const override;
    bool accepts(resource_info_ptr res) const override;
    bool contains(resource_info_ptr res) const override;
    void read_data() const override;
    void write_data() const override;
    std::string to_string() const override;
+4 −0
Original line number Diff line number Diff line
@@ -50,6 +50,10 @@ bool nvml_dax::accepts(resource_info_ptr res) const {
    }
}

bool nvml_dax::contains(resource_info_ptr res) const {
    return true; //XXX do actual check
}

void nvml_dax::read_data() const {
}

Loading