00001 // This file's extension implies that it's C, but it's really -*- C++ -*-. 00002 // $Id$ 00011 #ifndef ATHCONTAINERS_ISMOSTDERIVEDFLAG_H 00012 #define ATHCONTAINERS_ISMOSTDERIVEDFLAG_H 00013 00014 00015 namespace SG { 00016 00017 00028 class IsMostDerivedFlag 00029 { 00030 public: 00031 IsMostDerivedFlag() : m_flag(false) {} 00032 IsMostDerivedFlag(bool flag) : m_flag(flag) {} 00033 IsMostDerivedFlag(const IsMostDerivedFlag&) : m_flag(false) {} 00034 #if __cplusplus > 201100 00035 IsMostDerivedFlag(IsMostDerivedFlag&&) : m_flag(false) {} 00036 #endif 00037 operator bool() const { return m_flag; } 00038 IsMostDerivedFlag& operator= (const IsMostDerivedFlag&) { return *this; } 00039 IsMostDerivedFlag& operator= (bool flag) { m_flag = flag; return *this;} 00040 00041 private: 00042 bool m_flag; 00043 }; 00044 00045 00046 } // namespace SG 00047 00048 00049 #endif // not ATHCONTAINERS_ISMOSTDERIVEDFLAG_H