screen: rename BasicScreen to BaseScreen

This commit is contained in:
Andrzej Rybczak
2012-09-16 03:08:02 +02:00
parent e2c1c6f365
commit f691ab265f
12 changed files with 41 additions and 41 deletions

View File

@@ -27,7 +27,7 @@
#include "actions.h"
#include "strbuffer.h"
struct BasicScreen; // forward declaration for screens sequence
struct BaseScreen; // forward declaration for screens sequence
enum SortMode { smName, smMTime, smCustomFormat };
@@ -50,20 +50,20 @@ struct ScreenRef
{
ScreenRef() : m_ptr(0) { }
template <typename ScreenT>
ScreenRef(ScreenT *&ptr) : m_ptr(reinterpret_cast<BasicScreen **>(&ptr)) { }
ScreenRef(ScreenT *&ptr) : m_ptr(reinterpret_cast<BaseScreen **>(&ptr)) { }
BasicScreen &operator*() const { return **m_ptr; }
BasicScreen *operator->() const { return *m_ptr; }
BaseScreen &operator*() const { return **m_ptr; }
BaseScreen *operator->() const { return *m_ptr; }
bool operator==(const ScreenRef &rhs) const { return m_ptr == rhs.m_ptr; }
bool operator!=(const ScreenRef &rhs) const { return m_ptr != rhs.m_ptr; }
bool operator==(const BasicScreen *rhs) const { return *m_ptr == rhs; }
bool operator!=(const BasicScreen *rhs) const { return *m_ptr != rhs; }
bool operator==(const BaseScreen *rhs) const { return *m_ptr == rhs; }
bool operator!=(const BaseScreen *rhs) const { return *m_ptr != rhs; }
operator bool() { return m_ptr != 0; }
private:
BasicScreen **m_ptr;
BaseScreen **m_ptr;
};
struct Configuration