Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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.

Definition at line 36 of file misc.h.

Constructor & Destructor Documentation

◆ StrRange() [1/2]

StrRange::StrRange ( )
inlineprotected

Definition at line 42 of file misc.h.

◆ StrRange() [2/2]

StrRange::StrRange ( const char *  range)
inlineexplicit

Definition at line 46 of file misc.h.

Member Function Documentation

◆ inRange()

bool StrRange::inRange ( long  val) const
inline
Returns
true if val is >= min_ and <= max_

Definition at line 56 of file misc.h.

Member Data Documentation

◆ max_

long StrRange::max_
protected

Definition at line 39 of file misc.h.

◆ min_

long StrRange::min_
protected

Definition at line 38 of file misc.h.


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