Commit a6cf61f7 authored by Stanislav Bohm's avatar Stanislav Bohm

RF: override keyword added

parent 3becffcd
......@@ -12,20 +12,19 @@ public:
Array(const DataVector &items);
~Array();
size_t get_length() {
size_t get_length() override {
return length;
}
size_t get_size();
std::string get_info();
std::shared_ptr<Data> get_at_index(size_t index);
std::shared_ptr<Data> get_slice(size_t from, size_t to);
size_t get_size() override;
std::string get_info() override;
std::shared_ptr<Data> get_at_index(size_t index) override;
std::shared_ptr<Data> get_slice(size_t from, size_t to) override;
std::string get_type_name() const override;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr) override;
std::shared_ptr<Data>& get_ref_at_index(size_t index);
std::string get_type_name() const;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr);
protected:
size_t length;
......@@ -39,9 +38,9 @@ public:
ArrayUnpacker(Worker &worker);
~ArrayUnpacker();
Result on_message(const char *data, size_t size);
Result on_stream_data(const char *data, size_t size, size_t remaining);
std::shared_ptr<Data> finish();
Result on_message(const char *data, size_t size) override;
Result on_stream_data(const char *data, size_t size, size_t remaining) override;
std::shared_ptr<Data> finish() override;
Result unpack_next();
......
......@@ -13,22 +13,22 @@ public:
ExternFile(const std::string &filename);
~ExternFile();
size_t get_size() {
size_t get_size() override {
return size;
}
const char *get_raw_data() const
const char *get_raw_data() const override
{
return data;
}
bool has_raw_data() const {
bool has_raw_data() const override {
return true;
}
std::string get_info();
std::string get_filename() const;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr);
std::string get_info() override;
std::string get_filename() const override;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr) override;
protected:
......
......@@ -21,13 +21,13 @@ public:
~Index();
std::string get_type_name() const;
size_t get_length();
size_t get_size();
std::string get_info();
std::shared_ptr<Data> get_at_index(size_t index);
std::shared_ptr<Data> get_slice(size_t from, size_t to);
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr);
std::string get_type_name() const override;
size_t get_length() override;
size_t get_size() override;
std::string get_info() override;
std::shared_ptr<Data> get_at_index(size_t index) override;
std::shared_ptr<Data> get_slice(size_t from, size_t to) override;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr) override;
protected:
......@@ -45,8 +45,8 @@ public:
IndexUnpacker();
~IndexUnpacker();
Result on_message(const char *data, size_t size);
std::shared_ptr<Data> finish();
Result on_message(const char *data, size_t size) override;
std::shared_ptr<Data> finish() override;
};
}
......
......@@ -12,13 +12,13 @@ public:
RawData();
~RawData();
std::string get_type_name() const;
std::string get_type_name() const override;
size_t get_size() {
size_t get_size() override {
return size;
}
const char *get_raw_data() const
const char *get_raw_data() const override
{
if (data == nullptr) {
open();
......@@ -26,11 +26,14 @@ public:
return data;
}
bool has_raw_data() const {
bool has_raw_data() const override {
return true;
}
std::string get_info();
std::string get_info() override;
std::string get_filename() const override;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr) override;
char* init_empty(const std::string &work_dir, size_t size);
void init_from_string(const std::string &work_dir, const std::string &str);
......@@ -38,8 +41,6 @@ public:
void init_from_file(const std::string &work_dir);
void assign_filename(const std::string &work_dir);
std::string get_filename() const;
size_t serialize(Worker &worker, loom::base::SendBuffer &buffer, std::shared_ptr<Data> &data_ptr);
protected:
......@@ -60,9 +61,9 @@ public:
RawDataUnpacker(Worker &worker);
~RawDataUnpacker();
Result get_initial_mode();
Result on_stream_data(const char *data, size_t size, size_t remaining);
std::shared_ptr<Data> finish();
Result get_initial_mode() override;
Result on_stream_data(const char *data, size_t size, size_t remaining) override;
std::shared_ptr<Data> finish() override;
private:
std::shared_ptr<Data> result;
char* ptr;
......
......@@ -9,7 +9,7 @@ class ArrayMakeTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
}
......
......@@ -9,7 +9,7 @@ class GetTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
......@@ -17,7 +17,7 @@ class SliceTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
......@@ -25,14 +25,14 @@ class SizeTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
class LengthTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
}
......
......@@ -10,8 +10,7 @@ class PyCallJob : public loom::ThreadJob
public:
PyCallJob(Worker &worker, Task &task);
void start(loom::DataVector &inputs);
std::shared_ptr<loom::Data> run();
std::shared_ptr<loom::Data> run() override;
private:
void set_python_error();
};
......
......@@ -10,7 +10,7 @@ class ConstTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
......@@ -20,7 +20,7 @@ public:
using ThreadJob::ThreadJob;
bool check_run_in_thread();
std::shared_ptr<loom::Data> run();
std::shared_ptr<loom::Data> run() override;
};
......@@ -28,7 +28,7 @@ class OpenTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
......@@ -36,7 +36,7 @@ class SplitTask : public loom::TaskInstance
{
public:
using TaskInstance::TaskInstance;
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
};
}
......
......@@ -10,7 +10,7 @@ class RunTask : public loom::TaskInstance
public:
RunTask(loom::Worker &worker, std::unique_ptr<loom::Task> task);
~RunTask();
void start(loom::DataVector &inputs);
void start(loom::DataVector &inputs) override;
private:
......
......@@ -25,7 +25,7 @@ public:
work.data = this;
}
virtual void start(DataVector &input_data) {
virtual void start(DataVector &input_data) override {
job.set_inputs(input_data);
if (job.check_run_in_thread()) {
UV_CHECK(uv_queue_work(worker.get_loop(), &work, _work_cb, _after_work_cb));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment