# Poco::Dynamic

# template < typename T >

# class VarHolderImpl

Library: Foundation
Package: Dynamic
Header: Poco/Dynamic/VarHolder.h

## Description

Template based implementation of a VarHolder. This class provides type storage for user-defined types that do not have VarHolderImpl specialization.

The actual conversion work happens in the template specializations of this class.

VarHolderImpl throws following exceptions: BadCastException (if the requested conversion is not implemented) RangeException (if an attempt is made to assign a numeric value outside of the target min/max limits SyntaxException (if an attempt is made to convert a string containing non-numeric characters to number)

In order to support efficient direct extraction of the held value, all specializations must additionally implement a public member function:

    const T& value() const

returning a const reference to the actual stored value.

## Inheritance

Direct Base Classes: VarHolder

All Base Classes: VarHolder

## Member Summary

Member Functions: clone, convert, isArray, isBoolean, isInteger, isNumeric, isSigned, isString, isStruct, operator =, type, value

Inherited Functions: clone, cloneHolder, convert, convertSignedFloatToUnsigned, convertSignedToUnsigned, convertToFP, convertToSigned, convertToSmaller, convertToSmallerUnsigned, convertToUnsigned, convertUnsignedToSigned, isArray, isBoolean, isDate, isDateTime, isDeque, isInteger, isList, isNumeric, isOrdered, isSigned, isString, isStruct, isTime, isUUID, isVector, size, type

## Constructors

### VarHolderImpl

VarHolderImpl() = delete;

### VarHolderImpl

VarHolderImpl(
const T & val
);

### VarHolderImpl

VarHolderImpl(
const VarHolderImpl & param248
) = delete;

## Destructor

### ~VarHolderImpl

~VarHolderImpl() override = default;

## Member Functions

### clone

VarHolder * clone(
Placeholder < VarHolder > * pVarHolder = nullptr
) const override;

See also: Poco::Dynamic::VarHolder::clone()

### convert

void convert(
Int8 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
Int16 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
Int32 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
Int64 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
UInt8 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
UInt16 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
UInt32 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
UInt64 & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
long long & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
unsigned long long & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
bool & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
float & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
double & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
char & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
std::string & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### convert

void convert(
Poco::UTF16String & val
) const override;

See also: Poco::Dynamic::VarHolder::convert()

### isArray

bool isArray() const override;

See also: Poco::Dynamic::VarHolder::isArray()

### isBoolean

bool isBoolean() const override;

See also: Poco::Dynamic::VarHolder::isBoolean()

### isInteger

bool isInteger() const override;

See also: Poco::Dynamic::VarHolder::isInteger()

### isNumeric

bool isNumeric() const override;

See also: Poco::Dynamic::VarHolder::isNumeric()

### isSigned

bool isSigned() const override;

See also: Poco::Dynamic::VarHolder::isSigned()

### isString

bool isString() const override;

See also: Poco::Dynamic::VarHolder::isString()

### isStruct

bool isStruct() const override;

See also: Poco::Dynamic::VarHolder::isStruct()

### operator =

VarHolderImpl & operator = (
const VarHolderImpl & param249
) = delete;

### type

const std::type_info & type() const override;

See also: Poco::Dynamic::VarHolder::type()

### value

const T & value() const;