/*
 * Copyright © 2020-2026 Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
 */
#ifndef ZIPDIRFS_CONTAINERS_HELPERS_CHANGED_H
#define ZIPDIRFS_CONTAINERS_HELPERS_CHANGED_H

#include <ZipDirFs/Utilities/FileTime.h>

namespace ZipDirFs::Containers::Helpers
{
	/**
	 * @brief An invokable definition to know if the observed object has changed
	 * @remarks State is reset on invocation. The changed state can only be captured once per
	 * change.
	 * @authors Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
	 */
	class Changed
	{
	public:
		typedef ::ZipDirFs::Utilities::FileTime FileTime;
		virtual ~Changed() = default;
		virtual bool operator()() = 0;
		virtual operator FileTime() const = 0;
	};
} // namespace ZipDirFs::Containers::Helpers

#endif // ZIPDIRFS_CONTAINERS_HELPERS_CHANGED_H
