satisfiesConstraint overloads

Synopses

Declared in <balcl_typeinfo.h>

Return true if the specified element satisfies the constraint of the specified typeInfo object (if any), and false otherwise. Optionally specify a stream; if stream is specified and validation fails, a descriptive error message indicating the reason for the failure is written to stream. If typeInfo holds no constraint, this method returns true. The behavior is undefined unless element.type() == typeInfo.type().

static
bool
satisfiesConstraint(
    OptionValue const& element,
    TypeInfo const& typeInfo);

Return true if the value at the specified variable satisfies the constraint of the specified typeInfo object (if any), and false otherwise. Optionally specify a stream; if stream is specified and validation fails, a descriptive error message indicating the reason for the failure is written to stream. If typeInfo holds no constraint, this method returns true. The behavior is undefined unless variable can be (validly) cast to OptionType<ENUM>::EnumToType::type * where ENUM matches typeInfo.type().

static
bool
satisfiesConstraint(
    void const* variable,
    TypeInfo const& typeInfo);

Same as the preceding overload, but write a descriptive error message to the specified stream when validation fails.

static
bool
satisfiesConstraint(
    OptionValue const& element,
    TypeInfo const& typeInfo,
    std::ostream& stream);

Return true if the value at the specified variable satisfies the constraint of the specified typeInfo object, writing errors to the specified stream if validation fails.

static
bool
satisfiesConstraint(
    void const* variable,
    TypeInfo const& typeInfo,
    std::ostream& stream);

Created with MrDocs