IDAPython 9.0
Loading...
Searching...
No Matches
place_t Class Reference
Inheritance diagram for place_t:
idaplace_t simpleline_place_t tiplace_t

Public Member Functions

 __init__ (self, *args, **kwargs)
 
int touval (self, 'void *' ud)
 
'place_t *' clone (self)
 
None copyfrom (self, 'place_t' _from)
 
'place_t *' makeplace (self, 'void *' ud, int x, int lnnum)
 
int compare (self, 'place_t' t2)
 
None adjust (self, 'void *' ud)
 
bool prev (self, 'void *' ud)
 
bool next (self, 'void *' ud)
 
bool beginning (self, 'void *' ud)
 
bool ending (self, 'void *' ud)
 
None serialize (self)
 
int id (self)
 
str name (self)
 
ida_idaapi.ea_t toea (self)
 
bool rebase (self, 'segm_move_infos_t const &' arg2)
 
'place_t *' enter (self, 'uint32 *' arg2)
 
None leave (self, int arg2)
 
int compare2 (self, 'place_t' t2, 'void *' arg3)
 
bool deserialize (self, 'bytevec_t const &' _in)
 
Tuple[List[str], int, int, int] generate (self, ud, int maxsize)
 

Static Public Member Functions

'idaplace_t *' as_idaplace_t ('place_t' p)
 
'simpleline_place_t *' as_simpleline_place_t ('place_t' p)
 
'tiplace_t *' as_tiplace_t ('place_t' p)
 

Static Public Attributes

str lnnum
 

Protected Member Functions

None _print (self, 'void *' ud)
 

Properties

 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Reimplemented in idaplace_t, simpleline_place_t, and tiplace_t.

Member Function Documentation

◆ _print()

None _print ( self,
'void *' ud )
protected

◆ adjust()

None adjust ( self,
'void *' ud )
Adjust the current location to point to a displayable object. This function validates the location and makes sure that it points to an existing object. For example, if the location points to the middle of an instruction, it will be adjusted to point to the beginning of the instruction. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t

◆ as_idaplace_t()

'idaplace_t *' as_idaplace_t ( 'place_t' p)
static

◆ as_simpleline_place_t()

'simpleline_place_t *' as_simpleline_place_t ( 'place_t' p)
static

◆ as_tiplace_t()

'tiplace_t *' as_tiplace_t ( 'place_t' p)
static

◆ beginning()

bool beginning ( self,
'void *' ud )
Are we at the first displayable object?. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t
@returns true if the current location points to the first displayable object

◆ clone()

'place_t *' clone ( self)
Clone the location. 

@returns a pointer to a copy of the current location in dynamic memory

◆ compare()

int compare ( self,
'place_t' t2 )
Deprecated. Please consider compare2(const place_t *, void *) instead.

◆ compare2()

int compare2 ( self,
'place_t' t2,
'void *' arg3 )
Compare two locations except line numbers (lnnum). This function is used to organize loops. For example, if the user has selected an range, its boundaries are remembered as location objects. Any operation within the selection will have the following look: for ( loc=starting_location; loc < ending_location; loc.next() ) In this loop, the comparison function is used. 

@param t2: the place to compare this one to.
@retval -1: if the current location is less than 't2'
@retval 0: if the current location is equal to than 't2'
@retval 1: if the current location is greater than 't2'

◆ copyfrom()

None copyfrom ( self,
'place_t' _from )
Copy the specified location object to the current object.

◆ deserialize()

bool deserialize ( self,
'bytevec_t const &' _in )
De-serialize into this instance. 'pptr' should be incremented by as many bytes as de-serialization consumed. 

@returns whether de-serialization was successful

◆ ending()

bool ending ( self,
'void *' ud )
Are we at the last displayable object?. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t
@returns true if the current location points to the last displayable object

◆ enter()

'place_t *' enter ( self,
'uint32 *' arg2 )
Visit this place, possibly 'unhiding' a section of text. If entering that place required some expanding, a place_t should be returned that represents that section, plus some flags for later use by 'leave()'. 

@returns a place_t corresponding to the beginning of the section of text that had to be expanded. That place_t's leave() will be called with the flags contained in 'out_flags' when the user navigates away from it.

◆ generate()

Tuple[List[str], int, int, int] generate ( self,
ud,
int maxsize )
Generate text lines for the current location.

@param ud The user data object
@param maxsize The maximum number of lines to generate
@return a tuple (lines-of-text, default-line-number, prefix-color, background-color)

◆ id()

int id ( self)
Get the place's ID (i.e., the value returned by register_place_class()) 

@returns the id

◆ leave()

None leave ( self,
int arg2 )
Leave this place, possibly 'hiding' a section of text that was previously expanded (at enter()-time.) 

◆ makeplace()

'place_t *' makeplace ( self,
'void *' ud,
int x,
int lnnum )
Map a number to a location. When the user clicks on the scrollbar and drags it, we need to determine the location corresponding to the new scrollbar position. This function is used to determine it. It builds a location object for the specified 'x' and returns a pointer to it. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t
@param x: number to map
@param lnnum: line number to initialize 'lnnum'
@returns a freshly allocated object. See also PCF_MAKEPLACE_ALLOCATES

◆ name()

str name ( self)
Get this place type name. All instances of a given class must return the same string. 

@returns the place type name. Please try and pick something that is not too generic, as it might clash w/ other plugins. A good practice is to prefix the class name with the name of your plugin. E.g., "myplugin:srcplace_t".

◆ next()

bool next ( self,
'void *' ud )
Move to the next displayable location. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t
@returns success

◆ prev()

bool prev ( self,
'void *' ud )
Move to the previous displayable location. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t
@returns success

◆ rebase()

bool rebase ( self,
'segm_move_infos_t const &' arg2 )
Rebase the place instance 

@returns true if place was rebased, false otherwise

◆ serialize()

None serialize ( self)
Serialize this instance. It is fundamental that all instances of a particular subclass of of place_t occupy the same number of bytes when serialized. 

◆ toea()

ida_idaapi.ea_t toea ( self)
Map the location to an ea_t. 

@returns the corresponding ea_t, or BADADDR;

◆ touval()

int touval ( self,
'void *' ud )
Map the location to a number. This mapping is used to draw the vertical scrollbar. 

@param ud: pointer to user-defined context data. Is supplied by linearray_t

Member Data Documentation

◆ lnnum

str lnnum
static
Initial value:
= property(_ida_kernwin.place_t_lnnum_get, _ida_kernwin.
place_t_lnnum_set)

Property Documentation

◆ thisown

thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

The documentation for this class was generated from the following file: