diff options
author | Tobias Markmann <tm@ayena.de> | 2016-04-01 17:23:49 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-04-04 08:28:23 (GMT) |
commit | 741c45b74d5f634622eb5f757c49323274fb8937 (patch) | |
tree | b9cfa6c2fe2e79e03cc8cb7c1ca1e9cf45aa5328 /Sluift/ElementConvertors | |
parent | eddd92ed76ae68cb1e202602fd3ebd11b69191a2 (diff) | |
download | swift-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/ElementConvertors')
128 files changed, 525 insertions, 500 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; }; } |