summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-30 20:41:50 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-30 20:41:50 (GMT)
commitb7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa (patch)
treebade629bcca6b6a1417cb45be4349a3c27ea0feb /src/uscxml/plugins/invoker
parentafbd0c4463c6f28ec1cd6ea45a68fdbcfcfeae6c (diff)
downloaduscxml-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/invoker')
-rw-r--r--src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp2
-rw-r--r--src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp16
-rw-r--r--src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp2
-rw-r--r--src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp28
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp12
5 files changed, 30 insertions, 30 deletions
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));