Class Poco::Data::SimpleRowFormatter
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Data

# class SimpleRowFormatter

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

## Description

A simple row formatting class.

## Inheritance

Direct Base Classes: RowFormatter

All Base Classes: RowFormatter

## Member Summary

Member Functions: formatNames, formatValues, getColumnWidth, getSpacing, operator =, rowCount, setColumnWidth, swap

Inherited Functions: formatNames, formatValues, getMode, getTotalRowCount, postfix, prefix, reset, rowCount, setMode, setPostfix, setPrefix, setTotalRowCount, toString

## Constructors

### SimpleRowFormatter

SimpleRowFormatter(
const SimpleRowFormatter & other
);

Creates the copy of the supplied SimpleRowFormatter.

### SimpleRowFormatter

SimpleRowFormatter(
std::streamsize columnWidth = DEFAULT_COLUMN_WIDTH,
std::streamsize spacing = DEFAULT_SPACING
);

Creates the SimpleRowFormatter and sets the column width to specified value.

## Destructor

### ~SimpleRowFormatter

~SimpleRowFormatter();

Destroys the SimpleRowFormatter.

## Member Functions

### formatNames

std::string & formatNames(
const NameVecPtr pNames,
std::string & formattedNames
);

Formats the row field names.

See also: Poco::Data::RowFormatter::formatNames()

### formatValues

std::string & formatValues(
const ValueVec & vals,
std::string & formattedValues
);

Formats the row values.

See also: Poco::Data::RowFormatter::formatValues()

### getColumnWidth

std::streamsize getColumnWidth() const;

Returns the column width.

### getSpacing

std::streamsize getSpacing() const;

Returns the spacing.

### operator =

SimpleRowFormatter & operator = (
const SimpleRowFormatter & row
);

Assignment operator.

### rowCount

int rowCount() const;

Returns row count.

See also: Poco::Data::RowFormatter::rowCount()

### setColumnWidth

void setColumnWidth(
std::streamsize width
);

Sets the column width.

### swap

void swap(
SimpleRowFormatter & other
);

Swaps the row formatter with another one.

## Variables

### DEFAULT_COLUMN_WIDTH

static const int DEFAULT_COLUMN_WIDTH = 16;

### DEFAULT_SPACING

static const int DEFAULT_SPACING = 1;