BDE 4.14.0 Production release
|
#include <balcl_constraint.h>
Public Types | |
typedef bsl::function< bool(const char *, bsl::ostream &)> | CharConstraint |
typedef bsl::function< bool(const int *, bsl::ostream &)> | IntConstraint |
typedef bsl::function< bool(const bsls::Types::Int64 *, bsl::ostream &)> | Int64Constraint |
typedef bsl::function< bool(const double *, bsl::ostream &)> | DoubleConstraint |
typedef bsl::function< bool(const bsl::string *, bsl::ostream &)> | StringConstraint |
typedef bsl::function< bool(const bdlt::Datetime *, bsl::ostream &)> | DatetimeConstraint |
typedef bsl::function< bool(const bdlt::Date *, bsl::ostream &)> | DateConstraint |
typedef bsl::function< bool(const bdlt::Time *, bsl::ostream &)> | TimeConstraint |
This struct
provides a namespace that defines the types used to impose user-defined constraints on values associated with command-line options. One type is defined for each scalar type defined in balcl::OptionType
except for bool
.
typedef bsl::function<bool(const char *, bsl::ostream& )> balcl::Constraint::CharConstraint |
typedef bsl::function<bool(const bdlt::Date *, bsl::ostream& )> balcl::Constraint::DateConstraint |
typedef bsl::function<bool(const bdlt::Datetime *, bsl::ostream& )> balcl::Constraint::DatetimeConstraint |
typedef bsl::function<bool(const double *, bsl::ostream& )> balcl::Constraint::DoubleConstraint |
typedef bsl::function<bool(const bsls::Types::Int64 *, bsl::ostream& )> balcl::Constraint::Int64Constraint |
typedef bsl::function<bool(const int *, bsl::ostream& )> balcl::Constraint::IntConstraint |
typedef bsl::function<bool(const bsl::string *, bsl::ostream& )> balcl::Constraint::StringConstraint |
typedef bsl::function<bool(const bdlt::Time *, bsl::ostream& )> balcl::Constraint::TimeConstraint |
These types are aliases for function objects (functors) used to express user-defined constraints on option values. Such objects should return true
if the supplied value (first argument) are deemed valid, and false
otherwise. Descriptive error messages may be written to the supplied stream (second argument).