Showing the changes to libraries/script-engine/src/ScriptUUID.cpp (1 of 4 files). Show all
Unified · Split
| @@ -0,0 +1,35 @@ | |||
| 1 | // | ||
| 2 | // ScriptUUID.h | ||
| 3 | // hifi | ||
| 4 | // | ||
| 5 | // Created by Andrew Meadows on 2014.04.07 | ||
| 6 | // Copyright (c) 2014 High Fidelity, Inc. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #include <QDebug> | ||
| 10 | |||
| 11 | #include "ScriptUUID.h" | ||
| 12 | |||
| 13 | QUuid ScriptUUID::fromString(const QString& s) { | ||
| 14 | return QUuid(s); | ||
| 15 | } | ||
| 16 | |||
| 17 | QString ScriptUUID::toString(const QUuid& id) { | ||
| 18 | return id.toString(); | ||
| 19 | } | ||
| 20 | |||
| 21 | QUuid ScriptUUID::generate() { | ||
| 22 | return QUuid::createUuid(); | ||
| 23 | } | ||
| 24 | |||
| 25 | bool ScriptUUID::isEqual(const QUuid& idA, const QUuid& idB) { | ||
| 26 | return idA == idB; | ||
| 27 | } | ||
| 28 | |||
| 29 | bool ScriptUUID::isNull(const QUuid& id) { | ||
| 30 | return id.isNull(); | ||
| 31 | } | ||
| 32 | |||
| 33 | void ScriptUUID::print(const QString& lable, const QUuid& id) { | ||
| 34 | qDebug() << qPrintable(lable) << id.toString(); | ||
| 35 | } | ||