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.180 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.179 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.178 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.177 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.176 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.175 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.174 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.173 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.172 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.171 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.170 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.169 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.167 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.166 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.165 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.164 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.163 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.162 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.161 tracks/cpp/exercises/clock/example.h
trackler-2.2.1.160 tracks/cpp/exercises/clock/example.h