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

Method add_enum

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

Source from the content-addressed store, hash-verified

217 std::string name ;
218
219 void add_enum( const std::string& parent_class_typeinfo_name, const std::string& enum_name, const std::map<std::string, int>& value ){
220 // find the parent class
221 CLASS_ITERATOR it ;
222 class_Base* target_class = NULL;
223 for( it = classes.begin(); it != classes.end(); it++){
224 if( it->second->has_typeinfo_name(parent_class_typeinfo_name) ){
225 target_class = it->second ;
226 }
227 }
228
229 // TODO: add the enum to the class
230 target_class->add_enum( enum_name, value ) ;
231 }
232
233 private:
234 MAP functions ;

Callers 1

~enum_Method · 0.45

Calls 3

has_typeinfo_nameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected