1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#pragma once
// system
#include <memory>
#include <string>
namespace XdgUtils {
namespace DesktopEntry {
/**
* @brief Desktop Entry values accessor.
*
* Provides a mutable reference to the inner desktop entry key values and cast constructors
* to ease manipulation.
*/
class DesktopEntryKeyValue {
public:
DesktopEntryKeyValue(const DesktopEntryKeyValue& other);
DesktopEntryKeyValue& operator=(const DesktopEntryKeyValue& other);
explicit operator const char*();
explicit operator std::string();
explicit operator bool();
explicit operator int();
explicit operator double();
DesktopEntryKeyValue& operator=(double value);
DesktopEntryKeyValue& operator=(int value);
DesktopEntryKeyValue& operator=(const char* value);
DesktopEntryKeyValue& operator=(const std::string& value);
DesktopEntryKeyValue& operator=(bool value);
~DesktopEntryKeyValue();
protected:
class Priv;
std::unique_ptr<Priv> priv;
friend class DesktopEntry;
explicit DesktopEntryKeyValue(Priv* priv);
};
}
}
|