Package pype32 :: Module datatypes :: Class Array
[hide private]
[frames] | no frames]

Class Array

source code

object --+    
         |    
      list --+
             |
            Array

Array object.

Instance Methods [hide private]
new empty list
__init__(self, arrayType, shouldPack=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
sizeof(self)
Returns the size of the array.
source code
 
getType(self)
Returns an integer value identifying the type of object.
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods [hide private]
Array
parse(readDataInstance, arrayType, arrayLength)
Returns a new Array object.
source code
Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, arrayType, shouldPack=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • arrayType (int) - The type of array to be built. This value can be TYPE_BYTE, TYPE_WORD, TYPE_DWORD or TYPE_QWORD.
  • shouldPack (bool) - (Optional) If set to c{True}, the object will be packed. If set to False, the object won't be packed.
Returns: new empty list
Overrides: object.__init__

To Do: Before to add an element to the array we must check if the type of that element is one we are expecting.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

parse(readDataInstance, arrayType, arrayLength)
Static Method

source code 

Returns a new Array object.

Parameters:
  • readDataInstance (ReadData) - The ReadData object containing the array data.
  • arrayType (int) - The type of Array to be built.
  • arrayLength (int) - The length of the array passed as an argument.
Returns: Array
New Array object.