/******************************************************************************
*	File		-	OpRes.h
*	Author		-	Joey Pollack
*	Date		-	2020/03/05 (y/m/d)
*	Mod Date	-	2020/03/05 (y/m/d)
*	Description	-	Operation Result. Also contains a message describing the result.
*
******************************************************************************/

#ifndef _OPERATION_RESULT_H_
#define _OPERATION_RESULT_H_

#include <string>

namespace lunarium
{
	enum ResultType
	{
		OK,
		WARNING,	// Not used yet
		FAIL
	};

	struct OpRes
	{
		ResultType Type;
		std::string Description;

		bool operator==(const OpRes& rhs);

		bool operator==(ResultType rhs);

		static OpRes OK();

		static OpRes Fail(const char* why);
	};

	bool IsOK(OpRes&& res);
	bool IsOK(OpRes& res);

	bool Failed(OpRes&& res);
	bool Failed(OpRes& res);
}

#endif	// _OPERATION_RESULT_H_