1
0
mirror of synced 2024-11-24 15:50:16 +01:00

Cleanup view classes

This commit is contained in:
WerWolv 2020-11-11 09:28:44 +01:00
parent 6f59955c92
commit 362125e933
6 changed files with 25 additions and 23 deletions

View File

@ -6,8 +6,8 @@ namespace hex::prv {
class Provider {
public:
Provider() { }
virtual ~Provider() { }
Provider() = default;
virtual ~Provider() = default;
virtual bool isAvailable() = 0;
virtual bool isReadable() = 0;

View File

@ -4,17 +4,17 @@
#include <cstdio>
#include "providers/provider.hpp"
namespace hex {
namespace prv { class Provider; }
class ViewHashes : public View {
public:
ViewHashes(prv::Provider* &dataProvider);
virtual ~ViewHashes();
explicit ViewHashes(prv::Provider* &dataProvider);
~ViewHashes() override;
virtual void createView() override;
virtual void createMenu() override;
void createView() override;
void createMenu() override;
private:
prv::Provider* &m_dataProvider;

View File

@ -14,17 +14,17 @@
#include "views/highlight.hpp"
#include "providers/provider.hpp"
namespace hex {
namespace prv { class Provider; }
class ViewHexEditor : public View {
public:
ViewHexEditor(prv::Provider* &dataProvider, std::vector<Highlight> &highlights);
virtual ~ViewHexEditor();
~ViewHexEditor() override;
virtual void createView() override;
virtual void createMenu() override;
void createView() override;
void createMenu() override;
private:
MemoryEditor m_memoryEditor;

View File

@ -14,11 +14,11 @@ namespace hex {
class ViewPattern : public View {
public:
ViewPattern(std::vector<Highlight> &highlights);
virtual ~ViewPattern();
explicit ViewPattern(std::vector<Highlight> &highlights);
~ViewPattern() override;
virtual void createMenu() override;
virtual void createView() override;
void createMenu() override;
void createView() override;
private:
char *m_buffer;

View File

@ -10,17 +10,17 @@
#include <tuple>
#include <cstdio>
#include "providers/provider.hpp"
namespace hex {
namespace prv { class Provider; }
class ViewPatternData : public View {
public:
ViewPatternData(prv::Provider* &dataProvider, std::vector<Highlight> &highlights);
virtual ~ViewPatternData();
~ViewPatternData() override;
virtual void createView() override;
virtual void createMenu() override;
void createView() override;
void createMenu() override;
private:
prv::Provider* &m_dataProvider;

View File

@ -8,7 +8,6 @@
#include "providers/provider.hpp"
#include <tuple>
#include <vector>
int main() {
@ -26,5 +25,8 @@ int main() {
window.loop();
if (dataProvider != nullptr)
delete dataProvider;
return 0;
}