コード例 #1
0
Power Power::operator-(const Power& rhs) const
{
    throwIfInvalid(*this);
    throwIfInvalid(rhs);

    if (rhs.m_power > this->m_power)
    {
        throw dptf_exception("Invalid power subtraction requested.  Right side is greater than left side.");
    }
    else
    {
        return Power(this->m_power - rhs.m_power);
    }
}
コード例 #2
0
Bool Power::operator<=(const Power& rhs) const
{
    throwIfInvalid(*this);
    throwIfInvalid(rhs);
    return (this->m_power <= rhs.m_power);
}
コード例 #3
0
Power Power::operator+(const Power& rhs) const
{
    throwIfInvalid(*this);
    throwIfInvalid(rhs);
    return Power(this->m_power + rhs.m_power);
}
コード例 #4
0
ファイル: Guid.cpp プロジェクト: hoangt/dptf
Guid::operator const UInt8*(void) const
{
    throwIfInvalid(*this);
    return m_guid;
}