summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-10-30 19:48:58 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-10-30 19:49:56 (GMT)
commitaeae699f47c3f9a148903525943b6876c39a598d (patch)
treed7e21e3a011e1ceef3b6a7b1b8da335fba851144 /Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
parent63bc9a94d2a5f69420de831248786f77c8622feb (diff)
downloadswift-aeae699f47c3f9a148903525943b6876c39a598d.zip
swift-aeae699f47c3f9a148903525943b6876c39a598d.tar.bz2
Implement missing conversion of some PubSub attributes
Change-Id: I51a4249fa84aa40dc2a6e3f2c7e5a9c8fce93f32
Diffstat (limited to 'Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp')
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp b/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
index 3d40be9..73d7d6a 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
@@ -32,6 +32,26 @@ boost::shared_ptr<PubSubAffiliation> PubSubAffiliationConvertor::doConvertFromLu
}
lua_pop(L, 1);
lua_getfield(L, -1, "type");
+ if (lua_isstring(L, -1)) {
+ if (std::string(lua_tostring(L, -1)) == "none") {
+ result->setType(PubSubAffiliation::None);
+ }
+ if (std::string(lua_tostring(L, -1)) == "member") {
+ result->setType(PubSubAffiliation::Member);
+ }
+ if (std::string(lua_tostring(L, -1)) == "outcast") {
+ result->setType(PubSubAffiliation::Outcast);
+ }
+ if (std::string(lua_tostring(L, -1)) == "owner") {
+ result->setType(PubSubAffiliation::Owner);
+ }
+ if (std::string(lua_tostring(L, -1)) == "publisher") {
+ result->setType(PubSubAffiliation::Publisher);
+ }
+ if (std::string(lua_tostring(L, -1)) == "publish_only") {
+ result->setType(PubSubAffiliation::PublishOnly);
+ }
+ }
lua_pop(L, 1);
return result;
}