Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: d32dbms.h
Link against: edbms.lib

Class TDbColSetIter

TDbColSetIter

Support

Supported from 5.0

Description

Provides a useful way to iterate over the contents of a column set.

Defined in TDbColSetIter:
Col(), TDbColSetIter(), operator Tany*(), operator*(), operator++(), operator->()

See also:


Construction and destruction


TDbColSetIter()

TDbColSetIter(const CDbColSet& aColSet);

Description

Constructs a column set iterator over a column set. The iterator now references the first column in the set.

Parameters

const CDbColSet& aColSet

The column set to iterate over.

[Top]


Dereferencing


operator Tany*()

operator TAny*() const;

Description

Tests if the iterator can be dereferenced. This operator is called implicitly when a TDbColSetIter is used in conditional expressions such as:

if (iter)or while (iter)

Return value

TAny*

This is NULL if and only if the iterator cannot be dereferenced.


operator*()

const TDbCol& operator*() const;

Description

Dereferences the iterator on the current column definition.

Return value

TDbCol&

A const reference to the current column definition.


operator->()

const TDbCol* operator->() const;

Description

Gets a member of the currently referenced column definition. This enables the use of the following constructs:

if (iter->iType==EDbColText && iter->iMaxLength<50)

Return value

TDbCol*

A const pointer to the current column definition.

[Top]


Iterating


Col()

TDbColNo Col() const;

Description

Returns a column ordinal in the set for the currently referenced column definition.

Return value

TDbColNo

The column ordinal of the current column definition.


operator++()

TDbColSetIter& operator++();

Description

Moves the iterator to the next column in the set — pre increment operator.

Return value

TDbColSetIter&

A reference to this iterator, after the increment operation has been performed.


operator++()

TDbColSetIter operator++(TInt);

Description

Moves the iterator to the next column in the set — post increment operator.

Note that this is implemented in terms of the pre-increment operator, and is less efficient.

Parameters

TInt

Unused: required for the C++ compiler to resolve the ambiguity with the pre-increment operator.

Return value

TDbColSetIter

A copy of this iterator, referring to the column definition before the increment operation is performed.