00001 #ifndef CASE_LABEL_H_
00002 #define CASE_LABEL_H_
00003
00004 #include "control_statement.h"
00005
00006
00007 namespace il
00008 {
00009
00021 class case_label : public il::control_statement
00022 {
00023
00024 friend class boost::serialization::access;
00025
00026 template<class Archive>
00027 void serialize(Archive & ar, const unsigned int version)
00028 {
00029 ar & boost::serialization::base_object<il::control_statement>(*this);
00030 ar & low;
00031 ar & high;
00032 ar & is_default;
00033 }
00034
00035 private:
00036
00037 long low;
00038 long high;
00039 bool is_default;
00040
00041
00042
00043 public:
00044 case_label();
00045 case_label(long low, long high, location loc);
00046 case_label(long num, location loc);
00047 case_label(location loc);
00048 virtual string to_string() const;
00049 virtual void print(){};
00050
00055 bool has_range() const;
00056
00060 bool is_default_label() const;
00061
00065 long get_low();
00066
00070 long get_high();
00071 virtual ~case_label();
00072 };
00073
00074 }
00075
00076 #endif