46 std::ostringstream out;
49 std::println( out,
"SG::AuxElement" );
50 std::print( out,
" " );
51 if( obj.usingStandaloneStore() ) {
52 std::println( out,
"using standalone store" );
53 }
else if( obj.usingPrivateStore() ) {
54 std::println( out,
"using private store" );
55 }
else if( obj.container() ) {
56 std::println( out,
"in container" );
59 std::print( out,
"standalone object, without auxiliary store" );
64 if( ! obj.container()->getConstStore() ) {
68 std::print( out,
" Variables:" );
75 ( obj.container()->getConstStore() ?
76 obj.container()->getConstStore()->getAuxIDs() :
77 obj.getConstStore()->getAuxIDs() );
80 std::vector<SG::auxid_t> auxids_v (auxids.begin(), auxids.end());
81 std::sort (auxids_v.begin(), auxids_v.end());
85 std::print( out,
"\n - type: {}, \tname: \"{}\", \tvalue: ",
86 reg.getTypeName( auxid ), reg.getName( auxid ) );
89#define PRINTER( TYPE ) \
91 SG::ConstAccessor< TYPE > acc( auxid ); \
92 if( acc.isAvailable( obj ) ) { \
93 std::print( out, "{}", acc( obj ) ); \
98 const std::type_info* ti = reg.getType( auxid );
100 if( *ti ==
typeid(
unsigned int ) ) {
102 if (
acc.isAvailable( obj )) {
103 std::print( out,
"{}",
acc (obj) );
107 std::println( out,
"(Unsupported atomic type)\n" );
109 }
else if( *ti ==
typeid( int8_t ) ) {
111 if(
acc.isAvailable( obj ) ) {
112 std::print( out,
"{}",
static_cast< int >(
acc( obj ) ) );
114 }
else if( *ti ==
typeid(
uint8_t ) ) {
116 if(
acc.isAvailable( obj ) ) {
117 std::print( out,
"{}",
static_cast< int >(
acc( obj ) ) );
119 }
else if( *ti ==
typeid(
int16_t ) ) {
121 }
else if( *ti ==
typeid(
uint16_t ) ) {
123 }
else if( *ti ==
typeid( int32_t ) ) {
125 }
else if( *ti ==
typeid(
uint32_t ) ) {
127 }
else if( *ti ==
typeid( int64_t ) ) {
129 }
else if( *ti ==
typeid(
uint64_t ) ) {
131 }
else if( *ti ==
typeid(
long ) ) {
133 }
else if( *ti ==
typeid(
unsigned long ) ) {
135 }
else if( *ti ==
typeid(
unsigned long long ) ) {
137 }
else if( *ti ==
typeid(
float ) ) {
139 }
else if( *ti ==
typeid(
double ) ) {
141 }
else if( *ti ==
typeid( std::vector< float > ) ) {
142 PRINTER( std::vector< float > );
143 }
else if( *ti ==
typeid( std::vector< double > ) ) {
144 PRINTER( std::vector< double > );
145 }
else if( *ti ==
typeid( std::vector< char > ) ) {
146 PRINTER( std::vector< char > );
147 }
else if( *ti ==
typeid( std::vector< int8_t > ) ) {
148 PRINTER( std::vector< int8_t > );
149 }
else if( *ti ==
typeid( std::vector< uint8_t > ) ) {
150 PRINTER( std::vector< uint8_t > );
151 }
else if( *ti ==
typeid( std::vector< int16_t > ) ) {
152 PRINTER( std::vector< int16_t > );
153 }
else if( *ti ==
typeid( std::vector< uint16_t > ) ) {
154 PRINTER( std::vector< uint16_t > );
155 }
else if( *ti ==
typeid( std::vector< int32_t > ) ) {
156 PRINTER( std::vector< int32_t > );
157 }
else if( *ti ==
typeid( std::vector< uint32_t > ) ) {
158 PRINTER( std::vector< uint32_t > );
159 }
else if( *ti ==
typeid( std::vector< int64_t > ) ) {
160 PRINTER( std::vector< int64_t > );
161 }
else if( *ti ==
typeid( std::vector< uint64_t > ) ) {
162 PRINTER( std::vector< uint64_t > );
163 }
else if( *ti ==
typeid( std::vector< std::string > ) ) {
164 PRINTER( std::vector< std::string > );
165 }
else if( *ti ==
typeid( std::vector< std::pair<std::string, std::string> > ) ) {
166 using Stringpair_t = std::pair<std::string, std::string>;
167 PRINTER( std::vector< Stringpair_t > );
169 std::print( out,
"N/A" );