00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ERS_RANGE_ISSUE
00011 #define ERS_RANGE_ISSUE
00012
00013 #include "ers/InvalidReferenceIssue.h"
00014 namespace ers {
00015 class RangeIssue : public InvalidReferenceIssue {
00016 protected:
00017 RangeIssue(const ers::Context &c, ers::severity_t s) ;
00018 public:
00019 static void set_range(ers::Issue &issue, int64_t index, int64_t min_index, int64_t max_index, const char* entity_name=0) ;
00020 static void check_range(const ers::Context &c, int64_t min, int64_t value, int64_t max, const char* entity_name=0);
00021 static const char * const CLASS_NAME ;
00022 static const char * const INDEX_REFERENCE_TYPE ;
00023 static const char * const RANGE_MIN_KEY ;
00024 static const char * const RANGE_MAX_KEY ;
00025 RangeIssue() ;
00026 RangeIssue(const ers::Context &c, ers::severity_t s, int64_t min_index, int64_t index, int64_t max_index, const char* entity_name=0) ;
00027 virtual const char*get_class_name() const throw() ;
00028
00029 } ;
00030
00031 }
00032
00033 #if (!defined(N_ERS_ASSERT))
00034 #define ERS_RANGE_CHECK(min,value,max) ers::RangeIssue::check_range(ERS_HERE,min,value,max,#value)
00035 #else
00036 #define ERS_RANGE_CHECK(min,value,max)
00037 #endif
00038 #endif
00039