BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
parser
include
bearparser
WrappedValue.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "win_hdrs/win_types.h"
4
#include "
CustomException.h
"
5
#include "
AbstractByteBuffer.h
"
6
7
#include <QtCore>
8
9
#include <iostream>
10
#include <stdlib.h>
11
12
class
WrappedValue
{
13
public
:
14
15
enum
data_type
{
16
NONE
= 0,
17
INT
,
18
STRING
,
19
WSTRING
,
20
COMPLEX
,
21
DATATYPE_COUNT
22
};
23
24
WrappedValue
()
25
:
m_Type
(
NONE
),
m_Owner
(NULL),
m_Offset
(
INVALID_ADDR
),
m_Size
(0) {}
26
27
WrappedValue
(
AbstractByteBuffer
*owner,
offset_t
offset,
bufsize_t
size,
data_type
type)
28
:
m_Type
(type),
m_Owner
(owner),
m_Offset
(offset),
m_Size
(size) {}
29
30
data_type
getDataType
() {
return
m_Type
; }
31
QVariant
getQVariant
();
32
QString
toQString
();
33
bool
isValid
() {
return
(
m_Size
!= 0); }
34
35
protected
:
36
virtual
QString
getIntFormat
();
37
38
data_type
m_Type
;
39
AbstractByteBuffer
*
m_Owner
;
40
offset_t
m_Offset
;
41
bufsize_t
m_Size
;
42
};
AbstractByteBuffer.h
bufsize_t
uint32_t bufsize_t
Definition
AbstractByteBuffer.h:14
INVALID_ADDR
const offset_t INVALID_ADDR
Definition
AbstractByteBuffer.h:18
offset_t
uint64_t offset_t
Definition
AbstractByteBuffer.h:17
CustomException.h
AbstractByteBuffer
Definition
AbstractByteBuffer.h:32
WrappedValue
Definition
WrappedValue.h:12
WrappedValue::getQVariant
QVariant getQVariant()
Definition
WrappedValue.cpp:3
WrappedValue::WrappedValue
WrappedValue(AbstractByteBuffer *owner, offset_t offset, bufsize_t size, data_type type)
Definition
WrappedValue.h:27
WrappedValue::getDataType
data_type getDataType()
Definition
WrappedValue.h:30
WrappedValue::isValid
bool isValid()
Definition
WrappedValue.h:33
WrappedValue::m_Owner
AbstractByteBuffer * m_Owner
Definition
WrappedValue.h:39
WrappedValue::data_type
data_type
Definition
WrappedValue.h:15
WrappedValue::INT
@ INT
Definition
WrappedValue.h:17
WrappedValue::NONE
@ NONE
Definition
WrappedValue.h:16
WrappedValue::WSTRING
@ WSTRING
Definition
WrappedValue.h:19
WrappedValue::COMPLEX
@ COMPLEX
Definition
WrappedValue.h:20
WrappedValue::DATATYPE_COUNT
@ DATATYPE_COUNT
Definition
WrappedValue.h:21
WrappedValue::STRING
@ STRING
Definition
WrappedValue.h:18
WrappedValue::m_Offset
offset_t m_Offset
Definition
WrappedValue.h:40
WrappedValue::toQString
QString toQString()
Definition
WrappedValue.cpp:32
WrappedValue::WrappedValue
WrappedValue()
Definition
WrappedValue.h:24
WrappedValue::m_Size
bufsize_t m_Size
Definition
WrappedValue.h:41
WrappedValue::getIntFormat
virtual QString getIntFormat()
Definition
WrappedValue.cpp:26
WrappedValue::m_Type
data_type m_Type
Definition
WrappedValue.h:38
Generated by
1.12.0