369 | | } |
| 369 | void UI_DBG ( Setting &S, const string &spc ){ |
| 370 | const char *Name=S.getName(); |
| 371 | if ( Name!=NULL ) {cout << spc << std::string ( Name );}; |
| 372 | Setting::Type T=S.getType(); |
| 373 | switch ( T ) { |
| 374 | case Setting::TypeArray: |
| 375 | cout << endl; |
| 376 | for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" " );}; |
| 377 | break; |
| 378 | case Setting::TypeList: |
| 379 | cout << endl; |
| 380 | for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" " );}; |
| 381 | break; |
| 382 | case Setting::TypeGroup: |
| 383 | cout << endl; |
| 384 | for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" " );} |
| 385 | break; |
| 386 | case Setting::TypeInt: |
| 387 | cout << " = "; |
| 388 | cout << int ( S ) <<endl; |
| 389 | break; |
| 390 | case Setting::TypeFloat: |
| 391 | cout << " = "; |
| 392 | cout << double ( S ) <<endl; |
| 393 | break; |
| 394 | case Setting::TypeString: |
| 395 | cout << " = "; |
| 396 | cout << ( const char* ) ( S ) <<endl; |
| 397 | break; |
| 398 | case Setting::TypeBoolean: |
| 399 | cout << " = "; |
| 400 | cout << bool ( S ) <<endl; |
| 401 | break; |
| 402 | default: {cout << "?";}; |
| 403 | }; |
| 404 | } |
| 405 | |
| 406 | }//namespace |