class Poco::Util::IntValidator

Overview

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

#include <IntValidator.h>

class IntValidator: public Poco::Util::Validator
{
public:
    // construction

    IntValidator(
        int min,
        int max
        );

    // methods

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

Inherited Members

public:
    // methods

    void
    duplicate() const;

    void
    release() const;

    int
    referenceCount() const;

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

Detailed Documentation

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

Construction

IntValidator(
    int min,
    int max
    )

Creates the IntValidator.

Methods

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.