diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-30 20:41:50 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-30 20:41:50 (GMT) |
commit | b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa (patch) | |
tree | bade629bcca6b6a1417cb45be4349a3c27ea0feb /src/uscxml/plugins | |
parent | afbd0c4463c6f28ec1cd6ea45a68fdbcfcfeae6c (diff) | |
download | uscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.zip uscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.tar.gz uscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.tar.bz2 |
See detailled log
- Forcing Data.Type for Data(String) constructor now, default used to be INTERPRETED.
- setDataModel and addIOProcessor on interpreter now
- fixed a bug with Data(bool) constructor
- various smaller fixes
Diffstat (limited to 'src/uscxml/plugins')
11 files changed, 122 insertions, 108 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp index 64b61af..6d15f72 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp @@ -474,16 +474,17 @@ void JSCDataModel::setForeach(const std::string& item, // assign array element to item std::stringstream ss; ss << array << "[" << iteration << "]"; - assign(item, ss.str()); + assign(item, Data(ss.str(), Data::INTERPRETED)); if (index.length() > 0) { // assign iteration element to index std::stringstream ss; ss << iteration; - assign(index, ss.str()); + assign(index, Data(ss.str(), Data::INTERPRETED)); } } bool JSCDataModel::isLocation(const std::string& expr) { + // location needs to be RHS and ++ is only valid for RHS JSStringRef scriptJS = JSStringCreateWithUTF8CString((expr + "++").c_str()); JSValueRef exception = NULL; bool valid = JSCheckScriptSyntax(_ctx, scriptJS, NULL, 0, &exception); diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp index f4bfabd..cd27126 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp @@ -499,12 +499,12 @@ void V8DataModel::setForeach(const std::string& item, // assign array element to item std::stringstream ss; ss << array << "[" << iteration << "]"; - assign(item, ss.str()); + assign(item, Data(ss.str(), Data::INTERPRETED)); if (index.length() > 0) { // assign iteration element to index std::stringstream ss; ss << iteration; - assign(index, ss.str()); + assign(index, Data(ss.str(), Data::INTERPRETED)); } } @@ -753,7 +753,7 @@ void V8DataModel::throwExceptionEvent(const v8::TryCatch& tryCatch) { std::stringstream ssLineNumber; int lineNumber = message->GetLineNumber(); ssLineNumber << lineNumber; - exceptionEvent.data.compound["linenumber"] = Data(ssLineNumber.str()); + exceptionEvent.data.compound["linenumber"] = Data(ssLineNumber.str(), Data::INTERPRETED); int startColumn = message->GetStartColumn(); int endColumn = message->GetEndColumn(); diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index 018a8c4..bf8b538 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -44,14 +44,65 @@ bool pluginConnect(pluma::Host& host) { } #endif -LuaDataModel::LuaDataModel() { - _luaState = NULL; -} - static int luaInspect(lua_State * l) { return 0; } +static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { + luabridge::LuaRef luaData (_luaState); + + if (data.node) { + ERROR_EXECUTION_THROW("No DOM support in Lua datamodel"); + } + if (data.compound.size() > 0) { + luaData = luabridge::newTable(_luaState); + std::map<std::string, Data>::const_iterator compoundIter = data.compound.begin(); + while(compoundIter != data.compound.end()) { + luaData[compoundIter->first] = getDataAsLua(_luaState, compoundIter->second); + compoundIter++; + } + luaData["inspect"] = luaInspect; + return luaData; + } + if (data.array.size() > 0) { + luaData = luabridge::newTable(_luaState); + std::list<Data>::const_iterator arrayIter = data.array.begin(); + uint32_t index = 0; + while(arrayIter != data.array.end()) { + luaData[index++] = getDataAsLua(_luaState, *arrayIter); + arrayIter++; + } + luaData["inspect"] = luaInspect; + return luaData; + } + if (data.atom.size() > 0) { + switch (data.type) { + case Data::VERBATIM: { +// luaData = "\"" + data.atom + "\""; + luaData = data.atom; + break; + } + case Data::INTERPRETED: { + if (isNumeric(data.atom.c_str(), 10)) { + if (data.atom.find(".") != std::string::npos) { + luaData = strTo<double>(data.atom); + } else { + luaData = strTo<long>(data.atom); + } + } else { + luaData = data.atom; + } + } + } + return luaData; + } + return luaData; +} + +LuaDataModel::LuaDataModel() { + _luaState = NULL; +} + static int luaInFunction(lua_State * l) { luabridge::LuaRef ref = luabridge::getGlobal(l, "__interpreter"); InterpreterImpl* interpreter = ref.cast<InterpreterImpl*>(); @@ -78,23 +129,22 @@ boost::shared_ptr<DataModelImpl> LuaDataModel::create(InterpreterImpl* interpret luaL_openlibs(dm->_luaState); luabridge::getGlobalNamespace(dm->_luaState).beginClass<InterpreterImpl>("Interpreter").endClass(); + luabridge::setGlobal(dm->_luaState, dm->_interpreter, "__interpreter"); + luabridge::getGlobalNamespace(dm->_luaState).addCFunction("In", luaInFunction); -// luabridge::getGlobalNamespace(dm->_luaState) -// .beginClass <uscxml::Event> ("Event") -// .addProperty("name", &uscxml::Event::getName) -// .addProperty("raw", &uscxml::Event::getRaw) -// .addProperty("data", &uscxml::Event::getData) -// .addProperty("xml", &uscxml::Event::getXML) -// .addProperty("eventType", &uscxml::Event::getEventType) -// .addProperty("origin", &uscxml::Event::getOrigin) -// .addProperty("originType", &uscxml::Event::getOriginType) -// .addProperty("content", &uscxml::Event::getContent) -// .addProperty("invokeId", &uscxml::Event::getInvokeId) -// .addProperty("sendId", &uscxml::Event::getSendId) -// .endClass (); + luabridge::LuaRef ioProcTable = luabridge::newTable(dm->_luaState); - luabridge::setGlobal(dm->_luaState, dm->_interpreter, "__interpreter"); + std::map<std::string, IOProcessor>::const_iterator ioProcIter = dm->_interpreter->getIOProcessors().begin(); + while(ioProcIter != dm->_interpreter->getIOProcessors().end()) { + Data ioProcData = ioProcIter->second.getDataModelVariables(); + ioProcTable[ioProcIter->first] = getDataAsLua(dm->_luaState, ioProcData); + ioProcIter++; + } + luabridge::setGlobal(dm->_luaState, ioProcTable, "_ioprocessors"); + + luabridge::setGlobal(dm->_luaState, dm->_interpreter->getName(), "_name"); + luabridge::setGlobal(dm->_luaState, dm->_interpreter->getSessionId(), "_sessionid"); return dm; } @@ -142,56 +192,6 @@ static Data getLuaAsData(const luabridge::LuaRef& lua) { return data; } -static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { - luabridge::LuaRef luaData (_luaState); - - if (data.node) { - ERROR_EXECUTION_THROW("No DOM support in Lua datamodel"); - } - if (data.compound.size() > 0) { - luaData = luabridge::newTable(_luaState); - std::map<std::string, Data>::const_iterator compoundIter = data.compound.begin(); - while(compoundIter != data.compound.end()) { - luaData[compoundIter->first] = getDataAsLua(_luaState, compoundIter->second); - compoundIter++; - } - luaData["inspect"] = luaInspect; - return luaData; - } - if (data.array.size() > 0) { - luaData = luabridge::newTable(_luaState); - std::list<Data>::const_iterator arrayIter = data.array.begin(); - uint32_t index = 0; - while(arrayIter != data.array.end()) { - luaData[index++] = getDataAsLua(_luaState, *arrayIter); - arrayIter++; - } - luaData["inspect"] = luaInspect; - return luaData; - } - if (data.atom.size() > 0) { - switch (data.type) { - case Data::VERBATIM: { - luaData = "\"" + data.atom + "\""; - break; - } - case Data::INTERPRETED: { - if (isNumeric(data.atom.c_str(), 10)) { - if (data.atom.find(".") != std::string::npos) { - luaData = strTo<double>(data.atom); - } else { - luaData = strTo<long>(data.atom); - } - } else { - luaData = data.atom; - } - } - } - return luaData; - } - return luaData; -} - void LuaDataModel::setEvent(const Event& event) { luabridge::LuaRef luaEvent(_luaState); luaEvent = luabridge::newTable(_luaState); @@ -471,5 +471,16 @@ std::string LuaDataModel::evalAsString(const std::string& expr) { return ""; } +std::string LuaDataModel::andExpressions(std::list<std::string> exprs) { + std::stringstream exprSS; + std::list<std::string>::const_iterator listIter; + std::string andExpr; + for (listIter = exprs.begin(); listIter != exprs.end(); listIter++) { + exprSS << andExpr << *listIter; + andExpr = " && "; + } + return exprSS.str(); +} + }
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h index 828db0e..86e7e17 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h @@ -85,6 +85,8 @@ public: virtual std::string evalAsString(const std::string& expr); virtual bool evalAsBool(const Arabica::DOM::Node<std::string>& node, const std::string& expr); + virtual std::string andExpressions(std::list<std::string>); + protected: virtual int luaEval(const Arabica::DOM::Element<std::string>& scriptElem, diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp index c38842b..41e015e 100644 --- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp +++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp @@ -269,7 +269,7 @@ Data XPathDataModel::getStringAsData(const std::string& content) { std::string idx = ss.str(); ss.str(""); ss << ns[i]; - data.compound[idx] = Data(ss.str()); + data.compound[idx] = Data(ss.str(), Data::INTERPRETED); } data.type = Data::INTERPRETED; return data; diff --git a/src/uscxml/plugins/element/file/FileElement.cpp b/src/uscxml/plugins/element/file/FileElement.cpp index d5908ec..247c3c8 100644 --- a/src/uscxml/plugins/element/file/FileElement.cpp +++ b/src/uscxml/plugins/element/file/FileElement.cpp @@ -184,10 +184,10 @@ void FileElement::enterElement(const Arabica::DOM::Node<std::string>& node) { event.data.compound["file"].compound["name"] = Data(filename, Data::VERBATIM); event.data.compound["file"].compound["path"] = Data(_filepath, Data::VERBATIM); - event.data.compound["file"].compound["mtime"] = toStr(fileStat.st_mtime); - event.data.compound["file"].compound["ctime"] = toStr(fileStat.st_ctime); - event.data.compound["file"].compound["atime"] = toStr(fileStat.st_atime); - event.data.compound["file"].compound["size"] = toStr(fileStat.st_size); + event.data.compound["file"].compound["mtime"] = Data(toStr(fileStat.st_mtime), Data::INTERPRETED); + event.data.compound["file"].compound["ctime"] = Data(toStr(fileStat.st_ctime), Data::INTERPRETED); + event.data.compound["file"].compound["atime"] = Data(toStr(fileStat.st_atime), Data::INTERPRETED); + event.data.compound["file"].compound["size"] = Data(toStr(fileStat.st_size), Data::INTERPRETED); FILE *fp; diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp index eda4ce8..5e2d8eb 100644 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp +++ b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp @@ -225,7 +225,7 @@ void FFMPEGInvoker::finish(EncodingContext* ctx, const SendRequest& req) { Event event; event.name = "render.done"; - event.data.compound["context"] = context; + event.data.compound["context"] = Data(context, Data::INTERPRETED); event.data.compound["movie"] = Data(movieBuffer, length, "video/mpeg", true); event.data.compound["filename"] = Data(std::string("movie.") + ctx->extension, Data::VERBATIM); diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp index 902b825..c808192 100644 --- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp +++ b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp @@ -84,10 +84,10 @@ Data DirMonInvoker::getDataModelVariables() { std::map<std::string, struct stat> entries = _watcher->getAllEntries(); std::map<std::string, struct stat>::iterator entryIter = entries.begin(); while(entryIter != entries.end()) { - data.compound["file"].compound[entryIter->first].compound["mtime"] = toStr(entryIter->second.st_mtime); - data.compound["file"].compound[entryIter->first].compound["ctime"] = toStr(entryIter->second.st_mtime); - data.compound["file"].compound[entryIter->first].compound["atime"] = toStr(entryIter->second.st_mtime); - data.compound["file"].compound[entryIter->first].compound["size"] = toStr(entryIter->second.st_mtime); + data.compound["file"].compound[entryIter->first].compound["mtime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); + data.compound["file"].compound[entryIter->first].compound["ctime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); + data.compound["file"].compound[entryIter->first].compound["atime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); + data.compound["file"].compound[entryIter->first].compound["size"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); entryIter++; } @@ -252,10 +252,10 @@ void DirMonInvoker::handleChanges(DirectoryWatch::Action action, const std::stri } if (action != DirectoryWatch::DELETED) { - event.data.compound["file"].compound["mtime"] = toStr(fileStat.st_mtime); - event.data.compound["file"].compound["ctime"] = toStr(fileStat.st_ctime); - event.data.compound["file"].compound["atime"] = toStr(fileStat.st_atime); - event.data.compound["file"].compound["size"] = toStr(fileStat.st_size); + event.data.compound["file"].compound["mtime"] = Data(toStr(fileStat.st_mtime), Data::INTERPRETED); + event.data.compound["file"].compound["ctime"] = Data(toStr(fileStat.st_ctime), Data::INTERPRETED); + event.data.compound["file"].compound["atime"] = Data(toStr(fileStat.st_atime), Data::INTERPRETED); + event.data.compound["file"].compound["size"] = Data(toStr(fileStat.st_size), Data::INTERPRETED); } event.data.compound["file"].compound["name"] = Data(basename, Data::VERBATIM); diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp index 0ebf9b8..2a68be7 100644 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp @@ -42,7 +42,7 @@ #define EVAL_PARAM_EXPR(param, expr, key) \ if (param.find(key) == param.end() && param.find(expr) != param.end() && _interpreter->getDataModel()) \ - param.insert(std::make_pair(key, _interpreter->getDataModel().evalAsString(param.find(expr)->second.atom))); + param.insert(std::make_pair(key, Data(_interpreter->getDataModel().evalAsString(param.find(expr)->second.atom), Data::INTERPRETED))); #define CAST_PARAM(param, var, key, type) \ if (param.find(key) != param.end()) { \ diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp index 9dfe94f..7b45f2c 100644 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp +++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp @@ -282,7 +282,7 @@ void MilesSessionInvoker::send(const SendRequest& req) { void MilesSessionInvoker::processEventStart(const std::string& origin, const std::string& userid, const std::string& reflector, const std::string& session) { Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); //std::cout << req; if(num_connected>0) { num_connected++; @@ -383,7 +383,7 @@ void MilesSessionInvoker::processEventStart(const std::string& origin, const std void MilesSessionInvoker::processEventStop(const std::string& origin) { Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); if(num_connected==0) { LOG(ERROR) << "not connected"; @@ -419,7 +419,7 @@ void MilesSessionInvoker::processEventStop(const std::string& origin) { void MilesSessionInvoker::processEventParticipants(const std::string& origin) { Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); if(num_connected==0) { LOG(ERROR) << "not connected"; ev.name = "participants.error"; @@ -440,7 +440,7 @@ void MilesSessionInvoker::processEventParticipants(const std::string& origin) { void MilesSessionInvoker::processEventThumbnail(const std::string& origin, const std::string& userid) { Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); if(num_connected==0) { LOG(ERROR) << "not connected"; ev.name = "thumbnail.error"; @@ -496,52 +496,52 @@ void MilesSessionInvoker::processEventThumbnail(const std::string& origin, const void MilesSessionInvoker::processEventVideoOn(const std::string& origin, const std::string& userid) { Event ev; ev.name = "videoon.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); } void MilesSessionInvoker::processEventVideoOff(const std::string& origin, const std::string& userid) { Event ev; ev.name = "videooff.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); } void MilesSessionInvoker::processEventAudioOn(const std::string& origin, const std::string& userid) { Event ev; ev.name = "audioon.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); } void MilesSessionInvoker::processEventAudioOff(const std::string& origin, const std::string& userid) { Event ev; ev.name = "audiooff.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); } void MilesSessionInvoker::processEventSendVideo(const std::string& origin, size_t width, size_t height, size_t framerate, const std::string& compression) { Event ev; ev.name = "sendvideo.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); sendvideo_enabled = 1; returnEvent(ev); } void MilesSessionInvoker::processEventSendVideoOff(const std::string& origin) { Event ev; ev.name = "sendvideooff.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); sendvideo_enabled = 0; } void MilesSessionInvoker::processEventSendAudio(const std::string& origin, const std::string& encoding) { Event ev; ev.name = "sendaudio.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); sendaudio_enabled = 1; } void MilesSessionInvoker::processEventSendAudioOff(const std::string& origin) { Event ev; ev.name = "sendaudiooff.reply"; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); returnEvent(ev); sendaudio_enabled = 0; } @@ -552,7 +552,7 @@ void MilesSessionInvoker::processEventPostText(const std::string& origin, const int n, length; Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); if(num_connected==0) { LOG(ERROR) << "not connected"; ev.name = "posttext.error"; @@ -574,7 +574,7 @@ void MilesSessionInvoker::processEventPostText(const std::string& origin, const void MilesSessionInvoker::processEventGetText(const std::string& origin) { Event ev; - ev.data.compound["origin"] = origin; + ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); if(num_connected==0) { LOG(ERROR) << "not connected"; ev.name = "gettext.error"; diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp index 6ef1bd4..61008ff 100644 --- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp +++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp @@ -402,7 +402,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_DOUBLE: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedDouble(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedDouble(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetDouble(msg, fieldDesc)); @@ -423,7 +423,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_UINT32: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt32(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt32(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetUInt32(msg, fieldDesc)); @@ -433,7 +433,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_UINT64: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt64(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt64(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetUInt64(msg, fieldDesc)); @@ -442,7 +442,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_FLOAT: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedFloat(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedFloat(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetFloat(msg, fieldDesc)); @@ -456,7 +456,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_SFIXED32: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt32(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt32(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetInt32(msg, fieldDesc)); @@ -467,7 +467,7 @@ bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& case google::protobuf::FieldDescriptor::TYPE_SFIXED64: if (fieldDesc->is_repeated()) { for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt64(msg, fieldDesc, j)))); + data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt64(msg, fieldDesc, j)), Data::INTERPRETED)); } } else { data.compound[key].atom = toStr(reflect->GetInt64(msg, fieldDesc)); |