Sha256: 74bb7ea77a1a11a856065976fbc421da450112df5e38e232b83c63e072c60c62

Contents?: true

Size: 497 Bytes

Versions: 240

Compression:

Stored size: 497 Bytes

Contents

#if !defined(CLOCK_H)
#define CLOCK_H

#include <string>

namespace date_independent
{

class clock
{
public:
    static clock at(int hour, int minute = 0);

    clock& plus(int minutes);
    clock& minus(int minutes);

    operator std::string() const;

    bool operator==(const clock& rhs) const;

private:
    clock(int hour, int minute);
    void clean();
    int hour_;
    int minute_;
};

inline bool operator!=(const clock& lhs, const clock& rhs)
{
    return !(lhs == rhs);
}

}

#endif

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.138 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.137 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.136 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.135 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.134 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.133 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.132 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.131 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.130 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.129 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.128 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.127 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.126 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.125 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.124 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.123 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.122 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.121 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.120 tracks/cpp/exercises/clock/example.h