diff options
| author | Brian Potchik <brian@vector35.com> | 2020-11-21 17:44:49 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2020-11-21 17:44:49 -0500 |
| commit | 20b03bd36ec247b8c28dc1643f57b21ec94c8294 (patch) | |
| tree | 276b6ffb75d62f256b75e2d19b773d9b6964fbe5 /ui/viewframe.h | |
| parent | b24b2a197a2f39ef0f2c5e28253dd55f3c1fffb4 (diff) | |
Allow DockHandler::notifyOffset to provide notification that an IL view information has changed.
Diffstat (limited to 'ui/viewframe.h')
| -rw-r--r-- | ui/viewframe.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/ui/viewframe.h b/ui/viewframe.h index fbab3b21..e0582a59 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -10,11 +10,11 @@ #include <stack> #include <utility> #include <vector> -#include "dockhandler.h" #include "filecontext.h" #include "viewtype.h" #include "action.h" + class BINARYNINJAUIAPI HistoryEntry: public BinaryNinja::RefCountObject { QString m_viewType; @@ -26,12 +26,15 @@ public: void setViewType(const QString& type) { m_viewType = type; } }; + class AssembleDialog; class CompileDialog; +class DockHandler; class FeatureMap; class StatusBarWidget; class ViewNavigationMode; + class BINARYNINJAUIAPI View { protected: @@ -158,7 +161,6 @@ class BINARYNINJAUIAPI ViewLocation bool m_valid = false; QString m_viewType; uint64_t m_offset = 0; - bool m_hasILViewType = false; BNFunctionGraphType m_ilViewType = NormalFunctionGraph; size_t m_instrIndex = BN_INVALID_EXPR; @@ -166,21 +168,30 @@ public: ViewLocation() { } ViewLocation(const QString& viewType, uint64_t offset) : m_valid(true), m_viewType(viewType), m_offset(offset) { } ViewLocation(const QString& viewType, uint64_t offset, BNFunctionGraphType ilViewType) : m_valid(true), - m_viewType(viewType), m_offset(offset), m_hasILViewType(true), m_ilViewType(ilViewType) { } + m_viewType(viewType), m_offset(offset), m_ilViewType(ilViewType) { } ViewLocation(const QString& viewType, uint64_t offset, BNFunctionGraphType ilViewType, size_t instrIndex) : m_valid(true), - m_viewType(viewType), m_offset(offset), m_hasILViewType(true), m_ilViewType(ilViewType), m_instrIndex(instrIndex) { } + m_viewType(viewType), m_offset(offset), m_ilViewType(ilViewType), m_instrIndex(instrIndex) { } bool isValid() const { return m_valid; } QString getViewType() const { return m_viewType; } uint64_t getOffset() const { return m_offset; } - bool hasILViewType() const { return m_hasILViewType; } BNFunctionGraphType getILViewType() const { return m_ilViewType; } size_t getInstrIndex() const { return m_instrIndex; } void setViewType(QString& viewType) { m_viewType = viewType; } void setOffset(uint64_t offset) { m_offset = offset; } - void setILViewType(BNFunctionGraphType ilViewType) { m_hasILViewType = true; m_ilViewType = ilViewType; } + void setILViewType(BNFunctionGraphType ilViewType) { m_ilViewType = ilViewType; } void setInstrIndex(uint64_t index) { m_instrIndex = index; } + + bool operator==(const ViewLocation& other) const + { + return (m_valid == other.m_valid) && + (m_viewType == other.m_viewType) && + (m_offset == other.m_offset) && + (m_ilViewType == other.m_ilViewType) && + (m_instrIndex == other.m_instrIndex); + } + bool operator!=(const ViewLocation& other) const { return !((*this) == other); } }; |
