Skip to content

Commit

Permalink
BaseAdapter: Make use of a setter method
Browse files Browse the repository at this point in the history
  • Loading branch information
illdefined committed Feb 18, 2012
1 parent 5a3728b commit 7bb3488
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/BaseAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class BaseAdapter {
BaseAdapter(ev::loop_ref&);

public:
virtual void purge(const char* keys) = 0;
void setPatterns(std::vector<std::string> const&);

virtual void purge() = 0;
};

#endif
8 changes: 7 additions & 1 deletion src/BaseAdapter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#include "BaseAdapter.h"

BaseAdapter::BaseAdapter(ev::loop_ref& loop)
: loop(loop) {
: loop(loop) {
}

void BaseAdapter::setPatterns(std::vector<std::string> const& patterns) {
/* This is one of the reasons why some people suffix
* member variables with underscores */
this->patterns = patterns;
}

0 comments on commit 7bb3488

Please sign in to comment.