10
10
#include < stack>
11
11
#include < utility>
12
12
#include < vector>
13
- #include " dockhandler.h"
14
13
#include " filecontext.h"
15
14
#include " viewtype.h"
16
15
#include " action.h"
17
16
17
+
18
18
class BINARYNINJAUIAPI HistoryEntry: public BinaryNinja::RefCountObject
19
19
{
20
20
QString m_viewType;
@@ -26,12 +26,15 @@ class BINARYNINJAUIAPI HistoryEntry: public BinaryNinja::RefCountObject
26
26
void setViewType (const QString& type) { m_viewType = type; }
27
27
};
28
28
29
+
29
30
class AssembleDialog ;
30
31
class CompileDialog ;
32
+ class DockHandler ;
31
33
class FeatureMap ;
32
34
class StatusBarWidget ;
33
35
class ViewNavigationMode ;
34
36
37
+
35
38
class BINARYNINJAUIAPI View
36
39
{
37
40
protected:
@@ -158,29 +161,37 @@ class BINARYNINJAUIAPI ViewLocation
158
161
bool m_valid = false ;
159
162
QString m_viewType;
160
163
uint64_t m_offset = 0 ;
161
- bool m_hasILViewType = false ;
162
164
BNFunctionGraphType m_ilViewType = NormalFunctionGraph;
163
165
size_t m_instrIndex = BN_INVALID_EXPR;
164
166
165
167
public:
166
168
ViewLocation () { }
167
169
ViewLocation (const QString& viewType, uint64_t offset) : m_valid(true ), m_viewType(viewType), m_offset(offset) { }
168
170
ViewLocation (const QString& viewType, uint64_t offset, BNFunctionGraphType ilViewType) : m_valid(true ),
169
- m_viewType (viewType), m_offset(offset), m_hasILViewType( true ), m_ilViewType(ilViewType) { }
171
+ m_viewType (viewType), m_offset(offset), m_ilViewType(ilViewType) { }
170
172
ViewLocation (const QString& viewType, uint64_t offset, BNFunctionGraphType ilViewType, size_t instrIndex) : m_valid(true ),
171
- m_viewType(viewType), m_offset(offset), m_hasILViewType( true ), m_ilViewType(ilViewType), m_instrIndex(instrIndex) { }
173
+ m_viewType(viewType), m_offset(offset), m_ilViewType(ilViewType), m_instrIndex(instrIndex) { }
172
174
173
175
bool isValid () const { return m_valid; }
174
176
QString getViewType () const { return m_viewType; }
175
177
uint64_t getOffset () const { return m_offset; }
176
- bool hasILViewType () const { return m_hasILViewType; }
177
178
BNFunctionGraphType getILViewType () const { return m_ilViewType; }
178
179
size_t getInstrIndex () const { return m_instrIndex; }
179
180
180
181
void setViewType (QString& viewType) { m_viewType = viewType; }
181
182
void setOffset (uint64_t offset) { m_offset = offset; }
182
- void setILViewType (BNFunctionGraphType ilViewType) { m_hasILViewType = true ; m_ilViewType = ilViewType; }
183
+ void setILViewType (BNFunctionGraphType ilViewType) { m_ilViewType = ilViewType; }
183
184
void setInstrIndex (uint64_t index) { m_instrIndex = index; }
185
+
186
+ bool operator ==(const ViewLocation& other) const
187
+ {
188
+ return (m_valid == other.m_valid ) &&
189
+ (m_viewType == other.m_viewType ) &&
190
+ (m_offset == other.m_offset ) &&
191
+ (m_ilViewType == other.m_ilViewType ) &&
192
+ (m_instrIndex == other.m_instrIndex );
193
+ }
194
+ bool operator !=(const ViewLocation& other) const { return !((*this ) == other); }
184
195
};
185
196
186
197
0 commit comments