initial commit

This commit is contained in:
Blue 2018-08-05 00:46:25 +03:00 committed by Юрий Губич
commit 4b60ece582
327 changed files with 28286 additions and 0 deletions

View file

@ -0,0 +1,25 @@
#include "controllerstring.h"
uint64_t C::String::counter = 0;
C::String::String(const W::Address p_address, QObject* parent):
C::Controller(p_address, W::Address({W::String(u"string") += counter++}), parent),
data(u"")
{
W::Handler* get = W::Handler::create(address + W::Address({u"get"}), this, &C::String::_h_get);
addHandler(get);
}
C::String::~String()
{
}
void C::String::h_get(const W::Event& ev)
{
const W::Vocabulary& vc = static_cast<const W::Vocabulary&>(ev.getData());
data = static_cast<const W::String&>(vc.at(u"data"));
emit change(QString(data.toString().c_str()));
emit modification(data);
}