Poco::Data

template < class C >

class Column

Library: Data
Package: DataCore
Header: Poco/Data/Column.h

Description

Column class is column data container. Data (a pointer to underlying STL container) is assigned to the class at construction time. Construction with null pointer is not allowed. This class owns the data assigned to it and deletes the storage on destruction.

Member Summary

Member Functions: begin, data, end, length, name, operator =, operator [], position, precision, reset, rowCount, swap, type, value

Types

Container

typedef C Container;

ContainerPtr

typedef Poco::SharedPtr < C > ContainerPtr;

Iterator

typedef typename C::const_iterator Iterator;

RIterator

typedef typename C::const_reverse_iterator RIterator;

Size

typedef typename C::size_type Size;

Type

typedef typename C::value_type Type;

Constructors

Column inline

Column(
    const Column & col
);

Creates the Column.

Column inline

Column(
    const MetaColumn & metaColumn,
    Container * pData
);

Creates the Column.

Destructor

~Column inline

~Column();

Destroys the Column.

Member Functions

begin inline

Iterator begin() const;

Returns iterator pointing to the beginning of data storage vector.

data inline

Container & data();

Returns reference to contained data.

end inline

Iterator end() const;

Returns iterator pointing to the end of data storage vector.

length inline

std::size_t length() const;

Returns column maximum length.

name inline

const std::string & name() const;

Returns column name.

operator = inline

Column & operator = (
    const Column & col
);

Assignment operator.

operator [] inline

const Type & operator[] (
    std::size_t row
) const;

Returns the field value in specified row.

position inline

std::size_t position() const;

Returns column position.

precision inline

std::size_t precision() const;

Returns column precision. Valid for floating point fields only (zero for other data types).

reset inline

void reset();

Clears and shrinks the storage.

rowCount inline

Size rowCount() const;

Returns number of rows.

swap inline

void swap(
    Column & other
);

Swaps the column with another one.

type inline

MetaColumn::ColumnDataType type() const;

Returns column type.

value inline

const Type & value(
    std::size_t row
) const;

Returns the field value in specified row.