lsst.afw
g3a5ebb7d8a+28b83bf6a5
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
afw
table
detail
SchemaMapperImpl.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
#ifndef AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
3
#define AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
4
5
#include <map>
6
#include <algorithm>
7
8
#include "
lsst/afw/table/Key.h
"
9
#include "
lsst/afw/table/types.h
"
10
#include "
lsst/afw/table/Schema.h
"
11
12
namespace
lsst
{
13
namespace
afw
{
14
namespace
table
{
15
16
class
SchemaMapper
;
17
18
namespace
detail
{
19
26
class
SchemaMapperImpl
final {
27
private
:
30
template
<
typename
...E>
31
static
std::variant<std::pair<Key<E>,
Key<E>
>...> makeKeyPairVariantType(
TypeList<E...>
);
32
33
public
:
35
using
KeyPairVariant
=
decltype
(makeKeyPairVariantType(
FieldTypes
{}));
37
using
KeyPairMap
=
std::vector<KeyPairVariant>
;
38
40
explicit
SchemaMapperImpl
(
Schema
const
& input,
Schema
const
& output) : _input(input), _output(output) {}
41
42
private
:
43
friend
class
table::SchemaMapper
;
44
friend
class
detail::Access
;
45
46
Schema
_input;
47
Schema
_output;
48
KeyPairMap
_map;
49
};
50
}
// namespace detail
51
}
// namespace table
52
}
// namespace afw
53
}
// namespace lsst
54
55
#endif
// !AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
Schema.h
lsst::afw::table::Key
A class used as a handle to a particular field in a table.
Definition
Key.h:53
lsst::afw::table::Schema
Defines the fields and offsets for a table.
Definition
Schema.h:51
lsst::afw::table::SchemaMapper
A mapping between the keys of two Schemas, used to copy data between them.
Definition
SchemaMapper.h:21
lsst::afw::table::detail::Access
Definition
Access.h:31
lsst::afw::table::detail::SchemaMapperImpl::KeyPairMap
std::vector< KeyPairVariant > KeyPairMap
A std::vector whose elements can be any of the allowed pair types.
Definition
SchemaMapperImpl.h:37
lsst::afw::table::detail::SchemaMapperImpl::KeyPairVariant
decltype(makeKeyPairVariantType(FieldTypes{})) KeyPairVariant
A Variant type that can hold any one of the allowed pairx types.
Definition
SchemaMapperImpl.h:35
lsst::afw::table::detail::SchemaMapperImpl::SchemaMapperImpl
SchemaMapperImpl(Schema const &input, Schema const &output)
Constructor from the given input and output schemas.
Definition
SchemaMapperImpl.h:40
lsst::afw::table::detail
Definition
BaseColumnView.h:13
lsst::afw::table
Definition
table.dox:3
lsst::afw::table::FieldTypes
TypeList< RecordId, std::uint16_t, std::int32_t, float, double, lsst::geom::Angle, std::uint8_t, Flag, std::string, Array< std::uint16_t >, Array< int >, Array< float >, Array< double >, Array< std::uint8_t > > FieldTypes
A compile-time list of all field types.
Definition
types.h:53
lsst::afw
Definition
imageAlgorithm.dox:1
lsst
lsst::afw::table::TypeList
Definition
types.h:49
Key.h
types.h
std::vector
Generated on
for lsst.afw by
1.17.0