Module xmlsec :: Class PtrList
[frames | no frames]

Class PtrList


Method Summary
  __init__(self, id, _obj)
Creates new list object.
  __getattr__(self, name)
  __setattr__(self, name, value)
  add(self, item)
Adds item to the end of the list.
  copy(self, dst)
Copies list items to dst list using duplicateItem method of the list klass.
  debugDump(self, output)
Prints debug information about list to the output.
  debugXmlDump(self, output)
Prints debug information about list to the output in XML format.
  destroy(self)
Destroys list.
  duplicate(self)
Creates a new copy of list and all its items.
  empty(self)
Remove all items from list (if any).
  finalize(self)
Cleans up the list initialized with initialize method.
  getItem(self, pos)
Gets item from the list.
  getName(self)
Returns lists's name.
  getSize(self)
Gets list size.
  initialize(self, id)
Initializes the list of given klass.
  isValid(self)
Returns 1 if list is not None and list.id is not None or 0 otherwise.
  remove(self, pos)
Destroys list item at the position pos and sets it value to None.
  set(self, item, pos)
Sets the value of list item at position pos.

Method Details

__init__(self, id=None, _obj=None)
(Constructor)

Creates new list object. Caller is responsible for freeing returned list
by calling destroy method.
id      : the list klass.
Returns : newly allocated list or None if an error occurs.

add(self, item)

Adds item to the end of the list.
item    : the item.
Returns : 0 on success or a negative value if an error occurs.

copy(self, dst)

Copies list items to dst list using duplicateItem method of the list klass.
If duplicateItem method is None then we just copy pointers to items.
dst     : the destination list.
Returns : 0 on success or a negative value if an error occurs.

debugDump(self, output)

Prints debug information about list to the output.
output : the output FILE.

debugXmlDump(self, output)

Prints debug information about list to the output in XML format.
output : the output FILE.

destroy(self)

Destroys list.

duplicate(self)

Creates a new copy of list and all its items.
Returns : newly list or None if an error occurs.

empty(self)

Remove all items from list (if any).

finalize(self)

Cleans up the list initialized with initialize method.

getItem(self, pos)

Gets item from the list.
pos     : the item position.
Returns : the list item at position pos or None if pos is greater than
the number of items in the list or an error occurs.

getName(self)

Returns lists's name.

getSize(self)

Gets list size.
Returns : the number of itmes in list.

initialize(self, id)

Initializes the list of given klass. Caller is responsible for cleaning
up by calling finalize method.
id      : the list klass.
Returns : 0 on success or a negative value if an error occurs.

isValid(self)

Returns 1 if list is not None and list.id is not None or 0 otherwise.

remove(self, pos)

Destroys list item at the position pos and sets it value to None.
pos     : the position.
Returns : 0 on success or a negative value if an error occurs.

set(self, item, pos)

Sets the value of list item at position pos. The old value is destroyed.
item    : the item.
pos     : the pos.
Returns : 0 on success or a negative value if an error occurs.

Generated by Epydoc 2.0 on Mon Feb 9 01:09:34 2004 http://epydoc.sf.net