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.119 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.118 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.117 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.116 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.115 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.114 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.113 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.111 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.110 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.109 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.108 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.107 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.106 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.105 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.104 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.103 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.102 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.101 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.100 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.99 tracks/cpp/exercises/clock/example.h