Clean out some bugs in sender
This commit is contained in:
+12
-4
@@ -1,6 +1,7 @@
|
||||
#ifndef KEYSTROKE_HPP
|
||||
#define KEYSTROKE_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -9,10 +10,17 @@ using namespace std;
|
||||
class KeyStroke
|
||||
{
|
||||
public:
|
||||
void subtract( KeyStroke * const ) {}
|
||||
string diff_from( KeyStroke const &, int ) { return ""; }
|
||||
void apply_string( string ) {}
|
||||
bool operator==( KeyStroke const & ) const { return true; }
|
||||
deque<char> user_bytes;
|
||||
|
||||
KeyStroke() : user_bytes() {}
|
||||
|
||||
void key_hit( char x ) { user_bytes.push_back( x ); }
|
||||
|
||||
/* interface for Network::Transport */
|
||||
void subtract( KeyStroke * const prefix );
|
||||
string diff_from( KeyStroke const & existing, int length_limit );
|
||||
void apply_string( string diff );
|
||||
bool operator==( KeyStroke const &x ) const { return user_bytes == x.user_bytes; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user