14namespace SkyObjectUserdata
34using Type = LinkData::Type;
35using LinkList = std::vector<LinkData>;
47 std::map<LinkData::Type, LinkList> links{ { Type::website, {} },
48 { Type::image, {} } };
51 inline LinkList &images() {
return links.at(Type::image); };
52 inline const LinkList &images()
const {
return links.at(Type::image); };
54 inline LinkList &websites() {
return links.at(Type::website); };
55 inline const LinkList &websites()
const {
return links.at(Type::website); };
57 auto findLinkByTitle(
const QString &title,
const Type type)
const
59 return std::find_if(cbegin(links.at(type)), cend(links.at(type)),
60 [&title](
const auto &entry) { return entry.title == title; });
63 auto findLinkByTitle(
const QString &title,
const Type type)
65 return std::find_if(begin(links.at(type)), end(links.at(type)),
66 [&title](
const auto &entry) { return entry.title == title; });
71 links[type].push_back(
LinkData{ std::move(title), std::move(url), type });
Stores Users' Logs, Pictures and Websites regarding an object in the sky.
Stores the tite and URL of a webpage.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.