39 template<
typename T,
typename U >
50 template<
typename T >
54 for(
size_t i = 0;
i <
vec.size(); ++
i ) {
56 if(
i <
vec.size() - 1 ) {
69 out <<
"SG::AuxElement\n";
71 if(
obj.usingStandaloneStore() ) {
72 out <<
"using standalone store\n";
73 }
else if(
obj.usingPrivateStore() ) {
74 out <<
"using private store\n";
75 }
else if(
obj.container() ) {
76 out <<
"in container\n";
79 out <<
"standalone object, without auxiliary store";
84 if( !
obj.container()->getConstStore() ) {
95 (
obj.container()->getConstStore() ?
96 obj.container()->getConstStore()->getAuxIDs() :
97 obj.getConstStore()->getAuxIDs() );
100 std::vector<SG::auxid_t> auxids_v (auxids.
begin(), auxids.
end());
101 std::sort (auxids_v.begin(), auxids_v.end());
105 out <<
"\n - type: " <<
reg.getTypeName( auxid )
106 <<
", \tname: \"" <<
reg.getName( auxid );
107 out <<
"\", \tvalue: ";
110 #define PRINTER( TYPE ) \
112 if( obj.isAvailable< TYPE >( reg.getName( auxid ) ) ) { \
113 out << obj.auxdata< TYPE >( reg.getName( auxid ) ); \
118 const std::type_info* ti =
reg.getType( auxid );
120 if( *ti ==
typeid(
unsigned int ) ) {
122 if (
acc.isAvailable(
obj )) {
127 out <<
"(Unsupported atomic type)\n";
129 }
else if( *ti ==
typeid( int8_t ) ) {
130 if(
obj.isAvailable< int8_t >(
reg.getName( auxid ) ) ) {
131 out << static_cast< int >(
obj.auxdata< int8_t >(
reg.getName( auxid ) ) );
133 }
else if( *ti ==
typeid(
uint8_t ) ) {
135 out << static_cast< int >(
obj.auxdata<
uint8_t >(
reg.getName( auxid ) ) );
137 }
else if( *ti ==
typeid(
int16_t ) ) {
139 }
else if( *ti ==
typeid(
uint16_t ) ) {
141 }
else if( *ti ==
typeid( int32_t ) ) {
143 }
else if( *ti ==
typeid(
uint32_t ) ) {
145 }
else if( *ti ==
typeid( int64_t ) ) {
147 }
else if( *ti ==
typeid(
uint64_t ) ) {
149 }
else if( *ti ==
typeid(
long ) ) {
151 }
else if( *ti ==
typeid(
unsigned long ) ) {
153 }
else if( *ti ==
typeid(
unsigned long long ) ) {
155 }
else if( *ti ==
typeid(
float ) ) {
157 }
else if( *ti ==
typeid(
double ) ) {
159 }
else if( *ti ==
typeid( std::vector< float > ) ) {
160 PRINTER( std::vector< float > );
161 }
else if( *ti ==
typeid( std::vector< double > ) ) {
162 PRINTER( std::vector< double > );
163 }
else if( *ti ==
typeid( std::vector< char > ) ) {
164 PRINTER( std::vector< char > );
165 }
else if( *ti ==
typeid( std::vector< int8_t > ) ) {
166 PRINTER( std::vector< int8_t > );
167 }
else if( *ti ==
typeid( std::vector< uint8_t > ) ) {
168 PRINTER( std::vector< uint8_t > );
169 }
else if( *ti ==
typeid( std::vector< int16_t > ) ) {
170 PRINTER( std::vector< int16_t > );
171 }
else if( *ti ==
typeid( std::vector< uint16_t > ) ) {
172 PRINTER( std::vector< uint16_t > );
173 }
else if( *ti ==
typeid( std::vector< int32_t > ) ) {
174 PRINTER( std::vector< int32_t > );
175 }
else if( *ti ==
typeid( std::vector< uint32_t > ) ) {
176 PRINTER( std::vector< uint32_t > );
177 }
else if( *ti ==
typeid( std::vector< int64_t > ) ) {
178 PRINTER( std::vector< int64_t > );
179 }
else if( *ti ==
typeid( std::vector< uint64_t > ) ) {
180 PRINTER( std::vector< uint64_t > );
181 }
else if( *ti ==
typeid( std::vector< std::string > ) ) {
182 PRINTER( std::vector< std::string > );
183 }
else if( *ti ==
typeid( std::vector< std::pair<std::string, std::string> > ) ) {
184 using Stringpair_t = std::pair<std::string, std::string>;
185 PRINTER( std::vector< Stringpair_t > );
203 std::cout <<
obj << std::endl;