Qore SqlUtil Module Reference 1.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | List of all members
SqlUtil::AbstractListContainer Class Referenceabstract

abstract container class that throws an exception if an unknown key is accessed More...

## Public Member Functions
| add (any val)
| adds the given value to the list
| constructor (softlist nl)
| creates the object with the list argument passed
bool | empty ()
| returns True if the container is empty, False if not
abstract any | get (softint i)
| returns the value of the given element in the contained list if it exists, otherwise throws an `ELEMENT-ERROR` exception More...
abstract string | getElementName ()
| must return the name of the contained element
list | getList ()
| returns the list contained by this object
Qore::ListIterator | iterator ()
| Returns a ListIterator object for the contained list. More...
int | size ()
| Returns the number of elements in the contained list. More...
any | take (int i)
| removes the given element from the contained list and returns the value
bool | val ()
| Returns False if the contained list is empty, True if not. More...

## Detailed Description

abstract container class that throws an exception if an unknown key is accessed

## Member Function Documentation

abstract any SqlUtil::AbstractListContainer::get | ( | softint | i | ) |
| pure virtual

returns the value of the given element in the contained list if it exists, otherwise throws an `ELEMENT-ERROR` exception

Example:
  my any $v = $c.get(2);

Parameters

  i | the index of the element to access

Returns
  the value of the given index in the contained list if it exists

Exceptions

  ELEMENT-ERROR | the given element does not exist in the contained list

Qore::ListIterator SqlUtil::AbstractListContainer::iterator | ( |  | ) |

Returns a ListIterator object for the contained list.

Example:
  map printf("+ %s: %y\n", $1), $h.iterator();

Returns
  a HashIterator object for the contained hash

int SqlUtil::AbstractListContainer::size | ( |  | ) |

Returns the number of elements in the contained list.

Example:
  my int $num = $l.size();

Returns
  the number of elements in the contained list

bool SqlUtil::AbstractListContainer::val | ( |  | ) |

Returns False if the contained list is empty, True if not.

Example:
  my bool $b = $l.val();

The opposite of empty()

Returns
  False if the contained list is empty, True if not