VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/UICloudEntityKey.h

Last change on this file was 106061, checked in by vboxsync, 3 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: UICloudEntityKey.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UICloudEntityKey class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h
29#define FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QHash>
36#include <QString>
37#include <QUuid>
38
39/** Cloud entity key definition.
40 * This is a key for various indexed containers,
41 * allowing to distinguish one cloud entity from another. */
42struct UICloudEntityKey
43{
44 /** Constructs cloud entity key on the basis of passed parameters.
45 * @param strProviderShortName Brings provider short name.
46 * @param strProfileName Brings profile name.
47 * @param uMachineId Brings machine id. */
48 UICloudEntityKey(const QString &strProviderShortName = QString(),
49 const QString &strProfileName = QString(),
50 const QUuid &uMachineId = QUuid());
51 /** Constructs cloud entity key on the basis of @a another one. */
52 UICloudEntityKey(const UICloudEntityKey &another);
53
54 /** Returns whether this one key equals to @a another one. */
55 bool operator==(const UICloudEntityKey &another) const;
56 /** Returns whether this one key is less than @a another one. */
57 bool operator<(const UICloudEntityKey &another) const;
58
59 /** Returns string key representation. */
60 QString toString() const;
61
62 /** Holds provider short name. */
63 QString m_strProviderShortName;
64 /** Holds profile name. */
65 QString m_strProfileName;
66 /** Holds machine id. */
67 QUuid m_uMachineId;
68};
69
70inline size_t qHash(const UICloudEntityKey &key, size_t uSeed)
71{
72 return qHash(key.toString(), uSeed);
73}
74
75#endif /* !FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette