Show
Ignore:
Timestamp:
06/09/10 14:00:40 (14 years ago)
Author:
mido
Message:

astyle applied all over the library

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/bdmroot.cpp

    r942 r1064  
    33//! Space of basic BDM structures 
    44namespace bdm { 
    5          
    6         void UI_DBG (const  Setting &S, const string &spc, ostream &out =cout){ 
    7                 const char *Name=S.getName(); 
    8                 if ( Name!=NULL ) {out << spc << std::string ( Name );}; 
    9                 Setting::Type T=S.getType(); 
    10                 switch ( T ) { 
    11                         case Setting::TypeArray: 
    12                                 out << endl; 
    13                                 for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" ", out);}; 
    14                                 break; 
    15                         case Setting::TypeList: 
    16                                 out << endl; 
    17                                 for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" ", out );}; 
    18                                 break; 
    19                         case Setting::TypeGroup: 
    20                                 out << endl; 
    21                                 for ( int i=0;i<S.getLength();i++ ) {UI_DBG ( S[i], spc+" ", out );} 
    22                                 break; 
    23                         case Setting::TypeInt: 
    24                                 out << " = "; 
    25                                 out << int ( S ) <<endl; 
    26                                 break; 
    27                         case Setting::TypeFloat: 
    28                                 out << " = "; 
    29                                 out << double ( S ) <<endl; 
    30                                 break; 
    31                         case Setting::TypeString: 
    32                                 out << " = "; 
    33                                 out << ( const char* ) ( S ) <<endl; 
    34                                 break; 
    35                         case Setting::TypeBoolean: 
    36                                 out << " = "; 
    37                                 out << bool ( S ) <<endl; 
    38                                 break; 
    39                         default: {out << "?";}; 
    40                 }; 
    41         } 
    42          
     5 
     6void UI_DBG (const  Setting &S, const string &spc, ostream &out =cout) { 
     7    const char *Name=S.getName(); 
     8    if ( Name!=NULL ) { 
     9        out << spc << std::string ( Name ); 
     10    }; 
     11    Setting::Type T=S.getType(); 
     12    switch ( T ) { 
     13    case Setting::TypeArray: 
     14        out << endl; 
     15        for ( int i=0; i<S.getLength(); i++ ) { 
     16            UI_DBG ( S[i], spc+" ", out); 
     17        }; 
     18        break; 
     19    case Setting::TypeList: 
     20        out << endl; 
     21        for ( int i=0; i<S.getLength(); i++ ) { 
     22            UI_DBG ( S[i], spc+" ", out ); 
     23        }; 
     24        break; 
     25    case Setting::TypeGroup: 
     26        out << endl; 
     27        for ( int i=0; i<S.getLength(); i++ ) { 
     28            UI_DBG ( S[i], spc+" ", out ); 
     29        } 
     30        break; 
     31    case Setting::TypeInt: 
     32        out << " = "; 
     33        out << int ( S ) <<endl; 
     34        break; 
     35    case Setting::TypeFloat: 
     36        out << " = "; 
     37        out << double ( S ) <<endl; 
     38        break; 
     39    case Setting::TypeString: 
     40        out << " = "; 
     41        out << ( const char* ) ( S ) <<endl; 
     42        break; 
     43    case Setting::TypeBoolean: 
     44        out << " = "; 
     45        out << bool ( S ) <<endl; 
     46        break; 
     47    default: { 
     48        out << "?"; 
     49    }; 
     50    }; 
    4351} 
     52 
     53}