diff options
| author | Jan Tuomi <jan-sebastian.tuomi@aalto.fi> | 2016-10-09 12:37:24 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan-sebastian.tuomi@aalto.fi> | 2016-10-09 14:50:24 +0300 |
| commit | 88996781bd89825501ae18a1ce6e7744e767db86 (patch) | |
| tree | 93807aa846be32728c6bb2c553971a669370a5cf | |
| parent | 3461d6dfc348b1814376669518f2dcbb114ab9c8 (diff) | |
Add editor class
| -rw-r--r-- | editor.cpp | 9 | ||||
| -rw-r--r-- | editor.h | 14 | ||||
| -rw-r--r-- | main.cpp | 4 |
3 files changed, 27 insertions, 0 deletions
diff --git a/editor.cpp b/editor.cpp new file mode 100644 index 0000000..b7ed487 --- /dev/null +++ b/editor.cpp @@ -0,0 +1,9 @@ +#include "editor.h" + +Editor::Editor(std::string* contents) { + m_contents = contents; +} + +int Editor::run_editor() { + return 0; +} diff --git a/editor.h b/editor.h new file mode 100644 index 0000000..491c3fb --- /dev/null +++ b/editor.h @@ -0,0 +1,14 @@ +#ifndef EDITOR_H +#define EDITOR_H +#include <string> +#include <iostream> + +class Editor { + public: + Editor(std::string* contents); + int run_editor(); + private: + std::string* m_contents; +}; + +#endif @@ -1,6 +1,7 @@ #include <iostream> #include <fstream> #include <string> +#include "editor.h" std::string* read_file(const std::string& filename) { std::ifstream file(filename); @@ -31,6 +32,9 @@ int main(int argc, char** argv) { return 1; } + Editor editor(contents); + editor.run_editor(); + delete contents; return 0; |
