Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef EDITOR_DATA_CONTROLLER_H
#define EDITOR_DATA_CONTROLLER_H
#include <vector>
#include <string>
class EditorDataController
{
public:
EditorDataController();
~EditorDataController();
void DeleteCharacter(int row, int column);
void DeleteNewLine(int row);
char GetCharAt(int row, int col);
std::string GetLine(int row);
int GetLineLength(int row);
std::string GetLineSegment(int row, int x0, int x1);
int GetNumLines() { return buffer.size(); }
void InsertCharacter(char c,int row, int column);
void InsertNewLine(int row, int column);
void ResetBuffer();
// File Management Methods
int SaveFile(std::string fname);
int LoadFile(std::string fname);
private:
void ClearBuffer();
std::vector<std::string*> buffer;
};
#endif /* EDITOR_DATA_CONTROLLER_H */