Skip to content

Instantly share code, notes, and snippets.

@biot023
Created September 2, 2012 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biot023/3597227 to your computer and use it in GitHub Desktop.
Save biot023/3597227 to your computer and use it in GitHub Desktop.
#pragma once
namespace poc {
template <typename T>
struct IPoc
{
virtual ~IPoc() {}
virtual const bool operator() () = 0;
virtual void abstract_method() const = 0;
};
template <typename T>
class Poc : public IPoc<T>
{
public:
virtual const bool operator() () {
return ( _do_subtask1() && _do_subtask2() );
}
protected:
virtual const bool _do_subtask1() { return false; }
virtual const bool _do_subtask2() = 0;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment