# Poco::Redis

# template < typename T >

# class Type

Library: Redis
Package: Redis
Header: Poco/Redis/Type.h

## Description

Template class for all Redis types. This class will use RedisTypeTraits structure for calling the type specific code.

## Inheritance

Direct Base Classes: RedisType

All Base Classes: RedisType

## Member Summary

Member Functions: read, toString, type, value

Inherited Functions: createRedisType, isArray, isBulkString, isError, isInteger, isSimpleString, read, toString, type

## Constructors

### Type

Type();

Creates the Type.

### Type

Type(
const T & t
);

Creates the Type from another one.

### Type

Type(
const Type & copy
);

Creates the Type by copying another one.

## Destructor

### ~Type

virtual ~Type();

Destroys the Type.

## Member Functions

### read

void read(
RedisInputStream & socket
);

Reads the value from the stream (RESP).

See also: Poco::Redis::RedisType::read()

### toString

std::string toString() const;

Converts the value to a string based on the RESP protocol.

See also: Poco::Redis::RedisType::toString()

### type

int type() const;

Returns the type of the value

See also: Poco::Redis::RedisType::type()

### value

T & value();

Returns the value

### value

const T & value() const;

Returns a const value