| 1 | // |
|---|---|
| 2 | // StatementCreator.cpp |
| 3 | // |
| 4 | // Library: SQL |
| 5 | // Package: SQLCore |
| 6 | // Module: StatementCreator |
| 7 | // |
| 8 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
| 9 | // and Contributors. |
| 10 | // |
| 11 | // SPDX-License-Identifier: BSL-1.0 |
| 12 | // |
| 13 | |
| 14 | |
| 15 | #include "Poco/SQL/StatementCreator.h" |
| 16 | #include <algorithm> |
| 17 | |
| 18 | |
| 19 | namespace Poco { |
| 20 | namespace SQL { |
| 21 | |
| 22 | |
| 23 | StatementCreator::StatementCreator() |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | |
| 28 | StatementCreator::StatementCreator(SessionImpl::Ptr ptrImpl): |
| 29 | _ptrImpl(ptrImpl) |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | |
| 34 | StatementCreator::StatementCreator(const StatementCreator& other): |
| 35 | _ptrImpl(other._ptrImpl) |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | |
| 40 | StatementCreator& StatementCreator::operator = (const StatementCreator& other) |
| 41 | { |
| 42 | if (this != &other) |
| 43 | { |
| 44 | StatementCreator tmp(other); |
| 45 | swap(tmp); |
| 46 | } |
| 47 | return *this; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | StatementCreator& StatementCreator::operator = (Poco::AutoPtr<SessionImpl> ptrImpl) |
| 52 | { |
| 53 | _ptrImpl = ptrImpl; |
| 54 | return *this; |
| 55 | } |
| 56 | |
| 57 | |
| 58 | void StatementCreator::swap(StatementCreator& other) |
| 59 | { |
| 60 | using std::swap; |
| 61 | swap(_ptrImpl, other._ptrImpl); |
| 62 | } |
| 63 | |
| 64 | |
| 65 | StatementCreator::~StatementCreator() |
| 66 | { |
| 67 | } |
| 68 | |
| 69 | |
| 70 | } } // namespace Poco::SQL |
| 71 |