8#ifndef KUNAI_DEX_PARSER_FIELDS_HPP
9#define KUNAI_DEX_PARSER_FIELDS_HPP
11#include "Kunai/DEX/parser/types.hpp"
12#include "Kunai/DEX/parser/strings.hpp"
13#include "Kunai/Utils/kunaistream.hpp"
36 std::string pretty_name;
46 : class_(class_), type_(type_), name_(name_)
52 this->encoded_field = encoded_field;
55 EncodedField* get_encoded_field()
110 using fieldid_t = std::unique_ptr<FieldID>;
116 std::vector<fieldid_t> fields;
119 std::uint32_t fields_size;
138 std::uint32_t fields_offset,
139 std::uint32_t fields_size
Represents the base class of a Type in the DVM we have different types.
Definition types.hpp:26
Class that represent field information it contains a FieldID and also the access flags.
Definition encoded.hpp:266
FieldID represent one of the fields from the DEX file.
Definition fields.hpp:28
DVMType * get_class()
Get a pointer to the class where field is.
Definition fields.hpp:72
std::string & pretty_field()
Get a string representation of the field.
~FieldID()=default
Destructor of the FieldID.
const DVMType * get_class() const
Get a constant pointer to the class where field is.
Definition fields.hpp:65
const std::string & get_name() const
Get a constant reference to the name of the field.
Definition fields.hpp:93
const DVMType * get_type() const
Get a constant pointer to the type of the field.
Definition fields.hpp:79
FieldID(DVMType *class_, DVMType *type_, std::string &name_)
Constructor of the FieldID.
Definition fields.hpp:45
DVMType * get_type()
Get a pointer to the type of the field.
Definition fields.hpp:86
std::string & get_name()
Get a reference to the name of the field.
Definition fields.hpp:100
Fields will contain all the FieldID from the DEX file.
Definition fields.hpp:114
friend std::ostream & operator<<(std::ostream &os, const Fields &entry)
Give a pretty print result of the fields.
const std::vector< fieldid_t > & get_fields() const
Get a constant reference to all the fields.
Definition fields.hpp:144
std::vector< fieldid_t > & get_fields()
Get a reference to all the fields.
Definition fields.hpp:151
Fields()=default
Constructor of Fields, default.
~Fields()=default
Destructor of Fields, default.
std::uint32_t get_number_of_fields() const
Get the number of the fields.
Definition fields.hpp:163
void parse_fields(stream::KunaiStream *stream, Types *types, Strings *strings, std::uint32_t fields_offset, std::uint32_t fields_size)
Parse all the field ids objects.
FieldID * get_field(std::uint32_t pos)
Get one of the fields by its position.
void to_xml(std::ofstream &fos)
Print the fields into an XML format.
Storage class for all the strings of the DEX file.
Definition strings.hpp:34
Class to manage an input file stream given for the analysis.
Definition kunaistream.hpp:20
utilities
Definition analysis.hpp:23