CrystalClear Software Home Library Home Documentation Index


Class template wrapping_int2

boost::date_time::wrapping_int2 — A wrapping integer used to wrap around at the top.


template<typename int_type_, int_type_ wrap_min, int_type_ wrap_max> 
class wrapping_int2 {
// types
typedef int_type_ int_type;

// construct/copy/destruct

// public member functions
int_type as_int() const;
operator int_type() const;
int_type add(int_type) ;
int_type subtract(int_type) ;

// public static functions
unsigned long wrap_value() ;
unsigned long min_value() ;


Bad name, quick impl to fix a bug -- fix later!! This allows the wrap to restart at a value other than 0. Currently this only works if wrap_min == 1

wrapping_int2 construct/copy/destruct

  1. wrapping_int2(int_type v);

    If initializing value is out of range of [wrap_min, wrap_max], value will be initialized to closest of min or max

wrapping_int2 public member functions

  1. int_type as_int() const;
  2. operator int_type() const;
  3. int_type add(int_type v) ;
  4. int_type subtract(int_type v) ;

wrapping_int2 public static functions

  1. unsigned long wrap_value() ;
  2. unsigned long min_value() ;
Copyright 2001-2005 CrystalClear Software, Inc