* completion information */
| 117 | * completion information |
| 118 | */ |
| 119 | CharacterVector complete(){ // #nocov start |
| 120 | size_t nf = functions.size() ; |
| 121 | size_t nc = classes.size() ; |
| 122 | size_t n = nf + nc ; |
| 123 | CharacterVector res( n ) ; |
| 124 | size_t i=0; |
| 125 | MAP::iterator it = functions.begin(); |
| 126 | std::string buffer ; |
| 127 | for( ; i<nf; i++, ++it) { |
| 128 | buffer = it->first ; |
| 129 | if( (it->second)->nargs() == 0 ) { |
| 130 | buffer += "() " ; |
| 131 | } else { |
| 132 | buffer += "( " ; |
| 133 | } |
| 134 | res[i] = buffer ; |
| 135 | } |
| 136 | CLASS_MAP::iterator cit = classes.begin() ; |
| 137 | for( size_t j=0; j<nc; j++, i++, ++cit){ |
| 138 | res[i] = cit->first ; |
| 139 | } |
| 140 | return res ; |
| 141 | } // #nocov end |
| 142 | |
| 143 | /** |
| 144 | * Returns a list that contains: |