| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- //
- // 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)
- {
- 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
|