Library Version 12.1.6.2

Chapter 22. ElementRef and ElementHolder Wappers
Prev |  | Next

## Chapter 22. ElementRef and ElementHolder Wappers

An ElementRef and ElementHolder object represents the reference to the data element referenced by an iterator.

Each iterator object has an ElementRef or ElementHolder object that stores the data element that the iterator points to.

The ElementHolder class is used to store primitive types into STL containers.

The ElementRef class is used to store other types into STL containers.

The ElementRef and ElementHolder classes have identical interfaces, and are treated the same by other STL classes. Since the ElementRef class inherits from the template data class, all methods have a _DB_STL_ prefix to avoid name clashes.

An ElementRef or ElementHolder class corresponds to a single iterator instance. An Element object is generally owned by an iterator object. The ownership relationship is swapped in some specific situations, specifically for the dereference and array index operator.

#### Public Members

Member | Description
--- | ---
ElementRef | ElementRef
ElementHolder | ElementHolder

#### Group

Dbstl Helper Classes

Prev |  | Next
Chapter 21. Dbstl Helper Classes | Home | Chapter 23. ElementHolder