XLL+ Class Library (7.0)

CXlValueListConstraint<INT_T>::Validate

Validate an input argument's value against the constraint's list of values

void Validate(
   INT_T scalarValue,
   LPCTSTR pszArgName
) const;
void Validate(
   const std::vector<INT_T>& vectorValue,
   LPCTSTR pszArgName
) const;
void Validate(
   const ple::imtx<INT_T>& matrixValue,
   LPCTSTR pszArgName
) const;

Parameters

scalarValue

A scalar input value. If this is not a member of the constraint's list of values, an exception of type CXlRuntimeException will be thrown, and an error message will be returned, e.g. Expected one of 1, 2, 3 for X.

pszArgName

The name of the argument being validated.

vectorValue

A vector input value. If any item in the vector is not a member of the constraint's list of values, an exception of type CXlRuntimeException will be thrown, and an error message will be returned, e.g. Expected one of 1, 2, 3 for X[12].

matrixValue

A matrix input value. If any item in the matrix is not a member of the constraint's list of values, an exception of type CXlRuntimeException will be thrown, and an error message will be returned, e.g. Expected one of 1, 2, 3 for X[3, 4].

Requirements

Header: xlvaluelistconstraint.h

See Also

CXlValueListConstraint<INT_T> Class | CXlValueListConstraint<INT_T> Methods