MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / complete

Method complete

inst/include/Rcpp/module/Module.h:119–141  ·  view source on GitHub ↗

* completion information */

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
nargsMethod · 0.45

Tested by

no test coverage detected