/* # # This class implements a container to hole bounding information # for use in loops like "for (i=min;i #include #define BOUNDS_DEBUG #ifdef BOUNDS_DEBUG # define REPORT(f, s...) printf(f, ##s) #else # define REPORT(f, s...) /* */ #endif Bounds::Bounds() { defined = 0; first = 0; max = 0; } uint32_t Bounds::getFirst() { if (!defined) { printf("%s", _("Undefined first requested?!\n")); } return first; } uint32_t Bounds::getMax() { if (!defined) { printf("%s", _("Undefined max requested?!\n")); } return max; } int Bounds::getDefined() { return defined; } void Bounds::defineBounds(uint32_t start, uint32_t maxi) { first = start; max = maxi; defined = 1; } void Bounds::extendTo(uint32_t where) { if (!defined) defineBounds(where ? where - 1 : 0, where); max = where; } /* vi:set ai ts=4 sw=4 expandtab: */