diff --git a/humanreadableobject.cpp b/humanreadableobject.cpp new file mode 100644 index 0000000..96ab2dc --- /dev/null +++ b/humanreadableobject.cpp @@ -0,0 +1,18 @@ +//# +//# Copyright (C) 2022-2022 QuasarApp. +//# Distributed under the GPLv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + + +#include "humanreadableobject.h" + +namespace QuasarAppUtils{ + +HumanReadableObject::HumanReadableObject() +{ + +} + +} diff --git a/humanreadableobject.h b/humanreadableobject.h new file mode 100644 index 0000000..b6d07dd --- /dev/null +++ b/humanreadableobject.h @@ -0,0 +1,38 @@ +//# +//# Copyright (C) 2022-2022 QuasarApp. +//# Distributed under the GPLv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + +#ifndef HUMANREADABLEOBJECT_H +#define HUMANREADABLEOBJECT_H + +#include + +namespace QuasarAppUtils { + +/** + * @brief The HumanReadableObject interface This is simple class that add one virtula method toString. + * All childs object should be override this method. + */ +class HumanReadableObject +{ +public: + /** + * @brief toString This method convert this object to human readable string. + * @return human readable string of this object. + */ + virtual QString toString() const = 0; + +protected: + HumanReadableObject(); +}; + +/** + * @brief HRO This is short abriviature of the HumanReadableObject class. + */ +typedef HumanReadableObject HRO; + +} +#endif // HUMANREADABLEOBJECT_H