/** * @file TupleValues-inl.h * @author Richard Roberts * @author Manohar Paluri * @author Alex Cunningham */ #pragma once #include #include // TupleValues instantiations for N = 1-6 #define INSTANTIATE_TUPLE_CONFIG1(Config1) \ template class TupleValues1; #define INSTANTIATE_TUPLE_CONFIG2(Config1, Config2) \ template class TupleValues2; #define INSTANTIATE_TUPLE_CONFIG3(Config1, Config2, Config3) \ template class TupleValues3; #define INSTANTIATE_TUPLE_CONFIG4(Config1, Config2, Config3, Config4) \ template class TupleValues4; #define INSTANTIATE_TUPLE_CONFIG5(Config1, Config2, Config3, Config4, Config5) \ template class TupleValues5; #define INSTANTIATE_TUPLE_CONFIG6(Config1, Config2, Config3, Config4, Config5, Config6) \ template class TupleValues6; namespace gtsam { /* ************************************************************************* */ /** TupleValuesN Implementations */ /* ************************************************************************* */ /* ************************************************************************* */ /** TupleValues 1 */ template TupleValues1::TupleValues1(const TupleValues1& config) : TupleValuesEnd (config) {} template TupleValues1::TupleValues1(const Config1& cfg1) : TupleValuesEnd (cfg1) {} template TupleValues1::TupleValues1(const TupleValuesEnd& config) : TupleValuesEnd(config) {} /* ************************************************************************* */ /** TupleValues 2 */ template TupleValues2::TupleValues2(const TupleValues2& config) : TupleValues >(config) {} template TupleValues2::TupleValues2(const Config1& cfg1, const Config2& cfg2) : TupleValues >( cfg1, TupleValuesEnd(cfg2)) {} template TupleValues2::TupleValues2(const TupleValues >& config) : TupleValues >(config) {} /* ************************************************************************* */ /** TupleValues 3 */ template TupleValues3::TupleValues3( const TupleValues3& config) : TupleValues > >(config) {} template TupleValues3::TupleValues3( const Config1& cfg1, const Config2& cfg2, const Config3& cfg3) : TupleValues > >( cfg1, TupleValues >( cfg2, TupleValuesEnd(cfg3))) {} template TupleValues3::TupleValues3( const TupleValues > >& config) : TupleValues > >(config) {} /* ************************************************************************* */ /** TupleValues 4 */ template TupleValues4::TupleValues4( const TupleValues4& config) : TupleValues > > >(config) {} template TupleValues4::TupleValues4( const Config1& cfg1, const Config2& cfg2, const Config3& cfg3,const Config4& cfg4) : TupleValues > > >( cfg1, TupleValues > >( cfg2, TupleValues >( cfg3, TupleValuesEnd(cfg4)))) {} template TupleValues4::TupleValues4( const TupleValues > > >& config) : TupleValues > > >(config) {} /* ************************************************************************* */ /** TupleValues 5 */ template TupleValues5::TupleValues5( const TupleValues5& config) : TupleValues > > > >(config) {} template TupleValues5::TupleValues5( const Config1& cfg1, const Config2& cfg2, const Config3& cfg3, const Config4& cfg4, const Config5& cfg5) : TupleValues > > > >( cfg1, TupleValues > > >( cfg2, TupleValues > >( cfg3, TupleValues >( cfg4, TupleValuesEnd(cfg5))))) {} template TupleValues5::TupleValues5( const TupleValues > > > >& config) : TupleValues > > > >(config) {} /* ************************************************************************* */ /** TupleValues 6 */ template TupleValues6::TupleValues6( const TupleValues6& config) : TupleValues > > > > >(config) {} template TupleValues6::TupleValues6( const Config1& cfg1, const Config2& cfg2, const Config3& cfg3, const Config4& cfg4, const Config5& cfg5, const Config6& cfg6) : TupleValues > > > > >( cfg1, TupleValues > > > >( cfg2, TupleValues > > >( cfg3, TupleValues > >( cfg4, TupleValues >( cfg5, TupleValuesEnd(cfg6)))))) {} template TupleValues6::TupleValues6( const TupleValues > > > > >& config) : TupleValues > > > > >(config) {} }