mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
168f1eb6e2
* As of C++11, std::swap is noexcept. #2386 * fix(Any): remove throw on swap * fix(Any): As of C++11, std::swap is noexcept. #2386 * fix(Any): make size const #2386 * fix(SimpleRowFormatter): clang won't compile noexcept #2386 * a couple of arm fixes * fix(Any): As of C++11, std::swap is noexcept. #2386 * fix(AnyTest): local() for POCO_NO_SOO# 2386 * test(RSACipher): RSA encryption without private key #2367 * chore(RSACipherTest): delete ciphers #2367
107 lines
1.8 KiB
C++
107 lines
1.8 KiB
C++
//
|
|
// MetaColumn.cpp
|
|
//
|
|
// Library: Data
|
|
// Package: DataCore
|
|
// Module: MetaColumn
|
|
//
|
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Data/MetaColumn.h"
|
|
|
|
|
|
namespace Poco {
|
|
namespace Data {
|
|
|
|
|
|
MetaColumn::MetaColumn():
|
|
_length(),
|
|
_precision(),
|
|
_position(),
|
|
_type(),
|
|
_nullable()
|
|
{
|
|
}
|
|
|
|
|
|
MetaColumn::MetaColumn(std::size_t position,
|
|
const std::string& name,
|
|
ColumnDataType type,
|
|
std::size_t length,
|
|
std::size_t precision,
|
|
bool nullable):
|
|
_name(name),
|
|
_length(length),
|
|
_precision(precision),
|
|
_position(position),
|
|
_type(type),
|
|
_nullable(nullable)
|
|
{
|
|
}
|
|
|
|
|
|
MetaColumn::MetaColumn(const MetaColumn& other):
|
|
_name(other._name),
|
|
_length(other._length),
|
|
_precision(other._precision),
|
|
_position(other._position),
|
|
_type(other._type),
|
|
_nullable(other._nullable)
|
|
{
|
|
}
|
|
|
|
|
|
MetaColumn::MetaColumn(MetaColumn&& other) noexcept:
|
|
_name(std::move(other._name)),
|
|
_length(other._length),
|
|
_precision(other._precision),
|
|
_position(other._position),
|
|
_type(other._type),
|
|
_nullable(other._nullable)
|
|
{
|
|
}
|
|
|
|
|
|
MetaColumn::~MetaColumn()
|
|
{
|
|
}
|
|
|
|
|
|
MetaColumn& MetaColumn::operator = (const MetaColumn& other)
|
|
{
|
|
MetaColumn tmp(other);
|
|
swap(tmp);
|
|
return *this;
|
|
}
|
|
|
|
|
|
MetaColumn& MetaColumn::operator = (MetaColumn&& other) noexcept
|
|
{
|
|
_name = std::move(other._name);
|
|
_length = other._length;
|
|
_precision = other._precision;
|
|
_position = other._position;
|
|
_type = other._type;
|
|
_nullable = other._nullable;
|
|
return *this;
|
|
}
|
|
|
|
|
|
void MetaColumn::swap(MetaColumn& other) noexcept
|
|
{
|
|
std::swap(_name, other._name);
|
|
std::swap(_length, other._length);
|
|
std::swap(_precision, other._precision);
|
|
std::swap(_position, other._position);
|
|
std::swap(_type, other._type);
|
|
std::swap(_nullable, other._nullable);
|
|
}
|
|
|
|
|
|
} } // namespace Poco::Data
|