mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 23:42:43 +02:00
40 lines
957 B
C++
40 lines
957 B
C++
//
|
|
// ScriptUUID.cpp
|
|
// libraries/script-engine/src/
|
|
//
|
|
// Created by Andrew Meadows on 2014-04-07
|
|
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
// Scriptable interface for a UUID helper class object. Used exclusively in the JavaScript API
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#include <QDebug>
|
|
|
|
#include "ScriptUUID.h"
|
|
|
|
QUuid ScriptUUID::fromString(const QString& s) {
|
|
return QUuid(s);
|
|
}
|
|
|
|
QString ScriptUUID::toString(const QUuid& id) {
|
|
return id.toString();
|
|
}
|
|
|
|
QUuid ScriptUUID::generate() {
|
|
return QUuid::createUuid();
|
|
}
|
|
|
|
bool ScriptUUID::isEqual(const QUuid& idA, const QUuid& idB) {
|
|
return idA == idB;
|
|
}
|
|
|
|
bool ScriptUUID::isNull(const QUuid& id) {
|
|
return id.isNull();
|
|
}
|
|
|
|
void ScriptUUID::print(const QString& lable, const QUuid& id) {
|
|
qDebug() << qPrintable(lable) << id.toString();
|
|
}
|