/** * @module cdat * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) * @brief TODO * @date 10.05.2009 */ #include "cdat.h" int CDat::value() const { return m_value; } /*----------------------------------------------------------------------------*/ bool CDat::operator<(const CDat& x) const { return m_value < x.m_value; } /*----------------------------------------------------------------------------*/ bool CDat::operator==(const CDat& x) const { return m_value == x.m_value; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator+=(const CDat& x) { m_value += x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator-=(const CDat& x) { m_value -= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator*=(const CDat& x) { m_value *= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator/=(const CDat& x) { m_value /= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator%=(const CDat& x) { m_value %= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator|=(const CDat& x) { m_value |= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator&=(const CDat& x) { m_value &= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator^=(const CDat& x) { m_value ^= x.m_value; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator++() { m_value++; return *this; } /*----------------------------------------------------------------------------*/ CDat& CDat::operator--() { m_value--; return *this; } /*----------------------------------------------------------------------------*/ std::ostream& operator<<(std::ostream& stream, CDat cdat) { stream << cdat.m_value; return stream; } /*----------------------------------------------------------------------------*/ std::istream& operator>>(std::istream & stream, CDat& cdat) { stream >> cdat.m_value; return stream; } /* vim: set et sw=2 ts=2: */