summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-01 17:23:49 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-04 08:28:23 (GMT)
commit741c45b74d5f634622eb5f757c49323274fb8937 (patch)
treeb9cfa6c2fe2e79e03cc8cb7c1ca1e9cf45aa5328 /Sluift
parenteddd92ed76ae68cb1e202602fd3ebd11b69191a2 (diff)
downloadswift-741c45b74d5f634622eb5f757c49323274fb8937.zip
swift-741c45b74d5f634622eb5f757c49323274fb8937.tar.bz2
Modernize code to use C++11 shared_ptr instead of Boost's
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/ElementConvertors/BodyConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/BodyConvertor.h4
-rw-r--r--Sluift/ElementConvertors/CommandConvertor.cpp11
-rw-r--r--Sluift/ElementConvertors/CommandConvertor.h4
-rw-r--r--Sluift/ElementConvertors/DOMElementConvertor.cpp19
-rw-r--r--Sluift/ElementConvertors/DOMElementConvertor.h4
-rw-r--r--Sluift/ElementConvertors/DefaultElementConvertor.cpp6
-rw-r--r--Sluift/ElementConvertors/DefaultElementConvertor.h6
-rw-r--r--Sluift/ElementConvertors/DelayConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/DelayConvertor.h4
-rw-r--r--Sluift/ElementConvertors/DiscoInfoConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/DiscoInfoConvertor.h4
-rw-r--r--Sluift/ElementConvertors/DiscoItemsConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/DiscoItemsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/ElementConvertors.ipp78
-rw-r--r--Sluift/ElementConvertors/FormConvertor.cpp36
-rw-r--r--Sluift/ElementConvertors/FormConvertor.h4
-rw-r--r--Sluift/ElementConvertors/ForwardedConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/ForwardedConvertor.h4
-rw-r--r--Sluift/ElementConvertors/IQConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/IQConvertor.h4
-rw-r--r--Sluift/ElementConvertors/IsodeIQDelegationConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/IsodeIQDelegationConvertor.h4
-rw-r--r--Sluift/ElementConvertors/MAMFinConvertor.cpp11
-rw-r--r--Sluift/ElementConvertors/MAMFinConvertor.h4
-rw-r--r--Sluift/ElementConvertors/MAMQueryConvertor.cpp13
-rw-r--r--Sluift/ElementConvertors/MAMQueryConvertor.h4
-rw-r--r--Sluift/ElementConvertors/MAMResultConvertor.cpp11
-rw-r--r--Sluift/ElementConvertors/MAMResultConvertor.h4
-rw-r--r--Sluift/ElementConvertors/MessageConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/MessageConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PresenceConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PresenceConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubConfigureConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubConfigureConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubCreateConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubCreateConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubDefaultConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubDefaultConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventAssociateConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventAssociateConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventCollectionConvertor.cpp12
-rw-r--r--Sluift/ElementConvertors/PubSubEventCollectionConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventConfigurationConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubEventConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventDeleteConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubEventDeleteConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventDisassociateConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp21
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventPurgeConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventPurgeConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventRedirectConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventRedirectConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventRetractConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventRetractConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubItemConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubItemConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubItemsConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubItemsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOptionsConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubOptionsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubPublishConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubPublishConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubRetractConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubRetractConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionConvertor.cpp10
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp15
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h4
-rw-r--r--Sluift/ElementConvertors/PubSubUnsubscribeConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h4
-rw-r--r--Sluift/ElementConvertors/RawXMLElementConvertor.cpp13
-rw-r--r--Sluift/ElementConvertors/RawXMLElementConvertor.h4
-rw-r--r--Sluift/ElementConvertors/ResultSetConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/ResultSetConvertor.h4
-rw-r--r--Sluift/ElementConvertors/SecurityLabelConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/SecurityLabelConvertor.h4
-rw-r--r--Sluift/ElementConvertors/SoftwareVersionConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/SoftwareVersionConvertor.h4
-rw-r--r--Sluift/ElementConvertors/StanzaConvertor.h10
-rw-r--r--Sluift/ElementConvertors/StatusConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/StatusConvertor.h4
-rw-r--r--Sluift/ElementConvertors/StatusShowConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/StatusShowConvertor.h4
-rw-r--r--Sluift/ElementConvertors/SubjectConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/SubjectConvertor.h4
-rw-r--r--Sluift/ElementConvertors/UserLocationConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/UserLocationConvertor.h4
-rw-r--r--Sluift/ElementConvertors/UserTuneConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/UserTuneConvertor.h4
-rw-r--r--Sluift/ElementConvertors/VCardConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/VCardConvertor.h4
-rw-r--r--Sluift/ElementConvertors/VCardUpdateConvertor.cpp9
-rw-r--r--Sluift/ElementConvertors/VCardUpdateConvertor.h4
-rw-r--r--Sluift/GenericLuaElementConvertor.h14
-rw-r--r--Sluift/ITunesInterface.h6
-rw-r--r--Sluift/ITunesInterface.mm4
-rw-r--r--Sluift/Lua/Value.cpp4
-rw-r--r--Sluift/Lua/Value.h31
-rw-r--r--Sluift/LuaElementConvertor.h6
-rw-r--r--Sluift/LuaElementConvertors.cpp68
-rw-r--r--Sluift/LuaElementConvertors.h16
-rw-r--r--Sluift/Response.cpp2
-rw-r--r--Sluift/Response.h14
-rw-r--r--Sluift/SluiftClient.cpp12
-rw-r--r--Sluift/SluiftClient.h28
-rw-r--r--Sluift/SluiftComponent.cpp10
-rw-r--r--Sluift/SluiftComponent.h20
-rw-r--r--Sluift/client.cpp86
-rw-r--r--Sluift/component.cpp54
-rw-r--r--Sluift/sluift.cpp6
145 files changed, 716 insertions, 690 deletions
diff --git a/Sluift/ElementConvertors/BodyConvertor.cpp b/Sluift/ElementConvertors/BodyConvertor.cpp
index 4593f01..f6797b0 100644
--- a/Sluift/ElementConvertors/BodyConvertor.cpp
+++ b/Sluift/ElementConvertors/BodyConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/BodyConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -20,15 +20,15 @@ BodyConvertor::BodyConvertor() : GenericLuaElementConvertor<Body>("body") {
BodyConvertor::~BodyConvertor() {
}
-boost::shared_ptr<Body> BodyConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Body> result = boost::make_shared<Body>();
+std::shared_ptr<Body> BodyConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Body> result = std::make_shared<Body>();
if (boost::optional<std::string> value = Lua::getStringField(L, -1, "text")) {
result->setText(*value);
}
return result;
}
-void BodyConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Body> payload) {
+void BodyConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Body> payload) {
lua_createtable(L, 0, 0);
if (!payload->getText().empty()) {
lua_pushstring(L, payload->getText().c_str());
diff --git a/Sluift/ElementConvertors/BodyConvertor.h b/Sluift/ElementConvertors/BodyConvertor.h
index 75d23e7..64ff4d0 100644
--- a/Sluift/ElementConvertors/BodyConvertor.h
+++ b/Sluift/ElementConvertors/BodyConvertor.h
@@ -19,7 +19,7 @@ namespace Swift {
BodyConvertor();
virtual ~BodyConvertor();
- virtual boost::shared_ptr<Body> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Body>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Body> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Body>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/CommandConvertor.cpp b/Sluift/ElementConvertors/CommandConvertor.cpp
index 272e5d1..5bc3801 100644
--- a/Sluift/ElementConvertors/CommandConvertor.cpp
+++ b/Sluift/ElementConvertors/CommandConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/CommandConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -49,8 +50,8 @@ CommandConvertor::CommandConvertor(LuaElementConvertors* convertors) :
CommandConvertor::~CommandConvertor() {
}
-boost::shared_ptr<Command> CommandConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Command> result = boost::make_shared<Command>();
+std::shared_ptr<Command> CommandConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Command> result = std::make_shared<Command>();
lua_getfield(L, -1, "node");
if (!lua_isnil(L, -1)) {
@@ -129,7 +130,7 @@ boost::shared_ptr<Command> CommandConvertor::doConvertFromLua(lua_State* L) {
lua_getfield(L, -1, "form");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> form = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> form = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setForm(form);
}
}
@@ -138,7 +139,7 @@ boost::shared_ptr<Command> CommandConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void CommandConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Command> payload) {
+void CommandConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Command> payload) {
Lua::Table result;
if (!payload->getNode().empty()) {
result["node"] = Lua::valueRef(payload->getNode());
diff --git a/Sluift/ElementConvertors/CommandConvertor.h b/Sluift/ElementConvertors/CommandConvertor.h
index 97b3f2f..1b0d481 100644
--- a/Sluift/ElementConvertors/CommandConvertor.h
+++ b/Sluift/ElementConvertors/CommandConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
CommandConvertor(LuaElementConvertors* convertors);
virtual ~CommandConvertor();
- virtual boost::shared_ptr<Command> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Command>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Command> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Command>) SWIFTEN_OVERRIDE;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/DOMElementConvertor.cpp b/Sluift/ElementConvertors/DOMElementConvertor.cpp
index 85b505d..1e0e1bb 100644
--- a/Sluift/ElementConvertors/DOMElementConvertor.cpp
+++ b/Sluift/ElementConvertors/DOMElementConvertor.cpp
@@ -7,8 +7,7 @@
#include <Sluift/ElementConvertors/DOMElementConvertor.h>
#include <iostream>
-
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -145,10 +144,10 @@ namespace {
int index = Lua::absoluteOffset(L, -1);
for (lua_pushnil(L); lua_next(L, index) != 0; ) {
if (lua_isstring(L, -1)) {
- element.addNode(boost::make_shared<XMLTextNode>(lua_tostring(L, -1)));
+ element.addNode(std::make_shared<XMLTextNode>(lua_tostring(L, -1)));
}
else if (lua_istable(L, -1)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializeElement(L)));
+ element.addNode(std::make_shared<XMLRawTextNode>(serializeElement(L)));
}
lua_pop(L, 1); // value
}
@@ -165,17 +164,17 @@ DOMElementConvertor::DOMElementConvertor() {
DOMElementConvertor::~DOMElementConvertor() {
}
-boost::shared_ptr<Element> DOMElementConvertor::convertFromLua(lua_State* L, int index, const std::string& type) {
+std::shared_ptr<Element> DOMElementConvertor::convertFromLua(lua_State* L, int index, const std::string& type) {
if (!lua_istable(L, index) || type != "dom") {
- return boost::shared_ptr<Payload>();
+ return std::shared_ptr<Payload>();
}
- return boost::make_shared<RawXMLPayload>(serializeElement(L).c_str());
+ return std::make_shared<RawXMLPayload>(serializeElement(L).c_str());
}
boost::optional<std::string> DOMElementConvertor::convertToLua(
- lua_State* L, boost::shared_ptr<Element> element) {
+ lua_State* L, std::shared_ptr<Element> element) {
// Serialize payload to XML
- boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(element);
+ std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(element);
if (!payload) {
return boost::optional<std::string>();
}
@@ -188,7 +187,7 @@ boost::optional<std::string> DOMElementConvertor::convertToLua(
// Parse the payload again
ParserClient parserClient(L);
- boost::shared_ptr<XMLParser> parser(parsers.createXMLParser(&parserClient));
+ std::shared_ptr<XMLParser> parser(parsers.createXMLParser(&parserClient));
bool result = parser->parse(serializedPayload);
assert(result);
diff --git a/Sluift/ElementConvertors/DOMElementConvertor.h b/Sluift/ElementConvertors/DOMElementConvertor.h
index 0d20251..7b1ba58 100644
--- a/Sluift/ElementConvertors/DOMElementConvertor.h
+++ b/Sluift/ElementConvertors/DOMElementConvertor.h
@@ -18,8 +18,8 @@ namespace Swift {
DOMElementConvertor();
virtual ~DOMElementConvertor();
- virtual boost::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, boost::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
private:
PlatformXMLParserFactory parsers;
diff --git a/Sluift/ElementConvertors/DefaultElementConvertor.cpp b/Sluift/ElementConvertors/DefaultElementConvertor.cpp
index 8353207..f422139 100644
--- a/Sluift/ElementConvertors/DefaultElementConvertor.cpp
+++ b/Sluift/ElementConvertors/DefaultElementConvertor.cpp
@@ -18,12 +18,12 @@ DefaultElementConvertor::DefaultElementConvertor() {
DefaultElementConvertor::~DefaultElementConvertor() {
}
-boost::shared_ptr<Element> DefaultElementConvertor::convertFromLua(lua_State*, int, const std::string& type) {
+std::shared_ptr<Element> DefaultElementConvertor::convertFromLua(lua_State*, int, const std::string& type) {
std::cerr << "Warning: Unable to convert type '" << type << "'" << std::endl;
- return boost::shared_ptr<Element>();
+ return std::shared_ptr<Element>();
}
-boost::optional<std::string> DefaultElementConvertor::convertToLua(lua_State*, boost::shared_ptr<Element>) {
+boost::optional<std::string> DefaultElementConvertor::convertToLua(lua_State*, std::shared_ptr<Element>) {
// Should have been handled by the raw XML convertor
assert(false);
return NO_RESULT;
diff --git a/Sluift/ElementConvertors/DefaultElementConvertor.h b/Sluift/ElementConvertors/DefaultElementConvertor.h
index 8f57e4f..4aec300 100644
--- a/Sluift/ElementConvertors/DefaultElementConvertor.h
+++ b/Sluift/ElementConvertors/DefaultElementConvertor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
DefaultElementConvertor();
virtual ~DefaultElementConvertor();
- virtual boost::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, boost::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/DelayConvertor.cpp b/Sluift/ElementConvertors/DelayConvertor.cpp
index b59744b..f23e137 100644
--- a/Sluift/ElementConvertors/DelayConvertor.cpp
+++ b/Sluift/ElementConvertors/DelayConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/DelayConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -23,8 +24,8 @@ DelayConvertor::DelayConvertor() : GenericLuaElementConvertor<Delay>("delay") {
DelayConvertor::~DelayConvertor() {
}
-boost::shared_ptr<Delay> DelayConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Delay> result = boost::make_shared<Delay>();
+std::shared_ptr<Delay> DelayConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Delay> result = std::make_shared<Delay>();
lua_getfield(L, -1, "stamp");
if (lua_isstring(L, -1)) {
result->setStamp(stringToDateTime(lua_tostring(L, -1)));
@@ -39,7 +40,7 @@ boost::shared_ptr<Delay> DelayConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void DelayConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Delay> payload) {
+void DelayConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Delay> payload) {
lua_createtable(L, 0, 0);
if (payload->getFrom()) {
lua_pushstring(L, (*payload->getFrom()).toString().c_str());
diff --git a/Sluift/ElementConvertors/DelayConvertor.h b/Sluift/ElementConvertors/DelayConvertor.h
index 064406c..b9f72f2 100644
--- a/Sluift/ElementConvertors/DelayConvertor.h
+++ b/Sluift/ElementConvertors/DelayConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
DelayConvertor();
virtual ~DelayConvertor();
- virtual boost::shared_ptr<Delay> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Delay>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Delay> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Delay>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/DiscoInfoConvertor.cpp b/Sluift/ElementConvertors/DiscoInfoConvertor.cpp
index fc48e6c..2aa4a77 100644
--- a/Sluift/ElementConvertors/DiscoInfoConvertor.cpp
+++ b/Sluift/ElementConvertors/DiscoInfoConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/DiscoInfoConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -21,8 +22,8 @@ DiscoInfoConvertor::DiscoInfoConvertor() : GenericLuaElementConvertor<DiscoInfo>
DiscoInfoConvertor::~DiscoInfoConvertor() {
}
-boost::shared_ptr<DiscoInfo> DiscoInfoConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<DiscoInfo> result = boost::make_shared<DiscoInfo>();
+std::shared_ptr<DiscoInfo> DiscoInfoConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<DiscoInfo> result = std::make_shared<DiscoInfo>();
if (boost::optional<std::string> value = Lua::getStringField(L, -1, "node")) {
result->setNode(*value);
}
@@ -56,7 +57,7 @@ boost::shared_ptr<DiscoInfo> DiscoInfoConvertor::doConvertFromLua(lua_State* L)
return result;
}
-void DiscoInfoConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<DiscoInfo> payload) {
+void DiscoInfoConvertor::doConvertToLua(lua_State* L, std::shared_ptr<DiscoInfo> payload) {
lua_newtable(L);
if (!payload->getNode().empty()) {
lua_pushstring(L, payload->getNode().c_str());
diff --git a/Sluift/ElementConvertors/DiscoInfoConvertor.h b/Sluift/ElementConvertors/DiscoInfoConvertor.h
index 9e8d36d..34f8237 100644
--- a/Sluift/ElementConvertors/DiscoInfoConvertor.h
+++ b/Sluift/ElementConvertors/DiscoInfoConvertor.h
@@ -17,8 +17,8 @@ namespace Swift {
DiscoInfoConvertor();
virtual ~DiscoInfoConvertor();
- virtual boost::shared_ptr<DiscoInfo> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<DiscoInfo>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<DiscoInfo> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoInfo>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/DiscoItemsConvertor.cpp b/Sluift/ElementConvertors/DiscoItemsConvertor.cpp
index 32cbb6e..c15a0f8 100644
--- a/Sluift/ElementConvertors/DiscoItemsConvertor.cpp
+++ b/Sluift/ElementConvertors/DiscoItemsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/DiscoItemsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -21,8 +22,8 @@ DiscoItemsConvertor::DiscoItemsConvertor() : GenericLuaElementConvertor<DiscoIte
DiscoItemsConvertor::~DiscoItemsConvertor() {
}
-boost::shared_ptr<DiscoItems> DiscoItemsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<DiscoItems> result = boost::make_shared<DiscoItems>();
+std::shared_ptr<DiscoItems> DiscoItemsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<DiscoItems> result = std::make_shared<DiscoItems>();
if (boost::optional<std::string> value = Lua::getStringField(L, -1, "node")) {
result->setNode(*value);
}
@@ -40,7 +41,7 @@ boost::shared_ptr<DiscoItems> DiscoItemsConvertor::doConvertFromLua(lua_State* L
return result;
}
-void DiscoItemsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<DiscoItems> payload) {
+void DiscoItemsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<DiscoItems> payload) {
lua_newtable(L);
if (!payload->getNode().empty()) {
lua_pushstring(L, payload->getNode().c_str());
diff --git a/Sluift/ElementConvertors/DiscoItemsConvertor.h b/Sluift/ElementConvertors/DiscoItemsConvertor.h
index aa1f1e5..a77b948 100644
--- a/Sluift/ElementConvertors/DiscoItemsConvertor.h
+++ b/Sluift/ElementConvertors/DiscoItemsConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
DiscoItemsConvertor();
virtual ~DiscoItemsConvertor();
- virtual boost::shared_ptr<DiscoItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<DiscoItems>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<DiscoItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoItems>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/ElementConvertors.ipp b/Sluift/ElementConvertors/ElementConvertors.ipp
index 64e7540..a81c9cf 100644
--- a/Sluift/ElementConvertors/ElementConvertors.ipp
+++ b/Sluift/ElementConvertors/ElementConvertors.ipp
@@ -45,43 +45,43 @@
#include <Sluift/ElementConvertors/UserTuneConvertor.h>
void LuaElementConvertors::registerConvertors() {
- convertors.push_back(boost::make_shared<PubSubRetractConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubAffiliationsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubPublishConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubItemsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerRedirectConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventRedirectConvertor>());
- convertors.push_back(boost::make_shared<UserTuneConvertor>());
- convertors.push_back(boost::make_shared<PubSubConfigureConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubEventDisassociateConvertor>());
- convertors.push_back(boost::make_shared<PubSubOwnerAffiliationsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerConfigureConvertor>(this));
- convertors.push_back(boost::make_shared<UserLocationConvertor>());
- convertors.push_back(boost::make_shared<PubSubSubscribeOptionsConvertor>());
- convertors.push_back(boost::make_shared<PubSubOwnerSubscriptionsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubDefaultConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventCollectionConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubEventSubscriptionConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventRetractConvertor>());
- convertors.push_back(boost::make_shared<PubSubItemConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubUnsubscribeConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventDeleteConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubCreateConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerPurgeConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventItemsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOptionsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubEventItemConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerSubscriptionConvertor>());
- convertors.push_back(boost::make_shared<IsodeIQDelegationConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerAffiliationConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventPurgeConvertor>());
- convertors.push_back(boost::make_shared<PubSubAffiliationConvertor>());
- convertors.push_back(boost::make_shared<PubSubSubscribeConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerDeleteConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubOwnerDefaultConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubSubscriptionsConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubEventAssociateConvertor>());
- convertors.push_back(boost::make_shared<PubSubSubscriptionConvertor>(this));
- convertors.push_back(boost::make_shared<SecurityLabelConvertor>());
- convertors.push_back(boost::make_shared<PubSubEventConfigurationConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubRetractConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubAffiliationsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubPublishConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubItemsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerRedirectConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventRedirectConvertor>());
+ convertors.push_back(std::make_shared<UserTuneConvertor>());
+ convertors.push_back(std::make_shared<PubSubConfigureConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubEventDisassociateConvertor>());
+ convertors.push_back(std::make_shared<PubSubOwnerAffiliationsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerConfigureConvertor>(this));
+ convertors.push_back(std::make_shared<UserLocationConvertor>());
+ convertors.push_back(std::make_shared<PubSubSubscribeOptionsConvertor>());
+ convertors.push_back(std::make_shared<PubSubOwnerSubscriptionsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubDefaultConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventCollectionConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubEventSubscriptionConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventRetractConvertor>());
+ convertors.push_back(std::make_shared<PubSubItemConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubUnsubscribeConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventDeleteConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubCreateConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerPurgeConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventItemsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOptionsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubEventItemConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerSubscriptionConvertor>());
+ convertors.push_back(std::make_shared<IsodeIQDelegationConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerAffiliationConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventPurgeConvertor>());
+ convertors.push_back(std::make_shared<PubSubAffiliationConvertor>());
+ convertors.push_back(std::make_shared<PubSubSubscribeConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerDeleteConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubOwnerDefaultConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubSubscriptionsConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubEventAssociateConvertor>());
+ convertors.push_back(std::make_shared<PubSubSubscriptionConvertor>(this));
+ convertors.push_back(std::make_shared<SecurityLabelConvertor>());
+ convertors.push_back(std::make_shared<PubSubEventConfigurationConvertor>(this));
}
diff --git a/Sluift/ElementConvertors/FormConvertor.cpp b/Sluift/ElementConvertors/FormConvertor.cpp
index 5b6f664..a0e3dfe 100644
--- a/Sluift/ElementConvertors/FormConvertor.cpp
+++ b/Sluift/ElementConvertors/FormConvertor.cpp
@@ -6,11 +6,11 @@
#include <Sluift/ElementConvertors/FormConvertor.h>
+#include <memory>
#include <sstream>
#include <boost/assign/list_of.hpp>
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -66,7 +66,7 @@ namespace {
return 0;
}
- Lua::Table convertFieldToLua(boost::shared_ptr<FormField> field) {
+ Lua::Table convertFieldToLua(std::shared_ptr<FormField> field) {
Lua::Table luaField = boost::assign::map_list_of("name", Lua::valueRef(field->getName()));
std::string type;
switch (field->getType()) {
@@ -116,17 +116,17 @@ namespace {
return luaField;
}
- Lua::Array convertFieldListToLua(const std::vector< boost::shared_ptr<FormField> >& fieldList) {
+ Lua::Array convertFieldListToLua(const std::vector< std::shared_ptr<FormField> >& fieldList) {
Lua::Array fields;
- foreach(boost::shared_ptr<FormField> field, fieldList) {
+ foreach(std::shared_ptr<FormField> field, fieldList) {
fields.push_back(convertFieldToLua(field));
}
return fields;
}
- boost::shared_ptr<FormField> convertFieldFromLua(lua_State* L) {
- boost::shared_ptr<FormField> result = boost::make_shared<FormField>();
+ std::shared_ptr<FormField> convertFieldFromLua(lua_State* L) {
+ std::shared_ptr<FormField> result = std::make_shared<FormField>();
FormField::Type fieldType = FormField::UnknownType;
boost::optional<std::string> type = Lua::getStringField(L, -1, "type");
if (type) {
@@ -212,8 +212,8 @@ namespace {
return result;
}
- std::vector< boost::shared_ptr<FormField> > convertFieldListFromLua(lua_State* L) {
- std::vector< boost::shared_ptr<FormField> > result;
+ std::vector< std::shared_ptr<FormField> > convertFieldListFromLua(lua_State* L) {
+ std::vector< std::shared_ptr<FormField> > result;
for (lua_pushnil(L); lua_next(L, -2);) {
result.push_back(convertFieldFromLua(L));
lua_pop(L, 1);
@@ -221,8 +221,8 @@ namespace {
return result;
}
- boost::shared_ptr<Form> convertFormFromLua(lua_State* L) {
- boost::shared_ptr<Form> result = boost::make_shared<Form>();
+ std::shared_ptr<Form> convertFormFromLua(lua_State* L) {
+ std::shared_ptr<Form> result = std::make_shared<Form>();
if (boost::optional<std::string> title = Lua::getStringField(L, -1, "title")) {
result->setTitle(*title);
}
@@ -245,7 +245,7 @@ namespace {
lua_getfield(L, -1, "fields");
if (lua_istable(L, -1)) {
- foreach (boost::shared_ptr<FormField> formField, convertFieldListFromLua(L)) {
+ foreach (std::shared_ptr<FormField> formField, convertFieldListFromLua(L)) {
result->addField(formField);
}
}
@@ -253,7 +253,7 @@ namespace {
lua_getfield(L, -1, "reported_fields");
if (lua_istable(L, -1)) {
- foreach (boost::shared_ptr<FormField> formField, convertFieldListFromLua(L)) {
+ foreach (std::shared_ptr<FormField> formField, convertFieldListFromLua(L)) {
result->addReportedField(formField);
}
}
@@ -271,7 +271,7 @@ namespace {
return result;
}
- void convertFormToLua(lua_State* L, boost::shared_ptr<Form> payload) {
+ void convertFormToLua(lua_State* L, std::shared_ptr<Form> payload) {
std::string type;
switch (payload->getType()) {
case Form::FormType: type = "form"; break;
@@ -315,16 +315,16 @@ namespace {
}
int createSubmission(lua_State* L) {
- boost::shared_ptr<Form> form = convertFormFromLua(L);
+ std::shared_ptr<Form> form = convertFormFromLua(L);
// Remove all redundant elements
form->setInstructions("");
form->setTitle("");
form->clearItems();
form->clearReportedFields();
- std::vector< boost::shared_ptr<FormField> > fields(form->getFields());
+ std::vector< std::shared_ptr<FormField> > fields(form->getFields());
form->clearFields();
- foreach (boost::shared_ptr<FormField> field, fields) {
+ foreach (std::shared_ptr<FormField> field, fields) {
if (field->getType() == FormField::FixedType) {
continue;
}
@@ -350,11 +350,11 @@ FormConvertor::FormConvertor() : GenericLuaElementConvertor<Form>("form") {
FormConvertor::~FormConvertor() {
}
-boost::shared_ptr<Form> FormConvertor::doConvertFromLua(lua_State* L) {
+std::shared_ptr<Form> FormConvertor::doConvertFromLua(lua_State* L) {
return convertFormFromLua(L);
}
-void FormConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Form> payload) {
+void FormConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Form> payload) {
convertFormToLua(L, payload);
lua_pushstring(L, "create_submission");
diff --git a/Sluift/ElementConvertors/FormConvertor.h b/Sluift/ElementConvertors/FormConvertor.h
index 05ca57f..b32a940 100644
--- a/Sluift/ElementConvertors/FormConvertor.h
+++ b/Sluift/ElementConvertors/FormConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
FormConvertor();
virtual ~FormConvertor();
- virtual boost::shared_ptr<Form> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Form>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Form> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Form>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/ForwardedConvertor.cpp b/Sluift/ElementConvertors/ForwardedConvertor.cpp
index 82539bb..8474252 100644
--- a/Sluift/ElementConvertors/ForwardedConvertor.cpp
+++ b/Sluift/ElementConvertors/ForwardedConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/ForwardedConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -29,11 +30,11 @@ ForwardedConvertor::ForwardedConvertor(LuaElementConvertors* convertors) :
ForwardedConvertor::~ForwardedConvertor() {
}
-boost::shared_ptr<Forwarded> ForwardedConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Forwarded> result = boost::make_shared<Forwarded>();
+std::shared_ptr<Forwarded> ForwardedConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Forwarded> result = std::make_shared<Forwarded>();
lua_getfield(L, -1, "delay");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<Delay> delay = boost::dynamic_pointer_cast<Delay>(convertors->convertFromLuaUntyped(L, -1, "delay"));
+ std::shared_ptr<Delay> delay = std::dynamic_pointer_cast<Delay>(convertors->convertFromLuaUntyped(L, -1, "delay"));
if (!!delay) {
result->setDelay(delay);
}
@@ -41,7 +42,7 @@ boost::shared_ptr<Forwarded> ForwardedConvertor::doConvertFromLua(lua_State* L)
lua_pop(L, 1);
lua_getfield(L, -1, "stanza");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<Stanza> stanza = boost::dynamic_pointer_cast<Stanza>(convertors->convertFromLua(L, -1));
+ std::shared_ptr<Stanza> stanza = std::dynamic_pointer_cast<Stanza>(convertors->convertFromLua(L, -1));
if (!!stanza) {
result->setStanza(stanza);
}
@@ -51,12 +52,12 @@ boost::shared_ptr<Forwarded> ForwardedConvertor::doConvertFromLua(lua_State* L)
return result;
}
-void ForwardedConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Forwarded> payload) {
+void ForwardedConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Forwarded> payload) {
lua_createtable(L, 0, 0);
if (convertors->convertToLuaUntyped(L, payload->getDelay()) > 0) {
lua_setfield(L, -2, "delay");
}
- boost::shared_ptr<Stanza> stanza = payload->getStanza();
+ std::shared_ptr<Stanza> stanza = payload->getStanza();
if (!!stanza) {
if (convertors->convertToLua(L, stanza) > 0) {
lua_setfield(L, -2, "stanza");
diff --git a/Sluift/ElementConvertors/ForwardedConvertor.h b/Sluift/ElementConvertors/ForwardedConvertor.h
index ee022fa..a83b5f4 100644
--- a/Sluift/ElementConvertors/ForwardedConvertor.h
+++ b/Sluift/ElementConvertors/ForwardedConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
ForwardedConvertor(LuaElementConvertors* convertors);
virtual ~ForwardedConvertor();
- virtual boost::shared_ptr<Forwarded> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Forwarded>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Forwarded> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Forwarded>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/IQConvertor.cpp b/Sluift/ElementConvertors/IQConvertor.cpp
index 7e2cb7e..67a4a2a 100644
--- a/Sluift/ElementConvertors/IQConvertor.cpp
+++ b/Sluift/ElementConvertors/IQConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/IQConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ IQConvertor::IQConvertor(LuaElementConvertors* convertors) :
IQConvertor::~IQConvertor() {
}
-boost::shared_ptr<IQ> IQConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<IQ> result = getStanza(L, convertors);
+std::shared_ptr<IQ> IQConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<IQ> result = getStanza(L, convertors);
lua_getfield(L, -1, "type");
if (lua_isstring(L, -1)) {
result->setType(IQConvertor::convertIQTypeFromString(lua_tostring(L, -1)));
@@ -32,7 +32,7 @@ boost::shared_ptr<IQ> IQConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void IQConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<IQ> stanza) {
+void IQConvertor::doConvertToLua(lua_State* L, std::shared_ptr<IQ> stanza) {
pushStanza(L, stanza, convertors);
const std::string type = IQConvertor::convertIQTypeToString(stanza->getType());
lua_pushstring(L, type.c_str());
diff --git a/Sluift/ElementConvertors/IQConvertor.h b/Sluift/ElementConvertors/IQConvertor.h
index 49896e7..859900a 100644
--- a/Sluift/ElementConvertors/IQConvertor.h
+++ b/Sluift/ElementConvertors/IQConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
IQConvertor(LuaElementConvertors* convertors);
virtual ~IQConvertor();
- virtual boost::shared_ptr<IQ> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<IQ>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<IQ> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<IQ>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
diff --git a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.cpp b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.cpp
index e256dc7..56b4a80 100644
--- a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.cpp
+++ b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/IsodeIQDelegationConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,11 +22,11 @@ IsodeIQDelegationConvertor::IsodeIQDelegationConvertor(LuaElementConvertors* con
IsodeIQDelegationConvertor::~IsodeIQDelegationConvertor() {
}
-boost::shared_ptr<IsodeIQDelegation> IsodeIQDelegationConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<IsodeIQDelegation> result = boost::make_shared<IsodeIQDelegation>();
+std::shared_ptr<IsodeIQDelegation> IsodeIQDelegationConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<IsodeIQDelegation> result = std::make_shared<IsodeIQDelegation>();
lua_getfield(L, -1, "forward");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Forwarded> payload = boost::dynamic_pointer_cast<Forwarded>(convertors->convertFromLuaUntyped(L, -1, "forwarded"))) {
+ if (std::shared_ptr<Forwarded> payload = std::dynamic_pointer_cast<Forwarded>(convertors->convertFromLuaUntyped(L, -1, "forwarded"))) {
result->setForward(payload);
}
}
@@ -34,7 +34,7 @@ boost::shared_ptr<IsodeIQDelegation> IsodeIQDelegationConvertor::doConvertFromLu
return result;
}
-void IsodeIQDelegationConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<IsodeIQDelegation> payload) {
+void IsodeIQDelegationConvertor::doConvertToLua(lua_State* L, std::shared_ptr<IsodeIQDelegation> payload) {
lua_createtable(L, 0, 0);
if (convertors->convertToLuaUntyped(L, payload->getForward()) > 0) {
lua_setfield(L, -2, "forward");
diff --git a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
index 9fa005b..f8b8c4a 100644
--- a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
+++ b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
IsodeIQDelegationConvertor(LuaElementConvertors* convertors);
virtual ~IsodeIQDelegationConvertor();
- virtual boost::shared_ptr<IsodeIQDelegation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<IsodeIQDelegation>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<IsodeIQDelegation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<IsodeIQDelegation>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/MAMFinConvertor.cpp b/Sluift/ElementConvertors/MAMFinConvertor.cpp
index 1bb6c05..4fb8201 100644
--- a/Sluift/ElementConvertors/MAMFinConvertor.cpp
+++ b/Sluift/ElementConvertors/MAMFinConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/MAMFinConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,8 +26,8 @@ MAMFinConvertor::MAMFinConvertor(LuaElementConvertors* convertors) :
MAMFinConvertor::~MAMFinConvertor() {
}
-boost::shared_ptr<MAMFin> MAMFinConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<MAMFin> result = boost::make_shared<MAMFin>();
+std::shared_ptr<MAMFin> MAMFinConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<MAMFin> result = std::make_shared<MAMFin>();
lua_getfield(L, -1, "query_id");
if (lua_isstring(L, -1)) {
result->setQueryID(std::string(lua_tostring(L, -1)));
@@ -44,7 +45,7 @@ boost::shared_ptr<MAMFin> MAMFinConvertor::doConvertFromLua(lua_State* L) {
lua_pop(L, 1);
lua_getfield(L, -1, "result_set");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<ResultSet> resultSet = boost::dynamic_pointer_cast<ResultSet>(convertors->convertFromLuaUntyped(L, -1, "result_set"));
+ std::shared_ptr<ResultSet> resultSet = std::dynamic_pointer_cast<ResultSet>(convertors->convertFromLuaUntyped(L, -1, "result_set"));
if (!!resultSet) {
result->setResultSet(resultSet);
}
@@ -53,7 +54,7 @@ boost::shared_ptr<MAMFin> MAMFinConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void MAMFinConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<MAMFin> payload) {
+void MAMFinConvertor::doConvertToLua(lua_State* L, std::shared_ptr<MAMFin> payload) {
lua_createtable(L, 0, 0);
if (payload->getQueryID()) {
lua_pushstring(L, (*payload->getQueryID()).c_str());
diff --git a/Sluift/ElementConvertors/MAMFinConvertor.h b/Sluift/ElementConvertors/MAMFinConvertor.h
index 9345aeb..371076a 100644
--- a/Sluift/ElementConvertors/MAMFinConvertor.h
+++ b/Sluift/ElementConvertors/MAMFinConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
MAMFinConvertor(LuaElementConvertors* convertors);
virtual ~MAMFinConvertor();
- virtual boost::shared_ptr<MAMFin> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<MAMFin>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMFin> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMFin>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/MAMQueryConvertor.cpp b/Sluift/ElementConvertors/MAMQueryConvertor.cpp
index a52abd9..52337ce 100644
--- a/Sluift/ElementConvertors/MAMQueryConvertor.cpp
+++ b/Sluift/ElementConvertors/MAMQueryConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/MAMQueryConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -26,8 +27,8 @@ MAMQueryConvertor::MAMQueryConvertor(LuaElementConvertors* convertors) :
MAMQueryConvertor::~MAMQueryConvertor() {
}
-boost::shared_ptr<MAMQuery> MAMQueryConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<MAMQuery> result = boost::make_shared<MAMQuery>();
+std::shared_ptr<MAMQuery> MAMQueryConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<MAMQuery> result = std::make_shared<MAMQuery>();
lua_getfield(L, -1, "query_id");
if (lua_isstring(L, -1)) {
result->setQueryID(std::string(lua_tostring(L, -1)));
@@ -40,7 +41,7 @@ boost::shared_ptr<MAMQuery> MAMQueryConvertor::doConvertFromLua(lua_State* L) {
lua_pop(L, 1);
lua_getfield(L, -1, "form");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<Form> form = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"));
+ std::shared_ptr<Form> form = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"));
if (!!form) {
result->setForm(form);
}
@@ -48,7 +49,7 @@ boost::shared_ptr<MAMQuery> MAMQueryConvertor::doConvertFromLua(lua_State* L) {
lua_pop(L, 1);
lua_getfield(L, -1, "result_set");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<ResultSet> resultSet = boost::dynamic_pointer_cast<ResultSet>(convertors->convertFromLuaUntyped(L, -1, "result_set"));
+ std::shared_ptr<ResultSet> resultSet = std::dynamic_pointer_cast<ResultSet>(convertors->convertFromLuaUntyped(L, -1, "result_set"));
if (!!resultSet) {
result->setResultSet(resultSet);
}
@@ -57,7 +58,7 @@ boost::shared_ptr<MAMQuery> MAMQueryConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void MAMQueryConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<MAMQuery> payload) {
+void MAMQueryConvertor::doConvertToLua(lua_State* L, std::shared_ptr<MAMQuery> payload) {
lua_createtable(L, 0, 0);
if (payload->getQueryID()) {
lua_pushstring(L, (*payload->getQueryID()).c_str());
diff --git a/Sluift/ElementConvertors/MAMQueryConvertor.h b/Sluift/ElementConvertors/MAMQueryConvertor.h
index 54a99e0..4ee119e 100644
--- a/Sluift/ElementConvertors/MAMQueryConvertor.h
+++ b/Sluift/ElementConvertors/MAMQueryConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
MAMQueryConvertor(LuaElementConvertors* convertors);
virtual ~MAMQueryConvertor();
- virtual boost::shared_ptr<MAMQuery> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<MAMQuery>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMQuery> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMQuery>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/MAMResultConvertor.cpp b/Sluift/ElementConvertors/MAMResultConvertor.cpp
index 2260eb1..25b4c39 100644
--- a/Sluift/ElementConvertors/MAMResultConvertor.cpp
+++ b/Sluift/ElementConvertors/MAMResultConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/MAMResultConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,11 +26,11 @@ MAMResultConvertor::MAMResultConvertor(LuaElementConvertors* convertors) :
MAMResultConvertor::~MAMResultConvertor() {
}
-boost::shared_ptr<MAMResult> MAMResultConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<MAMResult> result = boost::make_shared<MAMResult>();
+std::shared_ptr<MAMResult> MAMResultConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<MAMResult> result = std::make_shared<MAMResult>();
lua_getfield(L, -1, "payload");
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<Forwarded> payload = boost::dynamic_pointer_cast<Forwarded>(convertors->convertFromLuaUntyped(L, -1, "payload"));
+ std::shared_ptr<Forwarded> payload = std::dynamic_pointer_cast<Forwarded>(convertors->convertFromLuaUntyped(L, -1, "payload"));
if (!!payload) {
result->setPayload(payload);
}
@@ -48,7 +49,7 @@ boost::shared_ptr<MAMResult> MAMResultConvertor::doConvertFromLua(lua_State* L)
return result;
}
-void MAMResultConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<MAMResult> payload) {
+void MAMResultConvertor::doConvertToLua(lua_State* L, std::shared_ptr<MAMResult> payload) {
lua_createtable(L, 0, 0);
if (convertors->convertToLuaUntyped(L, payload->getPayload()) > 0) {
lua_setfield(L, -2, "payload");
diff --git a/Sluift/ElementConvertors/MAMResultConvertor.h b/Sluift/ElementConvertors/MAMResultConvertor.h
index c1ddf31..a1b2564 100644
--- a/Sluift/ElementConvertors/MAMResultConvertor.h
+++ b/Sluift/ElementConvertors/MAMResultConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
MAMResultConvertor(LuaElementConvertors* convertors);
virtual ~MAMResultConvertor();
- virtual boost::shared_ptr<MAMResult> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<MAMResult>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMResult> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMResult>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/MessageConvertor.cpp b/Sluift/ElementConvertors/MessageConvertor.cpp
index c9285ef..b7bf286 100644
--- a/Sluift/ElementConvertors/MessageConvertor.cpp
+++ b/Sluift/ElementConvertors/MessageConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/MessageConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ MessageConvertor::MessageConvertor(LuaElementConvertors* convertors) :
MessageConvertor::~MessageConvertor() {
}
-boost::shared_ptr<Message> MessageConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Message> result = getStanza(L, convertors);
+std::shared_ptr<Message> MessageConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Message> result = getStanza(L, convertors);
lua_getfield(L, -1, "type");
if (lua_isstring(L, -1)) {
result->setType(convertMessageTypeFromString(lua_tostring(L, -1)));
@@ -32,7 +32,7 @@ boost::shared_ptr<Message> MessageConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void MessageConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Message> stanza) {
+void MessageConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Message> stanza) {
pushStanza(L, stanza, convertors);
const std::string type = convertMessageTypeToString(stanza->getType());
lua_pushstring(L, type.c_str());
diff --git a/Sluift/ElementConvertors/MessageConvertor.h b/Sluift/ElementConvertors/MessageConvertor.h
index e05e00e..2031552 100644
--- a/Sluift/ElementConvertors/MessageConvertor.h
+++ b/Sluift/ElementConvertors/MessageConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
MessageConvertor(LuaElementConvertors* convertors);
virtual ~MessageConvertor();
- virtual boost::shared_ptr<Message> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Message>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Message> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Message>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
diff --git a/Sluift/ElementConvertors/PresenceConvertor.cpp b/Sluift/ElementConvertors/PresenceConvertor.cpp
index 1b423cc..abfac77 100644
--- a/Sluift/ElementConvertors/PresenceConvertor.cpp
+++ b/Sluift/ElementConvertors/PresenceConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PresenceConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PresenceConvertor::PresenceConvertor(LuaElementConvertors* convertors) :
PresenceConvertor::~PresenceConvertor() {
}
-boost::shared_ptr<Presence> PresenceConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Presence> result = getStanza(L, convertors);
+std::shared_ptr<Presence> PresenceConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Presence> result = getStanza(L, convertors);
lua_getfield(L, -1, "type");
if (lua_isstring(L, -1)) {
result->setType(convertPresenceTypeFromString(lua_tostring(L, -1)));
@@ -32,7 +32,7 @@ boost::shared_ptr<Presence> PresenceConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void PresenceConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Presence> stanza) {
+void PresenceConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Presence> stanza) {
pushStanza(L, stanza, convertors);
const std::string type = convertPresenceTypeToString(stanza->getType());
lua_pushstring(L, type.c_str());
diff --git a/Sluift/ElementConvertors/PresenceConvertor.h b/Sluift/ElementConvertors/PresenceConvertor.h
index ae2e78a..11ec547 100644
--- a/Sluift/ElementConvertors/PresenceConvertor.h
+++ b/Sluift/ElementConvertors/PresenceConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PresenceConvertor(LuaElementConvertors* convertors);
virtual ~PresenceConvertor();
- virtual boost::shared_ptr<Presence> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Presence>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Presence> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Presence>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
diff --git a/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp b/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
index 84d8f55..62a2b60 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubAffiliationConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubAffiliationConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubAffiliationConvertor::PubSubAffiliationConvertor() :
PubSubAffiliationConvertor::~PubSubAffiliationConvertor() {
}
-boost::shared_ptr<PubSubAffiliation> PubSubAffiliationConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubAffiliation> result = boost::make_shared<PubSubAffiliation>();
+std::shared_ptr<PubSubAffiliation> PubSubAffiliationConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubAffiliation> result = std::make_shared<PubSubAffiliation>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -51,7 +51,7 @@ boost::shared_ptr<PubSubAffiliation> PubSubAffiliationConvertor::doConvertFromLu
return result;
}
-void PubSubAffiliationConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubAffiliation> payload) {
+void PubSubAffiliationConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubAffiliation> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubAffiliationConvertor.h b/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
index e91342c..456ef4e 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubAffiliationConvertor();
virtual ~PubSubAffiliationConvertor();
- virtual boost::shared_ptr<PubSubAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubAffiliation>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliation>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
index f5eab7a..8eae795 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubAffiliationsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,20 +26,20 @@ PubSubAffiliationsConvertor::PubSubAffiliationsConvertor(LuaElementConvertors* c
PubSubAffiliationsConvertor::~PubSubAffiliationsConvertor() {
}
-boost::shared_ptr<PubSubAffiliations> PubSubAffiliationsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubAffiliations> result = boost::make_shared<PubSubAffiliations>();
+std::shared_ptr<PubSubAffiliations> PubSubAffiliationsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubAffiliations> result = std::make_shared<PubSubAffiliations>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
}
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubAffiliation> > items;
+ std::vector< std::shared_ptr<PubSubAffiliation> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubAffiliation> payload = boost::dynamic_pointer_cast<PubSubAffiliation>(convertors->convertFromLuaUntyped(L, -1, "pubsub_affiliation"))) {
+ if (std::shared_ptr<PubSubAffiliation> payload = std::dynamic_pointer_cast<PubSubAffiliation>(convertors->convertFromLuaUntyped(L, -1, "pubsub_affiliation"))) {
items.push_back(payload);
}
}
@@ -50,7 +51,7 @@ boost::shared_ptr<PubSubAffiliations> PubSubAffiliationsConvertor::doConvertFrom
return result;
}
-void PubSubAffiliationsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubAffiliations> payload) {
+void PubSubAffiliationsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubAffiliations> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
@@ -59,7 +60,7 @@ void PubSubAffiliationsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr
if (!payload->getAffiliations().empty()) {
{
int i = 0;
- foreach(boost::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) {
+ foreach(std::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
index 965fb2a..8ad38b2 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubAffiliationsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubAffiliationsConvertor();
- virtual boost::shared_ptr<PubSubAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubAffiliations>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliations>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubConfigureConvertor.cpp b/Sluift/ElementConvertors/PubSubConfigureConvertor.cpp
index 13ffb7b..d8bf05d 100644
--- a/Sluift/ElementConvertors/PubSubConfigureConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubConfigureConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubConfigureConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,11 +22,11 @@ PubSubConfigureConvertor::PubSubConfigureConvertor(LuaElementConvertors* convert
PubSubConfigureConvertor::~PubSubConfigureConvertor() {
}
-boost::shared_ptr<PubSubConfigure> PubSubConfigureConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubConfigure> result = boost::make_shared<PubSubConfigure>();
+std::shared_ptr<PubSubConfigure> PubSubConfigureConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubConfigure> result = std::make_shared<PubSubConfigure>();
lua_getfield(L, -1, "data");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> payload = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> payload = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setData(payload);
}
}
@@ -34,7 +34,7 @@ boost::shared_ptr<PubSubConfigure> PubSubConfigureConvertor::doConvertFromLua(lu
return result;
}
-void PubSubConfigureConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubConfigure> payload) {
+void PubSubConfigureConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubConfigure> payload) {
lua_createtable(L, 0, 0);
if (convertors->convertToLuaUntyped(L, payload->getData()) > 0) {
lua_setfield(L, -2, "data");
diff --git a/Sluift/ElementConvertors/PubSubConfigureConvertor.h b/Sluift/ElementConvertors/PubSubConfigureConvertor.h
index 865d30a..e41bb68 100644
--- a/Sluift/ElementConvertors/PubSubConfigureConvertor.h
+++ b/Sluift/ElementConvertors/PubSubConfigureConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubConfigureConvertor(LuaElementConvertors* convertors);
virtual ~PubSubConfigureConvertor();
- virtual boost::shared_ptr<PubSubConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubConfigure>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubConfigure>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubCreateConvertor.cpp b/Sluift/ElementConvertors/PubSubCreateConvertor.cpp
index 8a4086b..80553d5 100644
--- a/Sluift/ElementConvertors/PubSubCreateConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubCreateConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubCreateConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubCreateConvertor::PubSubCreateConvertor(LuaElementConvertors* convertors) :
PubSubCreateConvertor::~PubSubCreateConvertor() {
}
-boost::shared_ptr<PubSubCreate> PubSubCreateConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubCreate> result = boost::make_shared<PubSubCreate>();
+std::shared_ptr<PubSubCreate> PubSubCreateConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubCreate> result = std::make_shared<PubSubCreate>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,7 +31,7 @@ boost::shared_ptr<PubSubCreate> PubSubCreateConvertor::doConvertFromLua(lua_Stat
lua_pop(L, 1);
lua_getfield(L, -1, "configure");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubConfigure> payload = boost::dynamic_pointer_cast<PubSubConfigure>(convertors->convertFromLuaUntyped(L, -1, "pubsub_configure"))) {
+ if (std::shared_ptr<PubSubConfigure> payload = std::dynamic_pointer_cast<PubSubConfigure>(convertors->convertFromLuaUntyped(L, -1, "pubsub_configure"))) {
result->setConfigure(payload);
}
}
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubCreate> PubSubCreateConvertor::doConvertFromLua(lua_Stat
return result;
}
-void PubSubCreateConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubCreate> payload) {
+void PubSubCreateConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubCreate> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubCreateConvertor.h b/Sluift/ElementConvertors/PubSubCreateConvertor.h
index 189da27..12c47da 100644
--- a/Sluift/ElementConvertors/PubSubCreateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubCreateConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubCreateConvertor(LuaElementConvertors* convertors);
virtual ~PubSubCreateConvertor();
- virtual boost::shared_ptr<PubSubCreate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubCreate>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubCreate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubCreate>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubDefaultConvertor.cpp b/Sluift/ElementConvertors/PubSubDefaultConvertor.cpp
index 5f8fe24..8406913 100644
--- a/Sluift/ElementConvertors/PubSubDefaultConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubDefaultConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubDefaultConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubDefaultConvertor::PubSubDefaultConvertor() :
PubSubDefaultConvertor::~PubSubDefaultConvertor() {
}
-boost::shared_ptr<PubSubDefault> PubSubDefaultConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubDefault> result = boost::make_shared<PubSubDefault>();
+std::shared_ptr<PubSubDefault> PubSubDefaultConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubDefault> result = std::make_shared<PubSubDefault>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -42,7 +42,7 @@ boost::shared_ptr<PubSubDefault> PubSubDefaultConvertor::doConvertFromLua(lua_St
return result;
}
-void PubSubDefaultConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubDefault> payload) {
+void PubSubDefaultConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubDefault> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubDefaultConvertor.h b/Sluift/ElementConvertors/PubSubDefaultConvertor.h
index 968e03e..fbdbf95 100644
--- a/Sluift/ElementConvertors/PubSubDefaultConvertor.h
+++ b/Sluift/ElementConvertors/PubSubDefaultConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubDefaultConvertor();
virtual ~PubSubDefaultConvertor();
- virtual boost::shared_ptr<PubSubDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubDefault>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubDefault>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.cpp b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.cpp
index bc43b93..eb025a5 100644
--- a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventAssociateConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubEventAssociateConvertor::PubSubEventAssociateConvertor() :
PubSubEventAssociateConvertor::~PubSubEventAssociateConvertor() {
}
-boost::shared_ptr<PubSubEventAssociate> PubSubEventAssociateConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventAssociate> result = boost::make_shared<PubSubEventAssociate>();
+std::shared_ptr<PubSubEventAssociate> PubSubEventAssociateConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventAssociate> result = std::make_shared<PubSubEventAssociate>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubEventAssociate> PubSubEventAssociateConvertor::doConvert
return result;
}
-void PubSubEventAssociateConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventAssociate> payload) {
+void PubSubEventAssociateConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventAssociate> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
index 2ba3b40..975aa60 100644
--- a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventAssociateConvertor();
virtual ~PubSubEventAssociateConvertor();
- virtual boost::shared_ptr<PubSubEventAssociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventAssociate>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventAssociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventAssociate>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.cpp b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.cpp
index 88c7419..721b1b4 100644
--- a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventCollectionConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubEventCollectionConvertor::PubSubEventCollectionConvertor(LuaElementConvert
PubSubEventCollectionConvertor::~PubSubEventCollectionConvertor() {
}
-boost::shared_ptr<PubSubEventCollection> PubSubEventCollectionConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventCollection> result = boost::make_shared<PubSubEventCollection>();
+std::shared_ptr<PubSubEventCollection> PubSubEventCollectionConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventCollection> result = std::make_shared<PubSubEventCollection>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,14 +31,14 @@ boost::shared_ptr<PubSubEventCollection> PubSubEventCollectionConvertor::doConve
lua_pop(L, 1);
lua_getfield(L, -1, "disassociate");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubEventDisassociate> payload = boost::dynamic_pointer_cast<PubSubEventDisassociate>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_disassociate"))) {
+ if (std::shared_ptr<PubSubEventDisassociate> payload = std::dynamic_pointer_cast<PubSubEventDisassociate>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_disassociate"))) {
result->setDisassociate(payload);
}
}
lua_pop(L, 1);
lua_getfield(L, -1, "associate");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubEventAssociate> payload = boost::dynamic_pointer_cast<PubSubEventAssociate>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_associate"))) {
+ if (std::shared_ptr<PubSubEventAssociate> payload = std::dynamic_pointer_cast<PubSubEventAssociate>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_associate"))) {
result->setAssociate(payload);
}
}
@@ -46,7 +46,7 @@ boost::shared_ptr<PubSubEventCollection> PubSubEventCollectionConvertor::doConve
return result;
}
-void PubSubEventCollectionConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventCollection> payload) {
+void PubSubEventCollectionConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventCollection> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
index 7c11178..e8feada 100644
--- a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventCollectionConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventCollectionConvertor();
- virtual boost::shared_ptr<PubSubEventCollection> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventCollection>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventCollection> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventCollection>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.cpp b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.cpp
index 2c149fa..828a010 100644
--- a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubEventConfigurationConvertor::PubSubEventConfigurationConvertor(LuaElementC
PubSubEventConfigurationConvertor::~PubSubEventConfigurationConvertor() {
}
-boost::shared_ptr<PubSubEventConfiguration> PubSubEventConfigurationConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventConfiguration> result = boost::make_shared<PubSubEventConfiguration>();
+std::shared_ptr<PubSubEventConfiguration> PubSubEventConfigurationConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventConfiguration> result = std::make_shared<PubSubEventConfiguration>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,7 +31,7 @@ boost::shared_ptr<PubSubEventConfiguration> PubSubEventConfigurationConvertor::d
lua_pop(L, 1);
lua_getfield(L, -1, "data");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> payload = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> payload = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setData(payload);
}
}
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubEventConfiguration> PubSubEventConfigurationConvertor::d
return result;
}
-void PubSubEventConfigurationConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventConfiguration> payload) {
+void PubSubEventConfigurationConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventConfiguration> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
index e8a17e7..dd327d4 100644
--- a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventConfigurationConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventConfigurationConvertor();
- virtual boost::shared_ptr<PubSubEventConfiguration> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventConfiguration>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventConfiguration> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventConfiguration>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubEventConvertor.cpp b/Sluift/ElementConvertors/PubSubEventConvertor.cpp
index 2330bcc..da7c849 100644
--- a/Sluift/ElementConvertors/PubSubEventConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,14 +22,14 @@ PubSubEventConvertor::PubSubEventConvertor(LuaElementConvertors* convertors) :
PubSubEventConvertor::~PubSubEventConvertor() {
}
-boost::shared_ptr<PubSubEvent> PubSubEventConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEvent> result = boost::make_shared<PubSubEvent>();
- if (boost::shared_ptr<PubSubEventPayload> payload = boost::dynamic_pointer_cast<PubSubEventPayload>(convertors->convertFromLua(L, -1))) {
+std::shared_ptr<PubSubEvent> PubSubEventConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEvent> result = std::make_shared<PubSubEvent>();
+ if (std::shared_ptr<PubSubEventPayload> payload = std::dynamic_pointer_cast<PubSubEventPayload>(convertors->convertFromLua(L, -1))) {
result->setPayload(payload);
}
return result;
}
-void PubSubEventConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEvent> event) {
+void PubSubEventConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEvent> event) {
convertors->convertToLua(L, event->getPayload());
}
diff --git a/Sluift/ElementConvertors/PubSubEventConvertor.h b/Sluift/ElementConvertors/PubSubEventConvertor.h
index 2797b88..8b0cbec 100644
--- a/Sluift/ElementConvertors/PubSubEventConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventConvertor();
- virtual boost::shared_ptr<PubSubEvent> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEvent>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEvent> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEvent>) SWIFTEN_OVERRIDE;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.cpp b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.cpp
index aa77319..06fb3a2 100644
--- a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventDeleteConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubEventDeleteConvertor::PubSubEventDeleteConvertor(LuaElementConvertors* con
PubSubEventDeleteConvertor::~PubSubEventDeleteConvertor() {
}
-boost::shared_ptr<PubSubEventDelete> PubSubEventDeleteConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventDelete> result = boost::make_shared<PubSubEventDelete>();
+std::shared_ptr<PubSubEventDelete> PubSubEventDeleteConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventDelete> result = std::make_shared<PubSubEventDelete>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,7 +31,7 @@ boost::shared_ptr<PubSubEventDelete> PubSubEventDeleteConvertor::doConvertFromLu
lua_pop(L, 1);
lua_getfield(L, -1, "redirects");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubEventRedirect> payload = boost::dynamic_pointer_cast<PubSubEventRedirect>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_redirect"))) {
+ if (std::shared_ptr<PubSubEventRedirect> payload = std::dynamic_pointer_cast<PubSubEventRedirect>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_redirect"))) {
result->setRedirects(payload);
}
}
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubEventDelete> PubSubEventDeleteConvertor::doConvertFromLu
return result;
}
-void PubSubEventDeleteConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventDelete> payload) {
+void PubSubEventDeleteConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventDelete> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
index b53c3d7..ba2b0b8 100644
--- a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventDeleteConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventDeleteConvertor();
- virtual boost::shared_ptr<PubSubEventDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventDelete>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDelete>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.cpp b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.cpp
index 1d417ac..0ada5ce 100644
--- a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubEventDisassociateConvertor::PubSubEventDisassociateConvertor() :
PubSubEventDisassociateConvertor::~PubSubEventDisassociateConvertor() {
}
-boost::shared_ptr<PubSubEventDisassociate> PubSubEventDisassociateConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventDisassociate> result = boost::make_shared<PubSubEventDisassociate>();
+std::shared_ptr<PubSubEventDisassociate> PubSubEventDisassociateConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventDisassociate> result = std::make_shared<PubSubEventDisassociate>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubEventDisassociate> PubSubEventDisassociateConvertor::doC
return result;
}
-void PubSubEventDisassociateConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventDisassociate> payload) {
+void PubSubEventDisassociateConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventDisassociate> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
index 9a34ac3..0a1d678 100644
--- a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventDisassociateConvertor();
virtual ~PubSubEventDisassociateConvertor();
- virtual boost::shared_ptr<PubSubEventDisassociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventDisassociate>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventDisassociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDisassociate>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp b/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
index c8373f5..e8ba5b5 100644
--- a/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubEventItemConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,8 +26,8 @@ PubSubEventItemConvertor::PubSubEventItemConvertor(LuaElementConvertors* convert
PubSubEventItemConvertor::~PubSubEventItemConvertor() {
}
-boost::shared_ptr<PubSubEventItem> PubSubEventItemConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventItem> result = boost::make_shared<PubSubEventItem>();
+std::shared_ptr<PubSubEventItem> PubSubEventItemConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventItem> result = std::make_shared<PubSubEventItem>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -39,12 +40,12 @@ boost::shared_ptr<PubSubEventItem> PubSubEventItemConvertor::doConvertFromLua(lu
lua_pop(L, 1);
lua_getfield(L, -1, "data");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<Payload> > items;
+ std::vector< std::shared_ptr<Payload> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1))) {
+ if (std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1))) {
items.push_back(payload);
}
}
@@ -62,7 +63,7 @@ boost::shared_ptr<PubSubEventItem> PubSubEventItemConvertor::doConvertFromLua(lu
return result;
}
-void PubSubEventItemConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventItem> payload) {
+void PubSubEventItemConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventItem> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
@@ -76,7 +77,7 @@ void PubSubEventItemConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Pu
lua_createtable(L, boost::numeric_cast<int>(payload->getData().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<Payload> item, payload->getData()) {
+ foreach(std::shared_ptr<Payload> item, payload->getData()) {
if (convertors->convertToLua(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubEventItemConvertor.h b/Sluift/ElementConvertors/PubSubEventItemConvertor.h
index 1f67b9f..6239b14 100644
--- a/Sluift/ElementConvertors/PubSubEventItemConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventItemConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventItemConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventItemConvertor();
- virtual boost::shared_ptr<PubSubEventItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventItem>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItem>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp b/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
index 0c2035f..c89c4a6 100644
--- a/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubEventItemsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,8 +26,8 @@ PubSubEventItemsConvertor::PubSubEventItemsConvertor(LuaElementConvertors* conve
PubSubEventItemsConvertor::~PubSubEventItemsConvertor() {
}
-boost::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventItems> result = boost::make_shared<PubSubEventItems>();
+std::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventItems> result = std::make_shared<PubSubEventItems>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -34,12 +35,12 @@ boost::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(
lua_pop(L, 1);
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubEventItem> > items;
+ std::vector< std::shared_ptr<PubSubEventItem> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubEventItem> payload = boost::dynamic_pointer_cast<PubSubEventItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_item"))) {
+ if (std::shared_ptr<PubSubEventItem> payload = std::dynamic_pointer_cast<PubSubEventItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_item"))) {
items.push_back(payload);
}
}
@@ -51,12 +52,12 @@ boost::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(
lua_pop(L, 1);
lua_getfield(L, -1, "retracts");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubEventRetract> > items;
+ std::vector< std::shared_ptr<PubSubEventRetract> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubEventRetract> payload = boost::dynamic_pointer_cast<PubSubEventRetract>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_retract"))) {
+ if (std::shared_ptr<PubSubEventRetract> payload = std::dynamic_pointer_cast<PubSubEventRetract>(convertors->convertFromLuaUntyped(L, -1, "pubsub_event_retract"))) {
items.push_back(payload);
}
}
@@ -69,7 +70,7 @@ boost::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(
return result;
}
-void PubSubEventItemsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventItems> payload) {
+void PubSubEventItemsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventItems> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
@@ -77,7 +78,7 @@ void PubSubEventItemsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<P
lua_createtable(L, boost::numeric_cast<int>(payload->getItems().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<PubSubEventItem> item, payload->getItems()) {
+ foreach(std::shared_ptr<PubSubEventItem> item, payload->getItems()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
@@ -90,7 +91,7 @@ void PubSubEventItemsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<P
lua_createtable(L, boost::numeric_cast<int>(payload->getRetracts().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<PubSubEventRetract> item, payload->getRetracts()) {
+ foreach(std::shared_ptr<PubSubEventRetract> item, payload->getRetracts()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubEventItemsConvertor.h b/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
index b644e7a..ea8942b 100644
--- a/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventItemsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubEventItemsConvertor();
- virtual boost::shared_ptr<PubSubEventItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventItems>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItems>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.cpp b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.cpp
index 3b67704..223eedd 100644
--- a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventPurgeConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubEventPurgeConvertor::PubSubEventPurgeConvertor() :
PubSubEventPurgeConvertor::~PubSubEventPurgeConvertor() {
}
-boost::shared_ptr<PubSubEventPurge> PubSubEventPurgeConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventPurge> result = boost::make_shared<PubSubEventPurge>();
+std::shared_ptr<PubSubEventPurge> PubSubEventPurgeConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventPurge> result = std::make_shared<PubSubEventPurge>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubEventPurge> PubSubEventPurgeConvertor::doConvertFromLua(
return result;
}
-void PubSubEventPurgeConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventPurge> payload) {
+void PubSubEventPurgeConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventPurge> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
index b149426..e3321b1 100644
--- a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventPurgeConvertor();
virtual ~PubSubEventPurgeConvertor();
- virtual boost::shared_ptr<PubSubEventPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventPurge>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventPurge>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.cpp b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.cpp
index ac40d31..673b320 100644
--- a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventRedirectConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubEventRedirectConvertor::PubSubEventRedirectConvertor() :
PubSubEventRedirectConvertor::~PubSubEventRedirectConvertor() {
}
-boost::shared_ptr<PubSubEventRedirect> PubSubEventRedirectConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventRedirect> result = boost::make_shared<PubSubEventRedirect>();
+std::shared_ptr<PubSubEventRedirect> PubSubEventRedirectConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventRedirect> result = std::make_shared<PubSubEventRedirect>();
lua_getfield(L, -1, "uri");
if (lua_isstring(L, -1)) {
result->setURI(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubEventRedirect> PubSubEventRedirectConvertor::doConvertFr
return result;
}
-void PubSubEventRedirectConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventRedirect> payload) {
+void PubSubEventRedirectConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventRedirect> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getURI().c_str());
lua_setfield(L, -2, "uri");
diff --git a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
index bdf7951..b1f33d2 100644
--- a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventRedirectConvertor();
virtual ~PubSubEventRedirectConvertor();
- virtual boost::shared_ptr<PubSubEventRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventRedirect>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRedirect>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventRetractConvertor.cpp b/Sluift/ElementConvertors/PubSubEventRetractConvertor.cpp
index 15eec91..5981922 100644
--- a/Sluift/ElementConvertors/PubSubEventRetractConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventRetractConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventRetractConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubEventRetractConvertor::PubSubEventRetractConvertor() :
PubSubEventRetractConvertor::~PubSubEventRetractConvertor() {
}
-boost::shared_ptr<PubSubEventRetract> PubSubEventRetractConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventRetract> result = boost::make_shared<PubSubEventRetract>();
+std::shared_ptr<PubSubEventRetract> PubSubEventRetractConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventRetract> result = std::make_shared<PubSubEventRetract>();
lua_getfield(L, -1, "id");
if (lua_isstring(L, -1)) {
result->setID(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubEventRetract> PubSubEventRetractConvertor::doConvertFrom
return result;
}
-void PubSubEventRetractConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventRetract> payload) {
+void PubSubEventRetractConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventRetract> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getID().c_str());
lua_setfield(L, -2, "id");
diff --git a/Sluift/ElementConvertors/PubSubEventRetractConvertor.h b/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
index 38208b0..65aac36 100644
--- a/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventRetractConvertor();
virtual ~PubSubEventRetractConvertor();
- virtual boost::shared_ptr<PubSubEventRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventRetract>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRetract>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.cpp b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.cpp
index 57be1c4..cab78d4 100644
--- a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -21,8 +21,8 @@ PubSubEventSubscriptionConvertor::PubSubEventSubscriptionConvertor() :
PubSubEventSubscriptionConvertor::~PubSubEventSubscriptionConvertor() {
}
-boost::shared_ptr<PubSubEventSubscription> PubSubEventSubscriptionConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubEventSubscription> result = boost::make_shared<PubSubEventSubscription>();
+std::shared_ptr<PubSubEventSubscription> PubSubEventSubscriptionConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubEventSubscription> result = std::make_shared<PubSubEventSubscription>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -62,7 +62,7 @@ boost::shared_ptr<PubSubEventSubscription> PubSubEventSubscriptionConvertor::doC
return result;
}
-void PubSubEventSubscriptionConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubEventSubscription> payload) {
+void PubSubEventSubscriptionConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubEventSubscription> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
index 8ee9da5..0b3181b 100644
--- a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubEventSubscriptionConvertor();
virtual ~PubSubEventSubscriptionConvertor();
- virtual boost::shared_ptr<PubSubEventSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubEventSubscription>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventSubscription>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubItemConvertor.cpp b/Sluift/ElementConvertors/PubSubItemConvertor.cpp
index b88f989..99802bf 100644
--- a/Sluift/ElementConvertors/PubSubItemConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubItemConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubItemConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,16 +26,16 @@ PubSubItemConvertor::PubSubItemConvertor(LuaElementConvertors* convertors) :
PubSubItemConvertor::~PubSubItemConvertor() {
}
-boost::shared_ptr<PubSubItem> PubSubItemConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubItem> result = boost::make_shared<PubSubItem>();
+std::shared_ptr<PubSubItem> PubSubItemConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubItem> result = std::make_shared<PubSubItem>();
lua_getfield(L, -1, "data");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<Payload> > items;
+ std::vector< std::shared_ptr<Payload> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1))) {
+ if (std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1))) {
items.push_back(payload);
}
}
@@ -52,13 +53,13 @@ boost::shared_ptr<PubSubItem> PubSubItemConvertor::doConvertFromLua(lua_State* L
return result;
}
-void PubSubItemConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubItem> payload) {
+void PubSubItemConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubItem> payload) {
lua_createtable(L, 0, 0);
if (!payload->getData().empty()) {
lua_createtable(L, boost::numeric_cast<int>(payload->getData().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<Payload> item, payload->getData()) {
+ foreach(std::shared_ptr<Payload> item, payload->getData()) {
if (convertors->convertToLua(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubItemConvertor.h b/Sluift/ElementConvertors/PubSubItemConvertor.h
index 1bc2467..2772932 100644
--- a/Sluift/ElementConvertors/PubSubItemConvertor.h
+++ b/Sluift/ElementConvertors/PubSubItemConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubItemConvertor(LuaElementConvertors* convertors);
virtual ~PubSubItemConvertor();
- virtual boost::shared_ptr<PubSubItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubItem>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItem>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubItemsConvertor.cpp b/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
index 571bc46..8e1f08d 100644
--- a/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubItemsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,20 +26,20 @@ PubSubItemsConvertor::PubSubItemsConvertor(LuaElementConvertors* convertors) :
PubSubItemsConvertor::~PubSubItemsConvertor() {
}
-boost::shared_ptr<PubSubItems> PubSubItemsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubItems> result = boost::make_shared<PubSubItems>();
+std::shared_ptr<PubSubItems> PubSubItemsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubItems> result = std::make_shared<PubSubItems>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
}
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubItem> > items;
+ std::vector< std::shared_ptr<PubSubItem> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubItem> payload = boost::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
+ if (std::shared_ptr<PubSubItem> payload = std::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
items.push_back(payload);
}
}
@@ -60,14 +61,14 @@ boost::shared_ptr<PubSubItems> PubSubItemsConvertor::doConvertFromLua(lua_State*
return result;
}
-void PubSubItemsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubItems> payload) {
+void PubSubItemsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubItems> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
if (!payload->getItems().empty()) {
{
int i = 0;
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubItemsConvertor.h b/Sluift/ElementConvertors/PubSubItemsConvertor.h
index e40d545..56348b0 100644
--- a/Sluift/ElementConvertors/PubSubItemsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubItemsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubItemsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubItemsConvertor();
- virtual boost::shared_ptr<PubSubItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubItems>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItems>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubOptionsConvertor.cpp
index 52976ea..3582c63 100644
--- a/Sluift/ElementConvertors/PubSubOptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOptionsConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOptionsConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubOptionsConvertor::PubSubOptionsConvertor(LuaElementConvertors* convertors)
PubSubOptionsConvertor::~PubSubOptionsConvertor() {
}
-boost::shared_ptr<PubSubOptions> PubSubOptionsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOptions> result = boost::make_shared<PubSubOptions>();
+std::shared_ptr<PubSubOptions> PubSubOptionsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOptions> result = std::make_shared<PubSubOptions>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -36,7 +36,7 @@ boost::shared_ptr<PubSubOptions> PubSubOptionsConvertor::doConvertFromLua(lua_St
lua_pop(L, 1);
lua_getfield(L, -1, "data");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> payload = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> payload = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setData(payload);
}
}
@@ -49,7 +49,7 @@ boost::shared_ptr<PubSubOptions> PubSubOptionsConvertor::doConvertFromLua(lua_St
return result;
}
-void PubSubOptionsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOptions> payload) {
+void PubSubOptionsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOptions> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubOptionsConvertor.h b/Sluift/ElementConvertors/PubSubOptionsConvertor.h
index 88fafd3..60d11cc 100644
--- a/Sluift/ElementConvertors/PubSubOptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOptionsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOptionsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOptionsConvertor();
- virtual boost::shared_ptr<PubSubOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOptions>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOptions>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.cpp
index da835af..15a800b 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubOwnerAffiliationConvertor::PubSubOwnerAffiliationConvertor() :
PubSubOwnerAffiliationConvertor::~PubSubOwnerAffiliationConvertor() {
}
-boost::shared_ptr<PubSubOwnerAffiliation> PubSubOwnerAffiliationConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerAffiliation> result = boost::make_shared<PubSubOwnerAffiliation>();
+std::shared_ptr<PubSubOwnerAffiliation> PubSubOwnerAffiliationConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerAffiliation> result = std::make_shared<PubSubOwnerAffiliation>();
lua_getfield(L, -1, "jid");
if (lua_isstring(L, -1)) {
result->setJID(JID(std::string(lua_tostring(L, -1))));
@@ -51,7 +51,7 @@ boost::shared_ptr<PubSubOwnerAffiliation> PubSubOwnerAffiliationConvertor::doCon
return result;
}
-void PubSubOwnerAffiliationConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerAffiliation> payload) {
+void PubSubOwnerAffiliationConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerAffiliation> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getJID().toString().c_str());
lua_setfield(L, -2, "jid");
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
index 965e708..9020482 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerAffiliationConvertor();
virtual ~PubSubOwnerAffiliationConvertor();
- virtual boost::shared_ptr<PubSubOwnerAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerAffiliation>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliation>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
index 01a4503..b66443f 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,20 +26,20 @@ PubSubOwnerAffiliationsConvertor::PubSubOwnerAffiliationsConvertor(LuaElementCon
PubSubOwnerAffiliationsConvertor::~PubSubOwnerAffiliationsConvertor() {
}
-boost::shared_ptr<PubSubOwnerAffiliations> PubSubOwnerAffiliationsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerAffiliations> result = boost::make_shared<PubSubOwnerAffiliations>();
+std::shared_ptr<PubSubOwnerAffiliations> PubSubOwnerAffiliationsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerAffiliations> result = std::make_shared<PubSubOwnerAffiliations>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
}
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubOwnerAffiliation> > items;
+ std::vector< std::shared_ptr<PubSubOwnerAffiliation> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubOwnerAffiliation> payload = boost::dynamic_pointer_cast<PubSubOwnerAffiliation>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_affiliation"))) {
+ if (std::shared_ptr<PubSubOwnerAffiliation> payload = std::dynamic_pointer_cast<PubSubOwnerAffiliation>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_affiliation"))) {
items.push_back(payload);
}
}
@@ -50,14 +51,14 @@ boost::shared_ptr<PubSubOwnerAffiliations> PubSubOwnerAffiliationsConvertor::doC
return result;
}
-void PubSubOwnerAffiliationsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerAffiliations> payload) {
+void PubSubOwnerAffiliationsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerAffiliations> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
if (!payload->getAffiliations().empty()) {
{
int i = 0;
- foreach(boost::shared_ptr<PubSubOwnerAffiliation> item, payload->getAffiliations()) {
+ foreach(std::shared_ptr<PubSubOwnerAffiliation> item, payload->getAffiliations()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
index 3644cd8..3026e2c 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerAffiliationsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOwnerAffiliationsConvertor();
- virtual boost::shared_ptr<PubSubOwnerAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerAffiliations>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliations>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.cpp
index 0d0d49a..d179152 100644
--- a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubOwnerConfigureConvertor::PubSubOwnerConfigureConvertor(LuaElementConvertor
PubSubOwnerConfigureConvertor::~PubSubOwnerConfigureConvertor() {
}
-boost::shared_ptr<PubSubOwnerConfigure> PubSubOwnerConfigureConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerConfigure> result = boost::make_shared<PubSubOwnerConfigure>();
+std::shared_ptr<PubSubOwnerConfigure> PubSubOwnerConfigureConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerConfigure> result = std::make_shared<PubSubOwnerConfigure>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,7 +31,7 @@ boost::shared_ptr<PubSubOwnerConfigure> PubSubOwnerConfigureConvertor::doConvert
lua_pop(L, 1);
lua_getfield(L, -1, "data");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> payload = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> payload = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setData(payload);
}
}
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubOwnerConfigure> PubSubOwnerConfigureConvertor::doConvert
return result;
}
-void PubSubOwnerConfigureConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerConfigure> payload) {
+void PubSubOwnerConfigureConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerConfigure> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
index d2fb229..4b39fdf 100644
--- a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerConfigureConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOwnerConfigureConvertor();
- virtual boost::shared_ptr<PubSubOwnerConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerConfigure>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerConfigure>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.cpp
index 9147900..b2ff3de 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,11 +22,11 @@ PubSubOwnerDefaultConvertor::PubSubOwnerDefaultConvertor(LuaElementConvertors* c
PubSubOwnerDefaultConvertor::~PubSubOwnerDefaultConvertor() {
}
-boost::shared_ptr<PubSubOwnerDefault> PubSubOwnerDefaultConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerDefault> result = boost::make_shared<PubSubOwnerDefault>();
+std::shared_ptr<PubSubOwnerDefault> PubSubOwnerDefaultConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerDefault> result = std::make_shared<PubSubOwnerDefault>();
lua_getfield(L, -1, "data");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<Form> payload = boost::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
+ if (std::shared_ptr<Form> payload = std::dynamic_pointer_cast<Form>(convertors->convertFromLuaUntyped(L, -1, "form"))) {
result->setData(payload);
}
}
@@ -34,7 +34,7 @@ boost::shared_ptr<PubSubOwnerDefault> PubSubOwnerDefaultConvertor::doConvertFrom
return result;
}
-void PubSubOwnerDefaultConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerDefault> payload) {
+void PubSubOwnerDefaultConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerDefault> payload) {
lua_createtable(L, 0, 0);
if (convertors->convertToLuaUntyped(L, payload->getData()) > 0) {
lua_setfield(L, -2, "data");
diff --git a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
index 274cb12..ae0f018 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerDefaultConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOwnerDefaultConvertor();
- virtual boost::shared_ptr<PubSubOwnerDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerDefault>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDefault>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.cpp
index 63579b6..3733d74 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubOwnerDeleteConvertor::PubSubOwnerDeleteConvertor(LuaElementConvertors* con
PubSubOwnerDeleteConvertor::~PubSubOwnerDeleteConvertor() {
}
-boost::shared_ptr<PubSubOwnerDelete> PubSubOwnerDeleteConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerDelete> result = boost::make_shared<PubSubOwnerDelete>();
+std::shared_ptr<PubSubOwnerDelete> PubSubOwnerDeleteConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerDelete> result = std::make_shared<PubSubOwnerDelete>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -31,7 +31,7 @@ boost::shared_ptr<PubSubOwnerDelete> PubSubOwnerDeleteConvertor::doConvertFromLu
lua_pop(L, 1);
lua_getfield(L, -1, "redirect");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubOwnerRedirect> payload = boost::dynamic_pointer_cast<PubSubOwnerRedirect>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_redirect"))) {
+ if (std::shared_ptr<PubSubOwnerRedirect> payload = std::dynamic_pointer_cast<PubSubOwnerRedirect>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_redirect"))) {
result->setRedirect(payload);
}
}
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubOwnerDelete> PubSubOwnerDeleteConvertor::doConvertFromLu
return result;
}
-void PubSubOwnerDeleteConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerDelete> payload) {
+void PubSubOwnerDeleteConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerDelete> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
index 548fb79..54a2cf9 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerDeleteConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOwnerDeleteConvertor();
- virtual boost::shared_ptr<PubSubOwnerDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerDelete>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDelete>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.cpp
index f7d5c50..98c6355 100644
--- a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubOwnerPurgeConvertor::PubSubOwnerPurgeConvertor() :
PubSubOwnerPurgeConvertor::~PubSubOwnerPurgeConvertor() {
}
-boost::shared_ptr<PubSubOwnerPurge> PubSubOwnerPurgeConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerPurge> result = boost::make_shared<PubSubOwnerPurge>();
+std::shared_ptr<PubSubOwnerPurge> PubSubOwnerPurgeConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerPurge> result = std::make_shared<PubSubOwnerPurge>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubOwnerPurge> PubSubOwnerPurgeConvertor::doConvertFromLua(
return result;
}
-void PubSubOwnerPurgeConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerPurge> payload) {
+void PubSubOwnerPurgeConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerPurge> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
diff --git a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
index fc627c6..4696f45 100644
--- a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerPurgeConvertor();
virtual ~PubSubOwnerPurgeConvertor();
- virtual boost::shared_ptr<PubSubOwnerPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerPurge>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerPurge>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp
index 86c26ac..8fc20d2 100644
--- a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubOwnerRedirectConvertor::PubSubOwnerRedirectConvertor() :
PubSubOwnerRedirectConvertor::~PubSubOwnerRedirectConvertor() {
}
-boost::shared_ptr<PubSubOwnerRedirect> PubSubOwnerRedirectConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerRedirect> result = boost::make_shared<PubSubOwnerRedirect>();
+std::shared_ptr<PubSubOwnerRedirect> PubSubOwnerRedirectConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerRedirect> result = std::make_shared<PubSubOwnerRedirect>();
lua_getfield(L, -1, "uri");
if (lua_isstring(L, -1)) {
result->setURI(std::string(lua_tostring(L, -1)));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubOwnerRedirect> PubSubOwnerRedirectConvertor::doConvertFr
return result;
}
-void PubSubOwnerRedirectConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerRedirect> payload) {
+void PubSubOwnerRedirectConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerRedirect> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getURI().c_str());
lua_setfield(L, -2, "uri");
diff --git a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
index 528e9e5..3517a49 100644
--- a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerRedirectConvertor();
virtual ~PubSubOwnerRedirectConvertor();
- virtual boost::shared_ptr<PubSubOwnerRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerRedirect>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerRedirect>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
index 2e5aff3..e0b3687 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubOwnerSubscriptionConvertor::PubSubOwnerSubscriptionConvertor() :
PubSubOwnerSubscriptionConvertor::~PubSubOwnerSubscriptionConvertor() {
}
-boost::shared_ptr<PubSubOwnerSubscription> PubSubOwnerSubscriptionConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerSubscription> result = boost::make_shared<PubSubOwnerSubscription>();
+std::shared_ptr<PubSubOwnerSubscription> PubSubOwnerSubscriptionConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerSubscription> result = std::make_shared<PubSubOwnerSubscription>();
lua_getfield(L, -1, "jid");
if (lua_isstring(L, -1)) {
result->setJID(JID(std::string(lua_tostring(L, -1))));
@@ -45,7 +45,7 @@ boost::shared_ptr<PubSubOwnerSubscription> PubSubOwnerSubscriptionConvertor::doC
return result;
}
-void PubSubOwnerSubscriptionConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerSubscription> payload) {
+void PubSubOwnerSubscriptionConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerSubscription> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getJID().toString().c_str());
lua_setfield(L, -2, "jid");
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
index 0924c35..2908654 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerSubscriptionConvertor();
virtual ~PubSubOwnerSubscriptionConvertor();
- virtual boost::shared_ptr<PubSubOwnerSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerSubscription>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscription>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
index b6f49ad..50cfb9b 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,20 +26,20 @@ PubSubOwnerSubscriptionsConvertor::PubSubOwnerSubscriptionsConvertor(LuaElementC
PubSubOwnerSubscriptionsConvertor::~PubSubOwnerSubscriptionsConvertor() {
}
-boost::shared_ptr<PubSubOwnerSubscriptions> PubSubOwnerSubscriptionsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubOwnerSubscriptions> result = boost::make_shared<PubSubOwnerSubscriptions>();
+std::shared_ptr<PubSubOwnerSubscriptions> PubSubOwnerSubscriptionsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubOwnerSubscriptions> result = std::make_shared<PubSubOwnerSubscriptions>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
}
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubOwnerSubscription> > items;
+ std::vector< std::shared_ptr<PubSubOwnerSubscription> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubOwnerSubscription> payload = boost::dynamic_pointer_cast<PubSubOwnerSubscription>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_subscription"))) {
+ if (std::shared_ptr<PubSubOwnerSubscription> payload = std::dynamic_pointer_cast<PubSubOwnerSubscription>(convertors->convertFromLuaUntyped(L, -1, "pubsub_owner_subscription"))) {
items.push_back(payload);
}
}
@@ -50,14 +51,14 @@ boost::shared_ptr<PubSubOwnerSubscriptions> PubSubOwnerSubscriptionsConvertor::d
return result;
}
-void PubSubOwnerSubscriptionsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerSubscriptions> payload) {
+void PubSubOwnerSubscriptionsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubOwnerSubscriptions> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
if (!payload->getSubscriptions().empty()) {
{
int i = 0;
- foreach(boost::shared_ptr<PubSubOwnerSubscription> item, payload->getSubscriptions()) {
+ foreach(std::shared_ptr<PubSubOwnerSubscription> item, payload->getSubscriptions()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
index 1511d20..c89b814 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubOwnerSubscriptionsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubOwnerSubscriptionsConvertor();
- virtual boost::shared_ptr<PubSubOwnerSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubOwnerSubscriptions>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscriptions>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubPublishConvertor.cpp b/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
index 68045fb..38aca0a 100644
--- a/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubPublishConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,8 +26,8 @@ PubSubPublishConvertor::PubSubPublishConvertor(LuaElementConvertors* convertors)
PubSubPublishConvertor::~PubSubPublishConvertor() {
}
-boost::shared_ptr<PubSubPublish> PubSubPublishConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubPublish> result = boost::make_shared<PubSubPublish>();
+std::shared_ptr<PubSubPublish> PubSubPublishConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubPublish> result = std::make_shared<PubSubPublish>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -34,12 +35,12 @@ boost::shared_ptr<PubSubPublish> PubSubPublishConvertor::doConvertFromLua(lua_St
lua_pop(L, 1);
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubItem> > items;
+ std::vector< std::shared_ptr<PubSubItem> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubItem> payload = boost::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
+ if (std::shared_ptr<PubSubItem> payload = std::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
items.push_back(payload);
}
}
@@ -52,7 +53,7 @@ boost::shared_ptr<PubSubPublish> PubSubPublishConvertor::doConvertFromLua(lua_St
return result;
}
-void PubSubPublishConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubPublish> payload) {
+void PubSubPublishConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubPublish> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
@@ -60,7 +61,7 @@ void PubSubPublishConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubS
lua_createtable(L, boost::numeric_cast<int>(payload->getItems().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubPublishConvertor.h b/Sluift/ElementConvertors/PubSubPublishConvertor.h
index 1372c55..1765caf 100644
--- a/Sluift/ElementConvertors/PubSubPublishConvertor.h
+++ b/Sluift/ElementConvertors/PubSubPublishConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubPublishConvertor(LuaElementConvertors* convertors);
virtual ~PubSubPublishConvertor();
- virtual boost::shared_ptr<PubSubPublish> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubPublish>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubPublish> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubPublish>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubRetractConvertor.cpp b/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
index bc0e3d0..6597f0b 100644
--- a/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubRetractConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,8 +26,8 @@ PubSubRetractConvertor::PubSubRetractConvertor(LuaElementConvertors* convertors)
PubSubRetractConvertor::~PubSubRetractConvertor() {
}
-boost::shared_ptr<PubSubRetract> PubSubRetractConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubRetract> result = boost::make_shared<PubSubRetract>();
+std::shared_ptr<PubSubRetract> PubSubRetractConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubRetract> result = std::make_shared<PubSubRetract>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -34,12 +35,12 @@ boost::shared_ptr<PubSubRetract> PubSubRetractConvertor::doConvertFromLua(lua_St
lua_pop(L, 1);
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubItem> > items;
+ std::vector< std::shared_ptr<PubSubItem> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubItem> payload = boost::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
+ if (std::shared_ptr<PubSubItem> payload = std::dynamic_pointer_cast<PubSubItem>(convertors->convertFromLuaUntyped(L, -1, "pubsub_item"))) {
items.push_back(payload);
}
}
@@ -57,7 +58,7 @@ boost::shared_ptr<PubSubRetract> PubSubRetractConvertor::doConvertFromLua(lua_St
return result;
}
-void PubSubRetractConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubRetract> payload) {
+void PubSubRetractConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubRetract> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getNode().c_str());
lua_setfield(L, -2, "node");
@@ -65,7 +66,7 @@ void PubSubRetractConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubS
lua_createtable(L, boost::numeric_cast<int>(payload->getItems().size()), 0);
{
int i = 0;
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubRetractConvertor.h b/Sluift/ElementConvertors/PubSubRetractConvertor.h
index c1f8bd6..13f7d0d 100644
--- a/Sluift/ElementConvertors/PubSubRetractConvertor.h
+++ b/Sluift/ElementConvertors/PubSubRetractConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubRetractConvertor(LuaElementConvertors* convertors);
virtual ~PubSubRetractConvertor();
- virtual boost::shared_ptr<PubSubRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubRetract>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubRetract>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubSubscribeConvertor.cpp b/Sluift/ElementConvertors/PubSubSubscribeConvertor.cpp
index bb3dcb4..bb5eb61 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubSubscribeConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubSubscribeConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubSubscribeConvertor::PubSubSubscribeConvertor(LuaElementConvertors* convert
PubSubSubscribeConvertor::~PubSubSubscribeConvertor() {
}
-boost::shared_ptr<PubSubSubscribe> PubSubSubscribeConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubSubscribe> result = boost::make_shared<PubSubSubscribe>();
+std::shared_ptr<PubSubSubscribe> PubSubSubscribeConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubSubscribe> result = std::make_shared<PubSubSubscribe>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -36,7 +36,7 @@ boost::shared_ptr<PubSubSubscribe> PubSubSubscribeConvertor::doConvertFromLua(lu
lua_pop(L, 1);
lua_getfield(L, -1, "options");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubOptions> payload = boost::dynamic_pointer_cast<PubSubOptions>(convertors->convertFromLuaUntyped(L, -1, "pubsub_options"))) {
+ if (std::shared_ptr<PubSubOptions> payload = std::dynamic_pointer_cast<PubSubOptions>(convertors->convertFromLuaUntyped(L, -1, "pubsub_options"))) {
result->setOptions(payload);
}
}
@@ -44,7 +44,7 @@ boost::shared_ptr<PubSubSubscribe> PubSubSubscribeConvertor::doConvertFromLua(lu
return result;
}
-void PubSubSubscribeConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubSubscribe> payload) {
+void PubSubSubscribeConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubSubscribe> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubSubscribeConvertor.h b/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
index 592b5aa..238f677 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubSubscribeConvertor(LuaElementConvertors* convertors);
virtual ~PubSubSubscribeConvertor();
- virtual boost::shared_ptr<PubSubSubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubSubscribe>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribe>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.cpp
index 70c5b4f..01da15f 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubSubscribeOptionsConvertor::PubSubSubscribeOptionsConvertor() :
PubSubSubscribeOptionsConvertor::~PubSubSubscribeOptionsConvertor() {
}
-boost::shared_ptr<PubSubSubscribeOptions> PubSubSubscribeOptionsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubSubscribeOptions> result = boost::make_shared<PubSubSubscribeOptions>();
+std::shared_ptr<PubSubSubscribeOptions> PubSubSubscribeOptionsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubSubscribeOptions> result = std::make_shared<PubSubSubscribeOptions>();
lua_getfield(L, -1, "required");
if (lua_isboolean(L, -1)) {
result->setRequired(lua_toboolean(L, -1));
@@ -29,7 +29,7 @@ boost::shared_ptr<PubSubSubscribeOptions> PubSubSubscribeOptionsConvertor::doCon
return result;
}
-void PubSubSubscribeOptionsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubSubscribeOptions> payload) {
+void PubSubSubscribeOptionsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubSubscribeOptions> payload) {
lua_createtable(L, 0, 0);
lua_pushboolean(L, payload->isRequired());
lua_setfield(L, -2, "required");
diff --git a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
index 3214dcf..fed8779 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubSubscribeOptionsConvertor();
virtual ~PubSubSubscribeOptionsConvertor();
- virtual boost::shared_ptr<PubSubSubscribeOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubSubscribeOptions>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscribeOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribeOptions>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.cpp b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.cpp
index 79c188c..65c6474 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubSubscriptionConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -22,8 +22,8 @@ PubSubSubscriptionConvertor::PubSubSubscriptionConvertor(LuaElementConvertors* c
PubSubSubscriptionConvertor::~PubSubSubscriptionConvertor() {
}
-boost::shared_ptr<PubSubSubscription> PubSubSubscriptionConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubSubscription> result = boost::make_shared<PubSubSubscription>();
+std::shared_ptr<PubSubSubscription> PubSubSubscriptionConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubSubscription> result = std::make_shared<PubSubSubscription>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -41,7 +41,7 @@ boost::shared_ptr<PubSubSubscription> PubSubSubscriptionConvertor::doConvertFrom
lua_pop(L, 1);
lua_getfield(L, -1, "options");
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubSubscribeOptions> payload = boost::dynamic_pointer_cast<PubSubSubscribeOptions>(convertors->convertFromLuaUntyped(L, -1, "pubsub_subscribe_options"))) {
+ if (std::shared_ptr<PubSubSubscribeOptions> payload = std::dynamic_pointer_cast<PubSubSubscribeOptions>(convertors->convertFromLuaUntyped(L, -1, "pubsub_subscribe_options"))) {
result->setOptions(payload);
}
}
@@ -65,7 +65,7 @@ boost::shared_ptr<PubSubSubscription> PubSubSubscriptionConvertor::doConvertFrom
return result;
}
-void PubSubSubscriptionConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubSubscription> payload) {
+void PubSubSubscriptionConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubSubscription> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
index 84aa275..5635181 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubSubscriptionConvertor(LuaElementConvertors* convertors);
virtual ~PubSubSubscriptionConvertor();
- virtual boost::shared_ptr<PubSubSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubSubscription>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscription>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
index a81817e..4cc5686 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -25,20 +26,20 @@ PubSubSubscriptionsConvertor::PubSubSubscriptionsConvertor(LuaElementConvertors*
PubSubSubscriptionsConvertor::~PubSubSubscriptionsConvertor() {
}
-boost::shared_ptr<PubSubSubscriptions> PubSubSubscriptionsConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubSubscriptions> result = boost::make_shared<PubSubSubscriptions>();
+std::shared_ptr<PubSubSubscriptions> PubSubSubscriptionsConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubSubscriptions> result = std::make_shared<PubSubSubscriptions>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
}
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
- std::vector< boost::shared_ptr<PubSubSubscription> > items;
+ std::vector< std::shared_ptr<PubSubSubscription> > items;
for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- if (boost::shared_ptr<PubSubSubscription> payload = boost::dynamic_pointer_cast<PubSubSubscription>(convertors->convertFromLuaUntyped(L, -1, "pubsub_subscription"))) {
+ if (std::shared_ptr<PubSubSubscription> payload = std::dynamic_pointer_cast<PubSubSubscription>(convertors->convertFromLuaUntyped(L, -1, "pubsub_subscription"))) {
items.push_back(payload);
}
}
@@ -50,7 +51,7 @@ boost::shared_ptr<PubSubSubscriptions> PubSubSubscriptionsConvertor::doConvertFr
return result;
}
-void PubSubSubscriptionsConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubSubscriptions> payload) {
+void PubSubSubscriptionsConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubSubscriptions> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
@@ -59,7 +60,7 @@ void PubSubSubscriptionsConvertor::doConvertToLua(lua_State* L, boost::shared_pt
if (!payload->getSubscriptions().empty()) {
{
int i = 0;
- foreach(boost::shared_ptr<PubSubSubscription> item, payload->getSubscriptions()) {
+ foreach(std::shared_ptr<PubSubSubscription> item, payload->getSubscriptions()) {
if (convertors->convertToLuaUntyped(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
index 82fa1f7..2c941e6 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubSubscriptionsConvertor(LuaElementConvertors* convertors);
virtual ~PubSubSubscriptionsConvertor();
- virtual boost::shared_ptr<PubSubSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubSubscriptions>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscriptions>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
private:
diff --git a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.cpp b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.cpp
index 3e83a97..056c84c 100644
--- a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -19,8 +19,8 @@ PubSubUnsubscribeConvertor::PubSubUnsubscribeConvertor() :
PubSubUnsubscribeConvertor::~PubSubUnsubscribeConvertor() {
}
-boost::shared_ptr<PubSubUnsubscribe> PubSubUnsubscribeConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<PubSubUnsubscribe> result = boost::make_shared<PubSubUnsubscribe>();
+std::shared_ptr<PubSubUnsubscribe> PubSubUnsubscribeConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<PubSubUnsubscribe> result = std::make_shared<PubSubUnsubscribe>();
lua_getfield(L, -1, "node");
if (lua_isstring(L, -1)) {
result->setNode(std::string(lua_tostring(L, -1)));
@@ -39,7 +39,7 @@ boost::shared_ptr<PubSubUnsubscribe> PubSubUnsubscribeConvertor::doConvertFromLu
return result;
}
-void PubSubUnsubscribeConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubUnsubscribe> payload) {
+void PubSubUnsubscribeConvertor::doConvertToLua(lua_State* L, std::shared_ptr<PubSubUnsubscribe> payload) {
lua_createtable(L, 0, 0);
if (payload->getNode()) {
lua_pushstring(L, (*payload->getNode()).c_str());
diff --git a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
index c6c3d06..7270917 100644
--- a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
PubSubUnsubscribeConvertor();
virtual ~PubSubUnsubscribeConvertor();
- virtual boost::shared_ptr<PubSubUnsubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<PubSubUnsubscribe>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubUnsubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubUnsubscribe>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/RawXMLElementConvertor.cpp b/Sluift/ElementConvertors/RawXMLElementConvertor.cpp
index 07ca021..a8ccb91 100644
--- a/Sluift/ElementConvertors/RawXMLElementConvertor.cpp
+++ b/Sluift/ElementConvertors/RawXMLElementConvertor.cpp
@@ -7,8 +7,7 @@
#include <Sluift/ElementConvertors/RawXMLElementConvertor.h>
#include <iostream>
-
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -25,15 +24,15 @@ RawXMLElementConvertor::RawXMLElementConvertor() {
RawXMLElementConvertor::~RawXMLElementConvertor() {
}
-boost::shared_ptr<Element> RawXMLElementConvertor::convertFromLua(lua_State* L, int index, const std::string& type) {
+std::shared_ptr<Element> RawXMLElementConvertor::convertFromLua(lua_State* L, int index, const std::string& type) {
if (type == "xml") {
- return boost::make_shared<RawXMLPayload>(std::string(Lua::checkString(L, index)));
+ return std::make_shared<RawXMLPayload>(std::string(Lua::checkString(L, index)));
}
- return boost::shared_ptr<Payload>();
+ return std::shared_ptr<Payload>();
}
-boost::optional<std::string> RawXMLElementConvertor::convertToLua(lua_State* L, boost::shared_ptr<Element> element) {
- boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(element);
+boost::optional<std::string> RawXMLElementConvertor::convertToLua(lua_State* L, std::shared_ptr<Element> element) {
+ std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(element);
if (!payload) {
return boost::optional<std::string>();
}
diff --git a/Sluift/ElementConvertors/RawXMLElementConvertor.h b/Sluift/ElementConvertors/RawXMLElementConvertor.h
index 22323ec..79f648f 100644
--- a/Sluift/ElementConvertors/RawXMLElementConvertor.h
+++ b/Sluift/ElementConvertors/RawXMLElementConvertor.h
@@ -17,8 +17,8 @@ namespace Swift {
RawXMLElementConvertor();
virtual ~RawXMLElementConvertor();
- virtual boost::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, boost::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
private:
FullPayloadSerializerCollection serializers;
diff --git a/Sluift/ElementConvertors/ResultSetConvertor.cpp b/Sluift/ElementConvertors/ResultSetConvertor.cpp
index aa84aac..7762a79 100644
--- a/Sluift/ElementConvertors/ResultSetConvertor.cpp
+++ b/Sluift/ElementConvertors/ResultSetConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/ResultSetConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -20,8 +21,8 @@ ResultSetConvertor::ResultSetConvertor() :
ResultSetConvertor::~ResultSetConvertor() {
}
-boost::shared_ptr<ResultSet> ResultSetConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<ResultSet> result = boost::make_shared<ResultSet>();
+std::shared_ptr<ResultSet> ResultSetConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<ResultSet> result = std::make_shared<ResultSet>();
lua_getfield(L, -1, "max_items");
if (lua_isstring(L, -1)) {
result->setMaxItems(boost::numeric_cast<int>(lua_tonumber(L, -1)));
@@ -65,7 +66,7 @@ boost::shared_ptr<ResultSet> ResultSetConvertor::doConvertFromLua(lua_State* L)
return result;
}
-void ResultSetConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<ResultSet> payload) {
+void ResultSetConvertor::doConvertToLua(lua_State* L, std::shared_ptr<ResultSet> payload) {
lua_createtable(L, 0, 0);
if (payload->getMaxItems()) {
lua_pushnumber(L, *payload->getMaxItems());
diff --git a/Sluift/ElementConvertors/ResultSetConvertor.h b/Sluift/ElementConvertors/ResultSetConvertor.h
index 5df9c3e..e1b826c 100644
--- a/Sluift/ElementConvertors/ResultSetConvertor.h
+++ b/Sluift/ElementConvertors/ResultSetConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
ResultSetConvertor();
virtual ~ResultSetConvertor();
- virtual boost::shared_ptr<ResultSet> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<ResultSet>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<ResultSet> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<ResultSet>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/SecurityLabelConvertor.cpp b/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
index a5cae40..133b123 100644
--- a/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
+++ b/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/SecurityLabelConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -22,8 +23,8 @@ SecurityLabelConvertor::SecurityLabelConvertor() :
SecurityLabelConvertor::~SecurityLabelConvertor() {
}
-boost::shared_ptr<SecurityLabel> SecurityLabelConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<SecurityLabel> result = boost::make_shared<SecurityLabel>();
+std::shared_ptr<SecurityLabel> SecurityLabelConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<SecurityLabel> result = std::make_shared<SecurityLabel>();
lua_getfield(L, -1, "equivalent_labels");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::string > items;
@@ -62,7 +63,7 @@ boost::shared_ptr<SecurityLabel> SecurityLabelConvertor::doConvertFromLua(lua_St
return result;
}
-void SecurityLabelConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<SecurityLabel> payload) {
+void SecurityLabelConvertor::doConvertToLua(lua_State* L, std::shared_ptr<SecurityLabel> payload) {
lua_createtable(L, 0, 0);
if (!payload->getEquivalentLabels().empty()) {
lua_createtable(L, boost::numeric_cast<int>(payload->getEquivalentLabels().size()), 0);
diff --git a/Sluift/ElementConvertors/SecurityLabelConvertor.h b/Sluift/ElementConvertors/SecurityLabelConvertor.h
index eff455c..a0e7fea 100644
--- a/Sluift/ElementConvertors/SecurityLabelConvertor.h
+++ b/Sluift/ElementConvertors/SecurityLabelConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
SecurityLabelConvertor();
virtual ~SecurityLabelConvertor();
- virtual boost::shared_ptr<SecurityLabel> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<SecurityLabel>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<SecurityLabel> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<SecurityLabel>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/SoftwareVersionConvertor.cpp b/Sluift/ElementConvertors/SoftwareVersionConvertor.cpp
index 4f372c2..f997a45 100644
--- a/Sluift/ElementConvertors/SoftwareVersionConvertor.cpp
+++ b/Sluift/ElementConvertors/SoftwareVersionConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/SoftwareVersionConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -21,8 +22,8 @@ SoftwareVersionConvertor::SoftwareVersionConvertor() : GenericLuaElementConverto
SoftwareVersionConvertor::~SoftwareVersionConvertor() {
}
-boost::shared_ptr<SoftwareVersion> SoftwareVersionConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<SoftwareVersion> result = boost::make_shared<SoftwareVersion>();
+std::shared_ptr<SoftwareVersion> SoftwareVersionConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<SoftwareVersion> result = std::make_shared<SoftwareVersion>();
lua_getfield(L, -1, "name");
if (!lua_isnil(L, -1)) {
result->setName(std::string(Lua::checkString(L, -1)));
@@ -41,7 +42,7 @@ boost::shared_ptr<SoftwareVersion> SoftwareVersionConvertor::doConvertFromLua(lu
return result;
}
-void SoftwareVersionConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<SoftwareVersion> payload) {
+void SoftwareVersionConvertor::doConvertToLua(lua_State* L, std::shared_ptr<SoftwareVersion> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getName().c_str());
lua_setfield(L, -2, "name");
diff --git a/Sluift/ElementConvertors/SoftwareVersionConvertor.h b/Sluift/ElementConvertors/SoftwareVersionConvertor.h
index 4df23c0..29b1483 100644
--- a/Sluift/ElementConvertors/SoftwareVersionConvertor.h
+++ b/Sluift/ElementConvertors/SoftwareVersionConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
SoftwareVersionConvertor();
virtual ~SoftwareVersionConvertor();
- virtual boost::shared_ptr<SoftwareVersion> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<SoftwareVersion>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<SoftwareVersion> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<SoftwareVersion>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/StanzaConvertor.h b/Sluift/ElementConvertors/StanzaConvertor.h
index 309121e..e1d0cb3 100644
--- a/Sluift/ElementConvertors/StanzaConvertor.h
+++ b/Sluift/ElementConvertors/StanzaConvertor.h
@@ -28,8 +28,8 @@ namespace Swift {
virtual ~StanzaConvertor() {
}
- boost::shared_ptr<T> getStanza(lua_State* L, LuaElementConvertors* convertors) {
- boost::shared_ptr<T> result = boost::make_shared<T>();
+ std::shared_ptr<T> getStanza(lua_State* L, LuaElementConvertors* convertors) {
+ std::shared_ptr<T> result = std::make_shared<T>();
lua_getfield(L, -1, "id");
if (lua_isstring(L, -1)) {
result->setID(lua_tostring(L, -1));
@@ -51,7 +51,7 @@ namespace Swift {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
- boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1));
+ std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(convertors->convertFromLua(L, -1));
if (!!payload) {
result->addPayload(payload);
}
@@ -63,7 +63,7 @@ namespace Swift {
return result;
}
- void pushStanza(lua_State* L, const boost::shared_ptr<T> stanza, LuaElementConvertors* convertors) {
+ void pushStanza(lua_State* L, const std::shared_ptr<T> stanza, LuaElementConvertors* convertors) {
lua_createtable(L, 0, 0);
lua_pushstring(L, stanza->getID().c_str());
lua_setfield(L, -2, "id");
@@ -75,7 +75,7 @@ namespace Swift {
lua_createtable(L, boost::numeric_cast<int>(stanza->getPayloads().size()), 0);
{
int i = 0;
- foreach(const boost::shared_ptr<Payload> &item, stanza->getPayloads()) {
+ foreach(const std::shared_ptr<Payload> &item, stanza->getPayloads()) {
if (convertors->convertToLua(L, item) > 0) {
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
++i;
diff --git a/Sluift/ElementConvertors/StatusConvertor.cpp b/Sluift/ElementConvertors/StatusConvertor.cpp
index 241a2cc..eed4044 100644
--- a/Sluift/ElementConvertors/StatusConvertor.cpp
+++ b/Sluift/ElementConvertors/StatusConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/StatusConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -21,8 +22,8 @@ StatusConvertor::StatusConvertor() : GenericLuaElementConvertor<Status>("status"
StatusConvertor::~StatusConvertor() {
}
-boost::shared_ptr<Status> StatusConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Status> result = boost::make_shared<Status>();
+std::shared_ptr<Status> StatusConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Status> result = std::make_shared<Status>();
lua_getfield(L, -1, "text");
if (lua_isstring(L, -1)) {
result->setText(lua_tostring(L, -1));
@@ -31,7 +32,7 @@ boost::shared_ptr<Status> StatusConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void StatusConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Status> payload) {
+void StatusConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Status> payload) {
lua_createtable(L, 0, 0);
lua_pushstring(L, payload->getText().c_str());
lua_setfield(L, -2, "text");
diff --git a/Sluift/ElementConvertors/StatusConvertor.h b/Sluift/ElementConvertors/StatusConvertor.h
index 739d319..53da0ad 100644
--- a/Sluift/ElementConvertors/StatusConvertor.h
+++ b/Sluift/ElementConvertors/StatusConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
StatusConvertor();
virtual ~StatusConvertor();
- virtual boost::shared_ptr<Status> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Status>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Status> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Status>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/StatusShowConvertor.cpp b/Sluift/ElementConvertors/StatusShowConvertor.cpp
index d1c1e85..6d0a067 100644
--- a/Sluift/ElementConvertors/StatusShowConvertor.cpp
+++ b/Sluift/ElementConvertors/StatusShowConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/StatusShowConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -22,8 +23,8 @@ StatusShowConvertor::StatusShowConvertor() : GenericLuaElementConvertor<StatusSh
StatusShowConvertor::~StatusShowConvertor() {
}
-boost::shared_ptr<StatusShow> StatusShowConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<StatusShow> result = boost::make_shared<StatusShow>();
+std::shared_ptr<StatusShow> StatusShowConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<StatusShow> result = std::make_shared<StatusShow>();
lua_getfield(L, -1, "type");
if (lua_isstring(L, -1)) {
result->setType(convertStatusShowTypeFromString(lua_tostring(L, -1)));
@@ -32,7 +33,7 @@ boost::shared_ptr<StatusShow> StatusShowConvertor::doConvertFromLua(lua_State* L
return result;
}
-void StatusShowConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<StatusShow> payload) {
+void StatusShowConvertor::doConvertToLua(lua_State* L, std::shared_ptr<StatusShow> payload) {
lua_createtable(L, 0, 0);
const std::string show = convertStatusShowTypeToString(payload->getType());
if (!show.empty()) {
diff --git a/Sluift/ElementConvertors/StatusShowConvertor.h b/Sluift/ElementConvertors/StatusShowConvertor.h
index 1eef447..1521ca3 100644
--- a/Sluift/ElementConvertors/StatusShowConvertor.h
+++ b/Sluift/ElementConvertors/StatusShowConvertor.h
@@ -17,8 +17,8 @@ namespace Swift {
StatusShowConvertor();
virtual ~StatusShowConvertor();
- virtual boost::shared_ptr<StatusShow> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<StatusShow>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<StatusShow> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<StatusShow>) SWIFTEN_OVERRIDE;
static std::string convertStatusShowTypeToString(const StatusShow::Type &show);
static StatusShow::Type convertStatusShowTypeFromString(const std::string& show);
diff --git a/Sluift/ElementConvertors/SubjectConvertor.cpp b/Sluift/ElementConvertors/SubjectConvertor.cpp
index ac40744..ae03564 100644
--- a/Sluift/ElementConvertors/SubjectConvertor.cpp
+++ b/Sluift/ElementConvertors/SubjectConvertor.cpp
@@ -6,7 +6,7 @@
#include <Sluift/ElementConvertors/SubjectConvertor.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <lua.hpp>
@@ -20,15 +20,15 @@ SubjectConvertor::SubjectConvertor() : GenericLuaElementConvertor<Subject>("subj
SubjectConvertor::~SubjectConvertor() {
}
-boost::shared_ptr<Subject> SubjectConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<Subject> result = boost::make_shared<Subject>();
+std::shared_ptr<Subject> SubjectConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<Subject> result = std::make_shared<Subject>();
if (boost::optional<std::string> value = Lua::getStringField(L, -1, "text")) {
result->setText(*value);
}
return result;
}
-void SubjectConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<Subject> payload) {
+void SubjectConvertor::doConvertToLua(lua_State* L, std::shared_ptr<Subject> payload) {
lua_createtable(L, 0, 0);
if (!payload->getText().empty()) {
lua_pushstring(L, payload->getText().c_str());
diff --git a/Sluift/ElementConvertors/SubjectConvertor.h b/Sluift/ElementConvertors/SubjectConvertor.h
index 604ad9c..1520004 100644
--- a/Sluift/ElementConvertors/SubjectConvertor.h
+++ b/Sluift/ElementConvertors/SubjectConvertor.h
@@ -19,7 +19,7 @@ namespace Swift {
SubjectConvertor();
virtual ~SubjectConvertor();
- virtual boost::shared_ptr<Subject> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<Subject>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Subject> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Subject>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/UserLocationConvertor.cpp b/Sluift/ElementConvertors/UserLocationConvertor.cpp
index d59382b..16ba41c 100644
--- a/Sluift/ElementConvertors/UserLocationConvertor.cpp
+++ b/Sluift/ElementConvertors/UserLocationConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/UserLocationConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -22,8 +23,8 @@ UserLocationConvertor::UserLocationConvertor() :
UserLocationConvertor::~UserLocationConvertor() {
}
-boost::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<UserLocation> result = boost::make_shared<UserLocation>();
+std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<UserLocation> result = std::make_shared<UserLocation>();
lua_getfield(L, -1, "area");
if (lua_isstring(L, -1)) {
result->setArea(std::string(lua_tostring(L, -1)));
@@ -137,7 +138,7 @@ boost::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_Stat
return result;
}
-void UserLocationConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<UserLocation> payload) {
+void UserLocationConvertor::doConvertToLua(lua_State* L, std::shared_ptr<UserLocation> payload) {
lua_createtable(L, 0, 0);
if (payload->getArea()) {
lua_pushstring(L, (*payload->getArea()).c_str());
diff --git a/Sluift/ElementConvertors/UserLocationConvertor.h b/Sluift/ElementConvertors/UserLocationConvertor.h
index d8f7e55..36e3a0b 100644
--- a/Sluift/ElementConvertors/UserLocationConvertor.h
+++ b/Sluift/ElementConvertors/UserLocationConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
UserLocationConvertor();
virtual ~UserLocationConvertor();
- virtual boost::shared_ptr<UserLocation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<UserLocation>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<UserLocation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<UserLocation>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/UserTuneConvertor.cpp b/Sluift/ElementConvertors/UserTuneConvertor.cpp
index 09bf9bf..a9e1bee 100644
--- a/Sluift/ElementConvertors/UserTuneConvertor.cpp
+++ b/Sluift/ElementConvertors/UserTuneConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/UserTuneConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -20,8 +21,8 @@ UserTuneConvertor::UserTuneConvertor() :
UserTuneConvertor::~UserTuneConvertor() {
}
-boost::shared_ptr<UserTune> UserTuneConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<UserTune> result = boost::make_shared<UserTune>();
+std::shared_ptr<UserTune> UserTuneConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<UserTune> result = std::make_shared<UserTune>();
lua_getfield(L, -1, "rating");
if (lua_isnumber(L, -1)) {
result->setRating(boost::numeric_cast<unsigned int>(lua_tonumber(L, -1)));
@@ -60,7 +61,7 @@ boost::shared_ptr<UserTune> UserTuneConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void UserTuneConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<UserTune> payload) {
+void UserTuneConvertor::doConvertToLua(lua_State* L, std::shared_ptr<UserTune> payload) {
lua_createtable(L, 0, 0);
if (payload->getRating()) {
lua_pushnumber(L, (*payload->getRating()));
diff --git a/Sluift/ElementConvertors/UserTuneConvertor.h b/Sluift/ElementConvertors/UserTuneConvertor.h
index 9fb03ed..ba57747 100644
--- a/Sluift/ElementConvertors/UserTuneConvertor.h
+++ b/Sluift/ElementConvertors/UserTuneConvertor.h
@@ -19,8 +19,8 @@ namespace Swift {
UserTuneConvertor();
virtual ~UserTuneConvertor();
- virtual boost::shared_ptr<UserTune> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<UserTune>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<UserTune> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<UserTune>) SWIFTEN_OVERRIDE;
virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/VCardConvertor.cpp b/Sluift/ElementConvertors/VCardConvertor.cpp
index 108d233..ad521b3 100644
--- a/Sluift/ElementConvertors/VCardConvertor.cpp
+++ b/Sluift/ElementConvertors/VCardConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/VCardConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -24,8 +25,8 @@ VCardConvertor::VCardConvertor() : GenericLuaElementConvertor<VCard>("vcard") {
VCardConvertor::~VCardConvertor() {
}
-boost::shared_ptr<VCard> VCardConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<VCard> result = boost::make_shared<VCard>();
+std::shared_ptr<VCard> VCardConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<VCard> result = std::make_shared<VCard>();
lua_getfield(L, -1, "fullname");
if (lua_isstring(L, -1)) {
result->setFullName(std::string(lua_tostring(L, -1)));
@@ -304,7 +305,7 @@ boost::shared_ptr<VCard> VCardConvertor::doConvertFromLua(lua_State* L) {
return result;
}
-void VCardConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<VCard> payload) {
+void VCardConvertor::doConvertToLua(lua_State* L, std::shared_ptr<VCard> payload) {
lua_newtable(L);
if (!payload->getFullName().empty()) {
lua_pushstring(L, payload->getFullName().c_str());
diff --git a/Sluift/ElementConvertors/VCardConvertor.h b/Sluift/ElementConvertors/VCardConvertor.h
index 95da590..d63ef10 100644
--- a/Sluift/ElementConvertors/VCardConvertor.h
+++ b/Sluift/ElementConvertors/VCardConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
VCardConvertor();
virtual ~VCardConvertor();
- virtual boost::shared_ptr<VCard> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<VCard>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<VCard> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<VCard>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/ElementConvertors/VCardUpdateConvertor.cpp b/Sluift/ElementConvertors/VCardUpdateConvertor.cpp
index f3da05a..21c3d68 100644
--- a/Sluift/ElementConvertors/VCardUpdateConvertor.cpp
+++ b/Sluift/ElementConvertors/VCardUpdateConvertor.cpp
@@ -6,8 +6,9 @@
#include <Sluift/ElementConvertors/VCardUpdateConvertor.h>
+#include <memory>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <lua.hpp>
@@ -21,15 +22,15 @@ VCardUpdateConvertor::VCardUpdateConvertor() : GenericLuaElementConvertor<VCardU
VCardUpdateConvertor::~VCardUpdateConvertor() {
}
-boost::shared_ptr<VCardUpdate> VCardUpdateConvertor::doConvertFromLua(lua_State* L) {
- boost::shared_ptr<VCardUpdate> result = boost::make_shared<VCardUpdate>();
+std::shared_ptr<VCardUpdate> VCardUpdateConvertor::doConvertFromLua(lua_State* L) {
+ std::shared_ptr<VCardUpdate> result = std::make_shared<VCardUpdate>();
if (boost::optional<std::string> value = Lua::getStringField(L, -1, "photo_hash")) {
result->setPhotoHash(*value);
}
return result;
}
-void VCardUpdateConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<VCardUpdate> payload) {
+void VCardUpdateConvertor::doConvertToLua(lua_State* L, std::shared_ptr<VCardUpdate> payload) {
lua_newtable(L);
if (!payload->getPhotoHash().empty()) {
lua_pushstring(L, payload->getPhotoHash().c_str());
diff --git a/Sluift/ElementConvertors/VCardUpdateConvertor.h b/Sluift/ElementConvertors/VCardUpdateConvertor.h
index b4a3882..851f3b1 100644
--- a/Sluift/ElementConvertors/VCardUpdateConvertor.h
+++ b/Sluift/ElementConvertors/VCardUpdateConvertor.h
@@ -17,7 +17,7 @@ namespace Swift {
VCardUpdateConvertor();
virtual ~VCardUpdateConvertor();
- virtual boost::shared_ptr<VCardUpdate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<VCardUpdate>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<VCardUpdate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<VCardUpdate>) SWIFTEN_OVERRIDE;
};
}
diff --git a/Sluift/GenericLuaElementConvertor.h b/Sluift/GenericLuaElementConvertor.h
index dd11c2b..d94a324 100644
--- a/Sluift/GenericLuaElementConvertor.h
+++ b/Sluift/GenericLuaElementConvertor.h
@@ -25,20 +25,20 @@ namespace Swift {
virtual ~GenericLuaElementConvertor() {}
- virtual boost::shared_ptr<Element> convertFromLua(lua_State* L, int index, const std::string& payloadType) SWIFTEN_OVERRIDE {
+ virtual std::shared_ptr<Element> convertFromLua(lua_State* L, int index, const std::string& payloadType) SWIFTEN_OVERRIDE {
if (payloadType == type) {
Lua::checkType(L, index, LUA_TTABLE);
lua_pushvalue(L, index);
- boost::shared_ptr<Element> result = doConvertFromLua(L);
+ std::shared_ptr<Element> result = doConvertFromLua(L);
lua_pop(L, 1);
return result;
}
- return boost::shared_ptr<Element>();
+ return std::shared_ptr<Element>();
}
virtual boost::optional<std::string> convertToLua(
- lua_State* L, boost::shared_ptr<Element> payload) SWIFTEN_OVERRIDE {
- if (boost::shared_ptr<T> actualPayload = boost::dynamic_pointer_cast<T>(payload)) {
+ lua_State* L, std::shared_ptr<Element> payload) SWIFTEN_OVERRIDE {
+ if (std::shared_ptr<T> actualPayload = std::dynamic_pointer_cast<T>(payload)) {
doConvertToLua(L, actualPayload);
assert(lua_type(L, -1) == LUA_TTABLE);
return type;
@@ -47,8 +47,8 @@ namespace Swift {
}
protected:
- virtual boost::shared_ptr<T> doConvertFromLua(lua_State*) = 0;
- virtual void doConvertToLua(lua_State*, boost::shared_ptr<T>) = 0;
+ virtual std::shared_ptr<T> doConvertFromLua(lua_State*) = 0;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<T>) = 0;
private:
std::string type;
diff --git a/Sluift/ITunesInterface.h b/Sluift/ITunesInterface.h
index 075ab35..a2cd06a 100644
--- a/Sluift/ITunesInterface.h
+++ b/Sluift/ITunesInterface.h
@@ -6,8 +6,10 @@
#pragma once
+#include <memory>
+#include <string>
+
#include <boost/optional/optional_fwd.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
@@ -33,6 +35,6 @@ namespace Swift {
private:
struct Private;
- boost::shared_ptr<Private> p;
+ std::shared_ptr<Private> p;
};
}
diff --git a/Sluift/ITunesInterface.mm b/Sluift/ITunesInterface.mm
index a5ada5b..7493d10 100644
--- a/Sluift/ITunesInterface.mm
+++ b/Sluift/ITunesInterface.mm
@@ -12,7 +12,7 @@
#pragma clang diagnostic pop
#include <ScriptingBridge/ScriptingBridge.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <boost/optional.hpp>
#include <SwifTools/Cocoa/CocoaUtil.h>
@@ -25,7 +25,7 @@ struct ITunesInterface::Private {
iTunesApplication* iTunes;
};
-ITunesInterface::ITunesInterface() : p(boost::make_shared<Private>()) {
+ITunesInterface::ITunesInterface() : p(std::make_shared<Private>()) {
}
ITunesInterface::~ITunesInterface() {
diff --git a/Sluift/Lua/Value.cpp b/Sluift/Lua/Value.cpp
index dd61d59..ed776c1 100644
--- a/Sluift/Lua/Value.cpp
+++ b/Sluift/Lua/Value.cpp
@@ -47,9 +47,9 @@ namespace {
}
}
- void operator()(const std::map<std::string, boost::shared_ptr<Value> >& table) const {
+ void operator()(const std::map<std::string, std::shared_ptr<Value> >& table) const {
lua_createtable(state, 0, boost::numeric_cast<int>(table.size()));
- for(std::map<std::string, boost::shared_ptr<Value> >::const_iterator i = table.begin(); i != table.end(); ++i) {
+ for(std::map<std::string, std::shared_ptr<Value> >::const_iterator i = table.begin(); i != table.end(); ++i) {
boost::apply_visitor(PushVisitor(state), *i->second);
lua_setfield(state, -2, i->first.c_str());
}
diff --git a/Sluift/Lua/Value.h b/Sluift/Lua/Value.h
index f525fb8..13c4a0c 100644
--- a/Sluift/Lua/Value.h
+++ b/Sluift/Lua/Value.h
@@ -7,11 +7,10 @@
#pragma once
#include <map>
+#include <memory>
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <boost/variant.hpp>
struct lua_State;
@@ -26,34 +25,34 @@ namespace Swift {
int,
std::string,
std::vector< boost::recursive_variant_ >,
- std::map<std::string, boost::shared_ptr<boost::recursive_variant_> >
+ std::map<std::string, std::shared_ptr<boost::recursive_variant_> >
>::type Value;
- typedef std::map<std::string, boost::shared_ptr<Value> > Table;
+ typedef std::map<std::string, std::shared_ptr<Value> > Table;
typedef std::vector<Value> Array;
- inline boost::shared_ptr<Value> nilRef() {
- return boost::make_shared<Value>(Nil());
+ inline std::shared_ptr<Value> nilRef() {
+ return std::make_shared<Value>(Nil());
}
- inline boost::shared_ptr<Value> valueRef(const std::string& value) {
- return boost::make_shared<Value>(value);
+ inline std::shared_ptr<Value> valueRef(const std::string& value) {
+ return std::make_shared<Value>(value);
}
- inline boost::shared_ptr<Value> intRef(int value) {
- return boost::make_shared<Value>(value);
+ inline std::shared_ptr<Value> intRef(int value) {
+ return std::make_shared<Value>(value);
}
- inline boost::shared_ptr<Value> boolRef(bool value) {
- return boost::make_shared<Value>(value);
+ inline std::shared_ptr<Value> boolRef(bool value) {
+ return std::make_shared<Value>(value);
}
- inline boost::shared_ptr<Value> valueRef(const Table& table) {
- return boost::make_shared<Value>(table);
+ inline std::shared_ptr<Value> valueRef(const Table& table) {
+ return std::make_shared<Value>(table);
}
- inline boost::shared_ptr<Value> valueRef(const Array& array) {
- return boost::make_shared<Value>(array);
+ inline std::shared_ptr<Value> valueRef(const Array& array) {
+ return std::make_shared<Value>(array);
}
void pushValue(lua_State* state, const Value& value);
diff --git a/Sluift/LuaElementConvertor.h b/Sluift/LuaElementConvertor.h
index 6c237fd..2cf98e7 100644
--- a/Sluift/LuaElementConvertor.h
+++ b/Sluift/LuaElementConvertor.h
@@ -6,10 +6,10 @@
#pragma once
+#include <memory>
#include <string>
#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/Override.h>
@@ -31,8 +31,8 @@ namespace Swift {
virtual ~LuaElementConvertor();
- virtual boost::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) = 0;
- virtual boost::optional<std::string> convertToLua(lua_State*, boost::shared_ptr<Element>) = 0;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) = 0;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) = 0;
virtual boost::optional<Documentation> getDocumentation() const {
return boost::optional<Documentation>();
diff --git a/Sluift/LuaElementConvertors.cpp b/Sluift/LuaElementConvertors.cpp
index 67c0545..cfc90d8 100644
--- a/Sluift/LuaElementConvertors.cpp
+++ b/Sluift/LuaElementConvertors.cpp
@@ -6,7 +6,7 @@
#include <Sluift/LuaElementConvertors.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
@@ -42,30 +42,30 @@ using namespace Swift;
LuaElementConvertors::LuaElementConvertors() {
registerConvertors();
- convertors.push_back(boost::make_shared<StatusConvertor>());
- convertors.push_back(boost::make_shared<StatusShowConvertor>());
- convertors.push_back(boost::make_shared<DelayConvertor>());
- convertors.push_back(boost::make_shared<CommandConvertor>(this));
- convertors.push_back(boost::make_shared<PubSubEventConvertor>(this));
- convertors.push_back(boost::make_shared<BodyConvertor>());
- convertors.push_back(boost::make_shared<SubjectConvertor>());
- convertors.push_back(boost::make_shared<VCardConvertor>());
- convertors.push_back(boost::make_shared<VCardUpdateConvertor>());
- convertors.push_back(boost::make_shared<FormConvertor>());
- convertors.push_back(boost::make_shared<SoftwareVersionConvertor>());
- convertors.push_back(boost::make_shared<DiscoInfoConvertor>());
- convertors.push_back(boost::make_shared<DiscoItemsConvertor>());
- convertors.push_back(boost::make_shared<IQConvertor>(this));
- convertors.push_back(boost::make_shared<PresenceConvertor>(this));
- convertors.push_back(boost::make_shared<MessageConvertor>(this));
- convertors.push_back(boost::make_shared<ResultSetConvertor>());
- convertors.push_back(boost::make_shared<ForwardedConvertor>(this));
- convertors.push_back(boost::make_shared<MAMResultConvertor>(this));
- convertors.push_back(boost::make_shared<MAMQueryConvertor>(this));
- convertors.push_back(boost::make_shared<MAMFinConvertor>(this));
- convertors.push_back(boost::make_shared<DOMElementConvertor>());
- convertors.push_back(boost::make_shared<RawXMLElementConvertor>());
- convertors.push_back(boost::make_shared<DefaultElementConvertor>());
+ convertors.push_back(std::make_shared<StatusConvertor>());
+ convertors.push_back(std::make_shared<StatusShowConvertor>());
+ convertors.push_back(std::make_shared<DelayConvertor>());
+ convertors.push_back(std::make_shared<CommandConvertor>(this));
+ convertors.push_back(std::make_shared<PubSubEventConvertor>(this));
+ convertors.push_back(std::make_shared<BodyConvertor>());
+ convertors.push_back(std::make_shared<SubjectConvertor>());
+ convertors.push_back(std::make_shared<VCardConvertor>());
+ convertors.push_back(std::make_shared<VCardUpdateConvertor>());
+ convertors.push_back(std::make_shared<FormConvertor>());
+ convertors.push_back(std::make_shared<SoftwareVersionConvertor>());
+ convertors.push_back(std::make_shared<DiscoInfoConvertor>());
+ convertors.push_back(std::make_shared<DiscoItemsConvertor>());
+ convertors.push_back(std::make_shared<IQConvertor>(this));
+ convertors.push_back(std::make_shared<PresenceConvertor>(this));
+ convertors.push_back(std::make_shared<MessageConvertor>(this));
+ convertors.push_back(std::make_shared<ResultSetConvertor>());
+ convertors.push_back(std::make_shared<ForwardedConvertor>(this));
+ convertors.push_back(std::make_shared<MAMResultConvertor>(this));
+ convertors.push_back(std::make_shared<MAMQueryConvertor>(this));
+ convertors.push_back(std::make_shared<MAMFinConvertor>(this));
+ convertors.push_back(std::make_shared<DOMElementConvertor>());
+ convertors.push_back(std::make_shared<RawXMLElementConvertor>());
+ convertors.push_back(std::make_shared<DefaultElementConvertor>());
}
LuaElementConvertors::~LuaElementConvertors() {
@@ -73,7 +73,7 @@ LuaElementConvertors::~LuaElementConvertors() {
#include <Sluift/ElementConvertors/ElementConvertors.ipp>
-boost::shared_ptr<Element> LuaElementConvertors::convertFromLua(lua_State* L, int index) {
+std::shared_ptr<Element> LuaElementConvertors::convertFromLua(lua_State* L, int index) {
if (lua_isstring(L, index)) {
return convertFromLuaUntyped(L, index, "xml");
}
@@ -89,18 +89,18 @@ boost::shared_ptr<Element> LuaElementConvertors::convertFromLua(lua_State* L, in
throw Lua::Exception("Unable to determine type");
}
-boost::shared_ptr<Element> LuaElementConvertors::convertFromLuaUntyped(lua_State* L, int index, const std::string& type) {
+std::shared_ptr<Element> LuaElementConvertors::convertFromLuaUntyped(lua_State* L, int index, const std::string& type) {
index = Lua::absoluteOffset(L, index);
- foreach (boost::shared_ptr<LuaElementConvertor> convertor, convertors) {
- if (boost::shared_ptr<Element> result = convertor->convertFromLua(L, index, type)) {
+ foreach (std::shared_ptr<LuaElementConvertor> convertor, convertors) {
+ if (std::shared_ptr<Element> result = convertor->convertFromLua(L, index, type)) {
return result;
}
}
- return boost::shared_ptr<Element>();
+ return std::shared_ptr<Element>();
}
-int LuaElementConvertors::convertToLua(lua_State* L, boost::shared_ptr<Element> payload) {
+int LuaElementConvertors::convertToLua(lua_State* L, std::shared_ptr<Element> payload) {
if (boost::optional<std::string> type = doConvertToLuaUntyped(L, payload)) {
if (lua_istable(L, -1)) {
lua_pushstring(L, type->c_str());
@@ -115,7 +115,7 @@ int LuaElementConvertors::convertToLua(lua_State* L, boost::shared_ptr<Element>
return 0;
}
-int LuaElementConvertors::convertToLuaUntyped(lua_State* L, boost::shared_ptr<Element> payload) {
+int LuaElementConvertors::convertToLuaUntyped(lua_State* L, std::shared_ptr<Element> payload) {
if (doConvertToLuaUntyped(L, payload)) {
return 1;
}
@@ -123,11 +123,11 @@ int LuaElementConvertors::convertToLuaUntyped(lua_State* L, boost::shared_ptr<El
}
boost::optional<std::string> LuaElementConvertors::doConvertToLuaUntyped(
- lua_State* L, boost::shared_ptr<Element> payload) {
+ lua_State* L, std::shared_ptr<Element> payload) {
if (!payload) {
return LuaElementConvertor::NO_RESULT;
}
- foreach (boost::shared_ptr<LuaElementConvertor> convertor, convertors) {
+ foreach (std::shared_ptr<LuaElementConvertor> convertor, convertors) {
if (boost::optional<std::string> type = convertor->convertToLua(L, payload)) {
return *type;
}
diff --git a/Sluift/LuaElementConvertors.h b/Sluift/LuaElementConvertors.h
index 6b3d343..8e1d10b 100644
--- a/Sluift/LuaElementConvertors.h
+++ b/Sluift/LuaElementConvertors.h
@@ -6,10 +6,10 @@
#pragma once
+#include <memory>
#include <vector>
#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/Override.h>
@@ -24,29 +24,29 @@ namespace Swift {
LuaElementConvertors();
virtual ~LuaElementConvertors();
- boost::shared_ptr<Element> convertFromLua(lua_State*, int index);
- int convertToLua(lua_State*, boost::shared_ptr<Element>);
+ std::shared_ptr<Element> convertFromLua(lua_State*, int index);
+ int convertToLua(lua_State*, std::shared_ptr<Element>);
/**
* Adds a toplevel type+data table with the given type.
*/
- boost::shared_ptr<Element> convertFromLuaUntyped(lua_State*, int index, const std::string& type);
+ std::shared_ptr<Element> convertFromLuaUntyped(lua_State*, int index, const std::string& type);
/**
* Strips the toplevel type+data table, and only return the
* data.
*/
- int convertToLuaUntyped(lua_State*, boost::shared_ptr<Element>);
+ int convertToLuaUntyped(lua_State*, std::shared_ptr<Element>);
- const std::vector< boost::shared_ptr<LuaElementConvertor> >& getConvertors() const {
+ const std::vector< std::shared_ptr<LuaElementConvertor> >& getConvertors() const {
return convertors;
}
private:
- boost::optional<std::string> doConvertToLuaUntyped(lua_State*, boost::shared_ptr<Element>);
+ boost::optional<std::string> doConvertToLuaUntyped(lua_State*, std::shared_ptr<Element>);
void registerConvertors();
private:
- std::vector< boost::shared_ptr<LuaElementConvertor> > convertors;
+ std::vector< std::shared_ptr<LuaElementConvertor> > convertors;
};
}
diff --git a/Sluift/Response.cpp b/Sluift/Response.cpp
index 97a44d0..dd98a25 100644
--- a/Sluift/Response.cpp
+++ b/Sluift/Response.cpp
@@ -16,7 +16,7 @@
using namespace Swift;
using namespace Swift::Sluift;
-static std::string getErrorString(boost::shared_ptr<ErrorPayload> error) {
+static std::string getErrorString(std::shared_ptr<ErrorPayload> error) {
// Copied from ChatControllerBase.
// TODO: Share this code;
std::string defaultMessage = "Error sending message";
diff --git a/Sluift/Response.h b/Sluift/Response.h
index c0bd28a..dc35289 100644
--- a/Sluift/Response.h
+++ b/Sluift/Response.h
@@ -15,22 +15,22 @@ struct lua_State;
namespace Swift {
namespace Sluift {
struct Response {
- Response(boost::shared_ptr<Payload> result, boost::shared_ptr<ErrorPayload> error) : result(result), error(error) {}
+ Response(std::shared_ptr<Payload> result, std::shared_ptr<ErrorPayload> error) : result(result), error(error) {}
SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(Response)
~Response();
- static Response withResult(boost::shared_ptr<Payload> response) {
- return Response(response, boost::shared_ptr<ErrorPayload>());
+ static Response withResult(std::shared_ptr<Payload> response) {
+ return Response(response, std::shared_ptr<ErrorPayload>());
}
- static Response withError(boost::shared_ptr<ErrorPayload> error) {
- return Response(boost::shared_ptr<Payload>(), error);
+ static Response withError(std::shared_ptr<ErrorPayload> error) {
+ return Response(std::shared_ptr<Payload>(), error);
}
int convertToLuaResult(lua_State* L);
- boost::shared_ptr<Payload> result;
- boost::shared_ptr<ErrorPayload> error;
+ std::shared_ptr<Payload> result;
+ std::shared_ptr<ErrorPayload> error;
};
}
}
diff --git a/Sluift/SluiftClient.cpp b/Sluift/SluiftClient.cpp
index 8bbb530..f1c0191 100644
--- a/Sluift/SluiftClient.cpp
+++ b/Sluift/SluiftClient.cpp
@@ -145,7 +145,7 @@ std::vector<XMPPRosterItem> SluiftClient::getRoster(int timeout) {
return client->getRoster()->getItems();
}
-void SluiftClient::handleIncomingMessage(boost::shared_ptr<Message> stanza) {
+void SluiftClient::handleIncomingMessage(std::shared_ptr<Message> stanza) {
if (stanza->getPayload<PubSubEvent>()) {
// Already handled by pubsub manager
return;
@@ -153,11 +153,11 @@ void SluiftClient::handleIncomingMessage(boost::shared_ptr<Message> stanza) {
pendingEvents.push_back(Event(stanza));
}
-void SluiftClient::handleIncomingPresence(boost::shared_ptr<Presence> stanza) {
+void SluiftClient::handleIncomingPresence(std::shared_ptr<Presence> stanza) {
pendingEvents.push_back(Event(stanza));
}
-void SluiftClient::handleIncomingPubSubEvent(const JID& from, boost::shared_ptr<PubSubEventPayload> event) {
+void SluiftClient::handleIncomingPubSubEvent(const JID& from, std::shared_ptr<PubSubEventPayload> event) {
pendingEvents.push_back(Event(from, event));
}
@@ -165,7 +165,7 @@ void SluiftClient::handleInitialRosterPopulated() {
rosterReceived = true;
}
-void SluiftClient::handleRequestResponse(boost::shared_ptr<Payload> response, boost::shared_ptr<ErrorPayload> error) {
+void SluiftClient::handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error) {
requestResponse = response;
requestError = error;
requestResponseReceived = true;
@@ -175,7 +175,7 @@ void SluiftClient::handleDisconnected(const boost::optional<ClientError>& error)
disconnectedError = error;
}
-Sluift::Response SluiftClient::doSendRequest(boost::shared_ptr<Request> request, int timeout) {
+Sluift::Response SluiftClient::doSendRequest(std::shared_ptr<Request> request, int timeout) {
requestResponse.reset();
requestError.reset();
requestResponseReceived = false;
@@ -186,5 +186,5 @@ Sluift::Response SluiftClient::doSendRequest(boost::shared_ptr<Request> request,
eventLoop->runUntilEvents();
}
return Sluift::Response(requestResponse, watchdog.getTimedOut() ?
- boost::make_shared<ErrorPayload>(ErrorPayload::RemoteServerTimeout) : requestError);
+ std::make_shared<ErrorPayload>(ErrorPayload::RemoteServerTimeout) : requestError);
}
diff --git a/Sluift/SluiftClient.h b/Sluift/SluiftClient.h
index d7c3b32..42a59e9 100644
--- a/Sluift/SluiftClient.h
+++ b/Sluift/SluiftClient.h
@@ -45,18 +45,18 @@ namespace Swift {
PubSubEventType
};
- Event(boost::shared_ptr<Message> stanza) : type(MessageType), stanza(stanza) {}
- Event(boost::shared_ptr<Presence> stanza) : type(PresenceType), stanza(stanza) {}
- Event(const JID& from, boost::shared_ptr<PubSubEventPayload> payload) : type(PubSubEventType), from(from), pubsubEvent(payload) {}
+ Event(std::shared_ptr<Message> stanza) : type(MessageType), stanza(stanza) {}
+ Event(std::shared_ptr<Presence> stanza) : type(PresenceType), stanza(stanza) {}
+ Event(const JID& from, std::shared_ptr<PubSubEventPayload> payload) : type(PubSubEventType), from(from), pubsubEvent(payload) {}
Type type;
// Message & Presence
- boost::shared_ptr<Stanza> stanza;
+ std::shared_ptr<Stanza> stanza;
// PubSubEvent
JID from;
- boost::shared_ptr<PubSubEventPayload> pubsubEvent;
+ std::shared_ptr<PubSubEventPayload> pubsubEvent;
};
SluiftClient(
@@ -82,7 +82,7 @@ namespace Swift {
template<typename T>
Sluift::Response sendPubSubRequest(
- IQ::Type type, const JID& jid, boost::shared_ptr<T> payload, int timeout) {
+ IQ::Type type, const JID& jid, std::shared_ptr<T> payload, int timeout) {
return sendRequest(client->getPubSubManager()->createRequest(
type, jid, payload), timeout);
}
@@ -97,7 +97,7 @@ namespace Swift {
template<typename REQUEST_TYPE>
Sluift::Response sendVoidRequest(REQUEST_TYPE request, int timeout) {
boost::signals::scoped_connection c = request->onResponse.connect(
- boost::bind(&SluiftClient::handleRequestResponse, this, boost::shared_ptr<Payload>(), _1));
+ boost::bind(&SluiftClient::handleRequestResponse, this, std::shared_ptr<Payload>(), _1));
return doSendRequest(request, timeout);
}
@@ -108,13 +108,13 @@ namespace Swift {
std::vector<XMPPRosterItem> getRoster(int timeout);
private:
- Sluift::Response doSendRequest(boost::shared_ptr<Request> request, int timeout);
+ Sluift::Response doSendRequest(std::shared_ptr<Request> request, int timeout);
- void handleIncomingMessage(boost::shared_ptr<Message> stanza);
- void handleIncomingPresence(boost::shared_ptr<Presence> stanza);
- void handleIncomingPubSubEvent(const JID& from, boost::shared_ptr<PubSubEventPayload> event);
+ void handleIncomingMessage(std::shared_ptr<Message> stanza);
+ void handleIncomingPresence(std::shared_ptr<Presence> stanza);
+ void handleIncomingPubSubEvent(const JID& from, std::shared_ptr<PubSubEventPayload> event);
void handleInitialRosterPopulated();
- void handleRequestResponse(boost::shared_ptr<Payload> response, boost::shared_ptr<ErrorPayload> error);
+ void handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error);
void handleDisconnected(const boost::optional<ClientError>& error);
private:
@@ -127,7 +127,7 @@ namespace Swift {
std::deque<Event> pendingEvents;
boost::optional<ClientError> disconnectedError;
bool requestResponseReceived;
- boost::shared_ptr<Payload> requestResponse;
- boost::shared_ptr<ErrorPayload> requestError;
+ std::shared_ptr<Payload> requestResponse;
+ std::shared_ptr<ErrorPayload> requestError;
};
}
diff --git a/Sluift/SluiftComponent.cpp b/Sluift/SluiftComponent.cpp
index 6abe800..e1d1738 100644
--- a/Sluift/SluiftComponent.cpp
+++ b/Sluift/SluiftComponent.cpp
@@ -113,15 +113,15 @@ boost::optional<SluiftComponent::Event> SluiftComponent::getNextEvent(
}
}
-void SluiftComponent::handleIncomingMessage(boost::shared_ptr<Message> stanza) {
+void SluiftComponent::handleIncomingMessage(std::shared_ptr<Message> stanza) {
pendingEvents.push_back(Event(stanza));
}
-void SluiftComponent::handleIncomingPresence(boost::shared_ptr<Presence> stanza) {
+void SluiftComponent::handleIncomingPresence(std::shared_ptr<Presence> stanza) {
pendingEvents.push_back(Event(stanza));
}
-void SluiftComponent::handleRequestResponse(boost::shared_ptr<Payload> response, boost::shared_ptr<ErrorPayload> error) {
+void SluiftComponent::handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error) {
requestResponse = response;
requestError = error;
requestResponseReceived = true;
@@ -131,7 +131,7 @@ void SluiftComponent::handleError(const boost::optional<ComponentError>& error)
disconnectedError = error;
}
-Sluift::Response SluiftComponent::doSendRequest(boost::shared_ptr<Request> request, int timeout) {
+Sluift::Response SluiftComponent::doSendRequest(std::shared_ptr<Request> request, int timeout) {
requestResponse.reset();
requestError.reset();
requestResponseReceived = false;
@@ -142,5 +142,5 @@ Sluift::Response SluiftComponent::doSendRequest(boost::shared_ptr<Request> reque
eventLoop->runUntilEvents();
}
return Sluift::Response(requestResponse, watchdog.getTimedOut() ?
- boost::make_shared<ErrorPayload>(ErrorPayload::RemoteServerTimeout) : requestError);
+ std::make_shared<ErrorPayload>(ErrorPayload::RemoteServerTimeout) : requestError);
}
diff --git a/Sluift/SluiftComponent.h b/Sluift/SluiftComponent.h
index fd1b97a..83bd52f 100644
--- a/Sluift/SluiftComponent.h
+++ b/Sluift/SluiftComponent.h
@@ -43,13 +43,13 @@ namespace Swift {
PresenceType
};
- Event(boost::shared_ptr<Message> stanza) : type(MessageType), stanza(stanza) {}
- Event(boost::shared_ptr<Presence> stanza) : type(PresenceType), stanza(stanza) {}
+ Event(std::shared_ptr<Message> stanza) : type(MessageType), stanza(stanza) {}
+ Event(std::shared_ptr<Presence> stanza) : type(PresenceType), stanza(stanza) {}
Type type;
// Message & Presence
- boost::shared_ptr<Stanza> stanza;
+ std::shared_ptr<Stanza> stanza;
};
SluiftComponent(
@@ -78,7 +78,7 @@ namespace Swift {
template<typename REQUEST_TYPE>
Sluift::Response sendVoidRequest(REQUEST_TYPE request, int timeout) {
boost::signals::scoped_connection c = request->onResponse.connect(
- boost::bind(&SluiftComponent::handleRequestResponse, this, boost::shared_ptr<Payload>(), _1));
+ boost::bind(&SluiftComponent::handleRequestResponse, this, std::shared_ptr<Payload>(), _1));
return doSendRequest(request, timeout);
}
@@ -88,11 +88,11 @@ namespace Swift {
boost::function<bool (const Event&)> condition = 0);
private:
- Sluift::Response doSendRequest(boost::shared_ptr<Request> request, int timeout);
+ Sluift::Response doSendRequest(std::shared_ptr<Request> request, int timeout);
- void handleIncomingMessage(boost::shared_ptr<Message> stanza);
- void handleIncomingPresence(boost::shared_ptr<Presence> stanza);
- void handleRequestResponse(boost::shared_ptr<Payload> response, boost::shared_ptr<ErrorPayload> error);
+ void handleIncomingMessage(std::shared_ptr<Message> stanza);
+ void handleIncomingPresence(std::shared_ptr<Presence> stanza);
+ void handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error);
void handleError(const boost::optional<ComponentError>& error);
private:
@@ -103,7 +103,7 @@ namespace Swift {
std::deque<Event> pendingEvents;
boost::optional<ComponentError> disconnectedError;
bool requestResponseReceived;
- boost::shared_ptr<Payload> requestResponse;
- boost::shared_ptr<ErrorPayload> requestError;
+ std::shared_ptr<Payload> requestResponse;
+ std::shared_ptr<ErrorPayload> requestError;
};
}
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 3f7861c..f82d314 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -60,7 +60,7 @@ static inline int getGlobalTimeout(lua_State* L) {
return result;
}
-static void addPayloadsToTable(lua_State* L, const std::vector<boost::shared_ptr<Payload> >& payloads) {
+static void addPayloadsToTable(lua_State* L, const std::vector<std::shared_ptr<Payload> >& payloads) {
if (!payloads.empty()) {
lua_createtable(L, boost::numeric_cast<int>(payloads.size()), 0);
for (size_t i = 0; i < payloads.size(); ++i) {
@@ -72,25 +72,25 @@ static void addPayloadsToTable(lua_State* L, const std::vector<boost::shared_ptr
}
}
-static boost::shared_ptr<Payload> getPayload(lua_State* L, int index) {
+static std::shared_ptr<Payload> getPayload(lua_State* L, int index) {
if (lua_type(L, index) == LUA_TTABLE) {
- return boost::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, index));
+ return std::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, index));
}
else if (lua_type(L, index) == LUA_TSTRING) {
- return boost::make_shared<RawXMLPayload>(Lua::checkString(L, index));
+ return std::make_shared<RawXMLPayload>(Lua::checkString(L, index));
}
else {
- return boost::shared_ptr<Payload>();
+ return std::shared_ptr<Payload>();
}
}
-static std::vector< boost::shared_ptr<Payload> > getPayloadsFromTable(lua_State* L, int index) {
+static std::vector< std::shared_ptr<Payload> > getPayloadsFromTable(lua_State* L, int index) {
index = Lua::absoluteOffset(L, index);
- std::vector< boost::shared_ptr<Payload> > result;
+ std::vector< std::shared_ptr<Payload> > result;
lua_getfield(L, index, "payloads");
if (lua_istable(L, -1)) {
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) {
- boost::shared_ptr<Payload> payload = getPayload(L, -1);
+ std::shared_ptr<Payload> payload = getPayload(L, -1);
if (payload) {
result.push_back(payload);
}
@@ -172,7 +172,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
) {
Sluift::globals.eventLoop.runOnce();
SluiftClient* client = getClient(L);
- if (boost::shared_ptr<SoftwareVersion> version = boost::dynamic_pointer_cast<SoftwareVersion>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "software_version"))) {
+ if (std::shared_ptr<SoftwareVersion> version = std::dynamic_pointer_cast<SoftwareVersion>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "software_version"))) {
client->setSoftwareVersion(version->getName(), version->getVersion(), version->getOS());
}
return 0;
@@ -198,11 +198,11 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
case RosterItemPayload::Remove: subscription = "remove"; break;
}
Lua::Table itemTable = boost::assign::map_list_of
- ("jid", boost::make_shared<Lua::Value>(item.getJID().toString()))
- ("name", boost::make_shared<Lua::Value>(item.getName()))
- ("subscription", boost::make_shared<Lua::Value>(subscription))
- ("groups", boost::make_shared<Lua::Value>(std::vector<Lua::Value>(item.getGroups().begin(), item.getGroups().end())));
- contactsTable[item.getJID().toString()] = boost::make_shared<Lua::Value>(itemTable);
+ ("jid", std::make_shared<Lua::Value>(item.getJID().toString()))
+ ("name", std::make_shared<Lua::Value>(item.getName()))
+ ("subscription", std::make_shared<Lua::Value>(subscription))
+ ("groups", std::make_shared<Lua::Value>(std::vector<Lua::Value>(item.getGroups().begin(), item.getGroups().end())));
+ contactsTable[item.getJID().toString()] = std::make_shared<Lua::Value>(itemTable);
}
pushValue(L, contactsTable);
Lua::registerTableToString(L, -1);
@@ -226,7 +226,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
JID to;
boost::optional<std::string> body;
boost::optional<std::string> subject;
- std::vector<boost::shared_ptr<Payload> > payloads;
+ std::vector<std::shared_ptr<Payload> > payloads;
int index = 2;
Message::Type type = Message::Chat;
if (lua_isstring(L, index)) {
@@ -263,7 +263,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if ((!body || body->empty()) && !subject && payloads.empty()) {
throw Lua::Exception("Missing any of 'body', 'subject' or 'payloads'");
}
- Message::ref message = boost::make_shared<Message>();
+ Message::ref message = std::make_shared<Message>();
message->setTo(to);
if (body && !body->empty()) {
message->setBody(*body);
@@ -292,7 +292,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
"payloads payloads to add to the presence\n"
) {
Sluift::globals.eventLoop.runOnce();
- boost::shared_ptr<Presence> presence = boost::make_shared<Presence>();
+ std::shared_ptr<Presence> presence = std::make_shared<Presence>();
int index = 2;
if (lua_isstring(L, index)) {
@@ -315,7 +315,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if (boost::optional<std::string> value = Lua::getStringField(L, index, "show")) {
presence->setShow(StatusShowConvertor::convertStatusShowTypeFromString(*value));
}
- std::vector< boost::shared_ptr<Payload> > payloads = getPayloadsFromTable(L, index);
+ std::vector< std::shared_ptr<Payload> > payloads = getPayloadsFromTable(L, index);
presence->addPayloads(payloads.begin(), payloads.end());
}
@@ -337,17 +337,17 @@ static int sendQuery(lua_State* L, IQ::Type type) {
timeout = *timeoutInt;
}
- boost::shared_ptr<Payload> payload;
+ std::shared_ptr<Payload> payload;
lua_getfield(L, 2, "query");
payload = getPayload(L, -1);
lua_pop(L, 1);
return client->sendRequest(
- boost::make_shared< GenericRequest<Payload> >(type, to, payload, client->getClient()->getIQRouter()), timeout).convertToLuaResult(L);
+ std::make_shared< GenericRequest<Payload> >(type, to, payload, client->getClient()->getIQRouter()), timeout).convertToLuaResult(L);
}
#define DISPATCH_PUBSUB_PAYLOAD(payloadType, container, response) \
- else if (boost::shared_ptr<payloadType> p = boost::dynamic_pointer_cast<payloadType>(payload)) { \
+ else if (std::shared_ptr<payloadType> p = std::dynamic_pointer_cast<payloadType>(payload)) { \
return client->sendPubSubRequest(type, to, p, timeout).convertToLuaResult(L); \
}
@@ -376,7 +376,7 @@ SLUIFT_LUA_FUNCTION(Client, query_pubsub) {
if (!lua_istable(L, -1)) {
throw Lua::Exception("Missing/incorrect query");
}
- boost::shared_ptr<Payload> payload = getPayload(L, -1);
+ std::shared_ptr<Payload> payload = getPayload(L, -1);
if (false) { }
SWIFTEN_PUBSUB_FOREACH_PUBSUB_PAYLOAD_TYPE(DISPATCH_PUBSUB_PAYLOAD)
@@ -470,13 +470,13 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
SluiftClient* client = getClient(L);
Lua::Table optionsTable = boost::assign::map_list_of
- ("host", boost::make_shared<Lua::Value>(client->getOptions().manualHostname))
- ("port", boost::make_shared<Lua::Value>(client->getOptions().manualPort))
- ("ack", boost::make_shared<Lua::Value>(client->getOptions().useAcks))
- ("compress", boost::make_shared<Lua::Value>(client->getOptions().useStreamCompression))
- ("tls", boost::make_shared<Lua::Value>(client->getOptions().useTLS == ClientOptions::NeverUseTLS ? false : true))
- ("bosh_url", boost::make_shared<Lua::Value>(client->getOptions().boshURL.toString()))
- ("allow_plain_without_tls", boost::make_shared<Lua::Value>(client->getOptions().allowPLAINWithoutTLS));
+ ("host", std::make_shared<Lua::Value>(client->getOptions().manualHostname))
+ ("port", std::make_shared<Lua::Value>(client->getOptions().manualPort))
+ ("ack", std::make_shared<Lua::Value>(client->getOptions().useAcks))
+ ("compress", std::make_shared<Lua::Value>(client->getOptions().useStreamCompression))
+ ("tls", std::make_shared<Lua::Value>(client->getOptions().useTLS == ClientOptions::NeverUseTLS ? false : true))
+ ("bosh_url", std::make_shared<Lua::Value>(client->getOptions().boshURL.toString()))
+ ("allow_plain_without_tls", std::make_shared<Lua::Value>(client->getOptions().allowPLAINWithoutTLS));
pushValue(L, optionsTable);
Lua::registerTableToString(L, -1);
return 1;
@@ -485,24 +485,24 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
static void pushEvent(lua_State* L, const SluiftClient::Event& event) {
switch (event.type) {
case SluiftClient::Event::MessageType: {
- Message::ref message = boost::dynamic_pointer_cast<Message>(event.stanza);
+ Message::ref message = std::dynamic_pointer_cast<Message>(event.stanza);
Lua::Table result = boost::assign::map_list_of
- ("type", boost::make_shared<Lua::Value>(std::string("message")))
- ("from", boost::make_shared<Lua::Value>(message->getFrom().toString()))
- ("body", boost::make_shared<Lua::Value>(message->getBody().get_value_or("")))
- ("message_type", boost::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
+ ("type", std::make_shared<Lua::Value>(std::string("message")))
+ ("from", std::make_shared<Lua::Value>(message->getFrom().toString()))
+ ("body", std::make_shared<Lua::Value>(message->getBody().get_value_or("")))
+ ("message_type", std::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, message->getPayloads());
Lua::registerTableToString(L, -1);
break;
}
case SluiftClient::Event::PresenceType: {
- Presence::ref presence = boost::dynamic_pointer_cast<Presence>(event.stanza);
+ Presence::ref presence = std::dynamic_pointer_cast<Presence>(event.stanza);
Lua::Table result = boost::assign::map_list_of
- ("type", boost::make_shared<Lua::Value>(std::string("presence")))
- ("from", boost::make_shared<Lua::Value>(presence->getFrom().toString()))
- ("status", boost::make_shared<Lua::Value>(presence->getStatus()))
- ("presence_type", boost::make_shared<Lua::Value>(PresenceConvertor::convertPresenceTypeToString(presence->getType())));
+ ("type", std::make_shared<Lua::Value>(std::string("presence")))
+ ("from", std::make_shared<Lua::Value>(presence->getFrom().toString()))
+ ("status", std::make_shared<Lua::Value>(presence->getStatus()))
+ ("presence_type", std::make_shared<Lua::Value>(PresenceConvertor::convertPresenceTypeToString(presence->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, presence->getPayloads());
Lua::registerTableToString(L, -1);
@@ -640,7 +640,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
client->getRoster(timeout);
if (!client->getClient()->getRoster()->containsJID(item.getJID())) {
- RosterPayload::ref roster = boost::make_shared<RosterPayload>();
+ RosterPayload::ref roster = std::make_shared<RosterPayload>();
roster->addItem(item);
Sluift::Response response = client->sendVoidRequest(
@@ -666,7 +666,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
JID jid(Lua::checkString(L, 2));
int timeout = getGlobalTimeout(L);
- RosterPayload::ref roster = boost::make_shared<RosterPayload>();
+ RosterPayload::ref roster = std::make_shared<RosterPayload>();
roster->addItem(RosterItemPayload(JID(Lua::checkString(L, 2)), "", RosterItemPayload::Remove));
return client->sendVoidRequest(
@@ -712,7 +712,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if (!lua_istable(L, 2)) {
throw Lua::Exception("Missing disco info");
}
- if (boost::shared_ptr<DiscoInfo> discoInfo = boost::dynamic_pointer_cast<DiscoInfo>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "disco_info"))) {
+ if (std::shared_ptr<DiscoInfo> discoInfo = std::dynamic_pointer_cast<DiscoInfo>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "disco_info"))) {
client->getClient()->getDiscoManager()->setDiscoInfo(*discoInfo);
}
else {
@@ -756,7 +756,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if (file.empty()) {
getClient(L)->getClient()->setCertificate(CertificateWithKey::ref());
} else {
- getClient(L)->getClient()->setCertificate(boost::make_shared<PKCS12Certificate>(file, createSafeByteArray(pwd)));
+ getClient(L)->getClient()->setCertificate(std::make_shared<PKCS12Certificate>(file, createSafeByteArray(pwd)));
}
return 0;
}
diff --git a/Sluift/component.cpp b/Sluift/component.cpp
index f8184c7..0196a09 100644
--- a/Sluift/component.cpp
+++ b/Sluift/component.cpp
@@ -58,7 +58,7 @@ static inline int getGlobalTimeout(lua_State* L) {
return result;
}
-static void addPayloadsToTable(lua_State* L, const std::vector<boost::shared_ptr<Payload> >& payloads) {
+static void addPayloadsToTable(lua_State* L, const std::vector<std::shared_ptr<Payload> >& payloads) {
if (!payloads.empty()) {
lua_createtable(L, boost::numeric_cast<int>(payloads.size()), 0);
for (size_t i = 0; i < payloads.size(); ++i) {
@@ -70,25 +70,25 @@ static void addPayloadsToTable(lua_State* L, const std::vector<boost::shared_ptr
}
}
-static boost::shared_ptr<Payload> getPayload(lua_State* L, int index) {
+static std::shared_ptr<Payload> getPayload(lua_State* L, int index) {
if (lua_type(L, index) == LUA_TTABLE) {
- return boost::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, index));
+ return std::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, index));
}
else if (lua_type(L, index) == LUA_TSTRING) {
- return boost::make_shared<RawXMLPayload>(Lua::checkString(L, index));
+ return std::make_shared<RawXMLPayload>(Lua::checkString(L, index));
}
else {
- return boost::shared_ptr<Payload>();
+ return std::shared_ptr<Payload>();
}
}
-static std::vector< boost::shared_ptr<Payload> > getPayloadsFromTable(lua_State* L, int index) {
+static std::vector< std::shared_ptr<Payload> > getPayloadsFromTable(lua_State* L, int index) {
index = Lua::absoluteOffset(L, index);
- std::vector< boost::shared_ptr<Payload> > result;
+ std::vector< std::shared_ptr<Payload> > result;
lua_getfield(L, index, "payloads");
if (lua_istable(L, -1)) {
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) {
- boost::shared_ptr<Payload> payload = getPayload(L, -1);
+ std::shared_ptr<Payload> payload = getPayload(L, -1);
if (payload) {
result.push_back(payload);
}
@@ -170,7 +170,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
) {
Sluift::globals.eventLoop.runOnce();
SluiftComponent* component = getComponent(L);
- if (boost::shared_ptr<SoftwareVersion> version = boost::dynamic_pointer_cast<SoftwareVersion>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "software_version"))) {
+ if (std::shared_ptr<SoftwareVersion> version = std::dynamic_pointer_cast<SoftwareVersion>(Sluift::globals.elementConvertor.convertFromLuaUntyped(L, 2, "software_version"))) {
component->setSoftwareVersion(version->getName(), version->getVersion(), version->getOS());
}
return 0;
@@ -194,7 +194,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
boost::optional<std::string> from;
boost::optional<std::string> body;
boost::optional<std::string> subject;
- std::vector<boost::shared_ptr<Payload> > payloads;
+ std::vector<std::shared_ptr<Payload> > payloads;
int index = 2;
Message::Type type = Message::Chat;
if (lua_isstring(L, index)) {
@@ -235,7 +235,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if ((!body || body->empty()) && !subject && payloads.empty()) {
throw Lua::Exception("Missing any of 'body', 'subject' or 'payloads'");
}
- Message::ref message = boost::make_shared<Message>();
+ Message::ref message = std::make_shared<Message>();
message->setTo(to);
if (from && !from->empty()) {
message->setFrom(*from);
@@ -268,7 +268,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
"payloads payloads to add to the presence\n"
) {
Sluift::globals.eventLoop.runOnce();
- boost::shared_ptr<Presence> presence = boost::make_shared<Presence>();
+ std::shared_ptr<Presence> presence = std::make_shared<Presence>();
int index = 2;
if (lua_isstring(L, index)) {
@@ -294,7 +294,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if (boost::optional<std::string> value = Lua::getStringField(L, index, "show")) {
presence->setShow(StatusShowConvertor::convertStatusShowTypeFromString(*value));
}
- std::vector< boost::shared_ptr<Payload> > payloads = getPayloadsFromTable(L, index);
+ std::vector< std::shared_ptr<Payload> > payloads = getPayloadsFromTable(L, index);
presence->addPayloads(payloads.begin(), payloads.end());
}
@@ -321,13 +321,13 @@ static int sendQuery(lua_State* L, IQ::Type type) {
timeout = *timeoutInt;
}
- boost::shared_ptr<Payload> payload;
+ std::shared_ptr<Payload> payload;
lua_getfield(L, 2, "query");
payload = getPayload(L, -1);
lua_pop(L, 1);
return component->sendRequest(
- boost::make_shared< GenericRequest<Payload> >(type, from, to, payload, component->getComponent()->getIQRouter()), timeout).convertToLuaResult(L);
+ std::make_shared< GenericRequest<Payload> >(type, from, to, payload, component->getComponent()->getIQRouter()), timeout).convertToLuaResult(L);
}
SLUIFT_LUA_FUNCTION(Component, get) {
@@ -357,26 +357,26 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
static void pushEvent(lua_State* L, const SluiftComponent::Event& event) {
switch (event.type) {
case SluiftComponent::Event::MessageType: {
- Message::ref message = boost::dynamic_pointer_cast<Message>(event.stanza);
+ Message::ref message = std::dynamic_pointer_cast<Message>(event.stanza);
Lua::Table result = boost::assign::map_list_of
- ("type", boost::make_shared<Lua::Value>(std::string("message")))
- ("from", boost::make_shared<Lua::Value>(message->getFrom().toString()))
- ("to", boost::make_shared<Lua::Value>(message->getTo().toString()))
- ("body", boost::make_shared<Lua::Value>(message->getBody().get_value_or("")))
- ("message_type", boost::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
+ ("type", std::make_shared<Lua::Value>(std::string("message")))
+ ("from", std::make_shared<Lua::Value>(message->getFrom().toString()))
+ ("to", std::make_shared<Lua::Value>(message->getTo().toString()))
+ ("body", std::make_shared<Lua::Value>(message->getBody().get_value_or("")))
+ ("message_type", std::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, message->getPayloads());
Lua::registerTableToString(L, -1);
break;
}
case SluiftComponent::Event::PresenceType: {
- Presence::ref presence = boost::dynamic_pointer_cast<Presence>(event.stanza);
+ Presence::ref presence = std::dynamic_pointer_cast<Presence>(event.stanza);
Lua::Table result = boost::assign::map_list_of
- ("type", boost::make_shared<Lua::Value>(std::string("presence")))
- ("from", boost::make_shared<Lua::Value>(presence->getFrom().toString()))
- ("to", boost::make_shared<Lua::Value>(presence->getTo().toString()))
- ("status", boost::make_shared<Lua::Value>(presence->getStatus()))
- ("presence_type", boost::make_shared<Lua::Value>(PresenceConvertor::convertPresenceTypeToString(presence->getType())));
+ ("type", std::make_shared<Lua::Value>(std::string("presence")))
+ ("from", std::make_shared<Lua::Value>(presence->getFrom().toString()))
+ ("to", std::make_shared<Lua::Value>(presence->getTo().toString()))
+ ("status", std::make_shared<Lua::Value>(presence->getStatus()))
+ ("presence_type", std::make_shared<Lua::Value>(PresenceConvertor::convertPresenceTypeToString(presence->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, presence->getPayloads());
Lua::registerTableToString(L, -1);
diff --git a/Sluift/sluift.cpp b/Sluift/sluift.cpp
index 549ae01..d92f0db 100644
--- a/Sluift/sluift.cpp
+++ b/Sluift/sluift.cpp
@@ -123,7 +123,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
"data the data to hash",
""
) {
- static boost::shared_ptr<CryptoProvider> crypto(PlatformCryptoProvider::create());
+ static std::shared_ptr<CryptoProvider> crypto(PlatformCryptoProvider::create());
if (!lua_isstring(L, 1)) {
throw Lua::Exception("Expected string");
}
@@ -178,7 +178,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
""
) {
static FullPayloadSerializerCollection serializers;
- boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, 1));
+ std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, 1));
if (!payload) {
throw Lua::Exception("Unrecognized XML");
}
@@ -488,7 +488,7 @@ SLUIFT_API int luaopen_sluift(lua_State* L) {
lua_pop(L, 1);
// Register documentation for all elements
- foreach (boost::shared_ptr<LuaElementConvertor> convertor, Sluift::globals.elementConvertor.getConvertors()) {
+ foreach (std::shared_ptr<LuaElementConvertor> convertor, Sluift::globals.elementConvertor.getConvertors()) {
boost::optional<LuaElementConvertor::Documentation> documentation = convertor->getDocumentation();
if (documentation) {
Lua::registerClassHelp(L, documentation->className, documentation->description);