Scid  4.6.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StrRange Class Reference

class StrRange - parse a string interpreting its content as 1 or 2 integers separated by whitespace. More...

#include <misc.h>

Public Member Functions

 StrRange (const char *range)
 
bool inRange (long val) const
 

Protected Member Functions

 StrRange ()
 

Protected Attributes

long min_
 
long max_
 

Detailed Description

class StrRange - parse a string interpreting its content as 1 or 2 integers separated by whitespace.

The integers represent the min and max value of a range. If only one integer is provided it will represent both the min and max value.

inRange() : Return true if is >= min and <= max

Definition at line 37 of file misc.h.

Constructor & Destructor Documentation

StrRange::StrRange ( )
inlineprotected

Definition at line 43 of file misc.h.

StrRange::StrRange ( const char *  range)
inlineexplicit

Definition at line 47 of file misc.h.

Member Function Documentation

bool StrRange::inRange ( long  val) const
inline

Definition at line 56 of file misc.h.

Member Data Documentation

long StrRange::max_
protected

Definition at line 40 of file misc.h.

long StrRange::min_
protected

Definition at line 39 of file misc.h.


The documentation for this class was generated from the following file: