Class: Relyze::DiffResults::DiffFunctionResult

Inherits:
DiffBaseResult show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core/diff_results.rb

Instance Attribute Summary

Attributes inherited from DiffBaseResult

#difference, #matched_rva, #parent, #rva, #type

Instance Method Summary collapse

Methods inherited from DiffBaseResult

#_generate_child, #get_child, #get_children, #initialize, #is_added?, #is_equal?, #is_modified?, #is_removed?, #matched

Constructor Details

This class inherits a constructor from Relyze::DiffResults::DiffBaseResult

Instance Method Details

#_gen_removed_or_addedObject

Helper method to create the DiffCodeBlockResult children for a function that has been either removed or added and hence has no matched function. Not to be called directly.



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 322

def _gen_removed_or_added

    if( not self.is_removed? and not self.is_added? )
        return
    end
    
    if( @children.nil? )
        @children = ::Hash.new
    else
        @children.clear
    end
    
    self.function.blocks do | block |
        dr_codeblock = DiffCodeBlockResult.new( self, self.type, self.difference, block.rva, nil )
        dr_codeblock._gen_removed_or_added( block )
        @children[block.rva] = dr_codeblock
    end
end

#functionRelyze::ExecutableFileModel::FunctionDataType?

Get the #function associated with this diff result.



298
299
300
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 298

def function
    @parent.model.function( self.rva )
end

#nameString

Get the name of this diff result.

Returns:

  • (String)

    This diff results name.



305
306
307
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 305

def name
    self.function.block( self.rva ).name
end