Poco::Util

class IntValidator

Library: Util
Package: Options
Header: Poco/Util/IntValidator.h

Description

The IntValidator tests whether the option argument, which must be an integer, lies within a given range.

Inheritance

Direct Base Classes: Validator

All Base Classes: Poco::RefCountedObject, Validator

Member Summary

Member Functions: validate

Inherited Functions: duplicate, referenceCount, release, validate

Constructors

IntValidator

IntValidator(
    int min,
    int max
);

Creates the IntValidator.

Destructor

~IntValidator virtual

~IntValidator();

Destroys the IntValidator.

Member Functions

validate virtual

void validate(
    const Option & option,
    const std::string & value
);

Validates the value for the given option by testing whether it's an integer that lies within a given range.