UpdateType.hh
00001
00002 #ifndef UPDATETYPE_HH
00003 #define UPDATETYPE_HH
00004
00005 #include <OpenFlipper/common/GlobalDefines.hh>
00006 #include <bitset>
00007
00008 typedef std::bitset<64> UpdateTypeSet;
00009
00010
00011 class DLLEXPORT UpdateType {
00012 public:
00013 UpdateType(const UpdateType& _type);
00014
00015 UpdateType(UpdateTypeSet _set);
00016
00018 bool operator==(const UpdateType& _type) const;
00019
00020 UpdateType& operator++();
00021
00022 bool operator<( const UpdateType& _i ) const;
00023
00025 bool contains( const UpdateType& _type );
00026
00027 protected:
00028 UpdateTypeSet type_;
00029 };
00030
00032 const UpdateType UPDATE_ALL( UpdateTypeSet(1) );
00033
00035 const UpdateType UPDATE_OBJECT_SELECTION( UpdateTypeSet(1) << 1 );
00036
00038 const UpdateType UPDATE_VISIBILITY( UpdateTypeSet(1) << 2 );
00039
00040
00042
00048 const UpdateType UPDATE_GEOMETRY( UpdateTypeSet(1) << 3 );
00049
00055 const UpdateType UPDATE_TOPOLOGY( UpdateTypeSet(1) << 4 );
00056
00057
00063 const UpdateType UPDATE_SELECTION( UpdateTypeSet(1) << 5 );
00064
00069 const UpdateType UPDATE_SELECTION_VERTICES( UpdateTypeSet(1) << 6 );
00070
00071
00076 const UpdateType UPDATE_SELECTION_EDGES( UpdateTypeSet(1) << 7 );
00077
00082 const UpdateType UPDATE_SELECTION_FACES( UpdateTypeSet(1) << 8 );
00083
00088 const UpdateType UPDATE_COLOR( UpdateTypeSet(1) << 9 );
00089
00091 const UpdateType UPDATE_UNUSED ( UpdateTypeSet(1) << 10 );
00092
00093
00094
00095
00096
00102 DLLEXPORT
00103 UpdateType addUpdateType(QString _name);
00104
00106 DLLEXPORT
00107 UpdateType updateType(QString _name);
00108
00114 DLLEXPORT
00115 QString updateTypeName(UpdateType _id);
00116
00122 DLLEXPORT
00123 uint updateTypeCount();
00124
00125
00126 #endif // UPDATETYPE_HH