Skip to content

Commit

Permalink
Added methods to check if a bound is inclusive.
Browse files Browse the repository at this point in the history
Refs #7805
  • Loading branch information
Samuel Jackson committed Sep 2, 2013
1 parent c2db842 commit 288fde0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ class DLLExport BoundedValidator : public TypedValidator<TYPE>
const TYPE& lower() const { return m_lowerBound; }
/// Return the upper bound value
const TYPE& upper() const { return m_upperBound; }
/// Check if lower bound is inclusive
bool isLowerInclusive() const { return m_lowerInclusive; }
/// Check if upper bound is inclusive
bool isUpperInclusive() const { return m_upperInclusive; }

/// Set lower bound value
void setLower( const TYPE& value, const bool inclusive=false ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ namespace
setBounds_Overload( "Set both bounds", (arg("lower")=object(), arg("upper")=object(), arg("inclusive")=false))) \
.def("hasLower", &BoundedValidator<ElementType>::hasLower, "Returns True if a lower bound has been set" ) \
.def("hasUpper", &BoundedValidator<ElementType>::hasUpper, "Returns True if an upper bound has been set" ) \
.def("isLowerInclusive", &BoundedValidator<ElementType>::isLowerInclusive, "Returns True if the lower bound is inclusive" ) \
.def("isUpperInclusive", &BoundedValidator<ElementType>::isUpperInclusive, "Returns True if the upper bound is inclusive" ) \
;
}

Expand Down

0 comments on commit 288fde0

Please sign in to comment.