Something went wrong. Try again.
The agentic engineering control plane for the posthuman future
Something went wrong. Try again.
1.3 kB · 35 lines
C++
at main
123456789101112131415161718192021222324252627282930313233343536#include "NameGenerator.h"
#include <QRandomGenerator>
#include <array>#include <iterator>
NameGenerator::NameGenerator(QObject* parent) : QObject(parent) {}
QString NameGenerator::memorable() { static constexpr std::array<const char*, 15> adjectives = { "biolume", "molecular", "sinter", "rawsteel", "castiron", "oreseam", "voidsurface", "darkmatter", "hibernation", "singularity", "titanium", "polished", "sensor", "scrapmetal", "acidspray"}; static constexpr std::array<const char*, 20> nouns = { "forge", "reactor", "conduit", "node", "lattice", "core", "vessel", "shard", "prism", "resonator", "catalyst", "array", "engine", "membrane", "cortex", "nexus", "filament", "anvil", "relay", "beacon"};
QRandomGenerator* rng = QRandomGenerator::global(); const int adjectiveIndex = static_cast<int>(rng->bounded(static_cast<quint32>(adjectives.size()))); const int nounIndex = static_cast<int>(rng->bounded(static_cast<quint32>(nouns.size())));
const char* adjective = *std::next(adjectives.begin(), adjectiveIndex); const char* noun = *std::next(nouns.begin(), nounIndex);
return QStringLiteral("%1-%2") .arg(QString::fromUtf8(adjective)) .arg(QString::fromUtf8(noun));}