/** Make member methods for this class */ RevLanguage::MethodTable TimeTree::makeMethods( void ) const { MethodTable methods = MethodTable(); ArgumentRules* nnodesArgRules = new ArgumentRules(); methods.addFunction("nnodes", new MemberProcedure(Natural::getClassTypeSpec(), nnodesArgRules ) ); ArgumentRules* ntipsArgRules = new ArgumentRules(); methods.addFunction("ntips", new MemberProcedure(Natural::getClassTypeSpec(), ntipsArgRules ) ); ArgumentRules* heightArgRules = new ArgumentRules(); methods.addFunction("rootAge", new MemberProcedure(RealPos::getClassTypeSpec(), heightArgRules ) ); ArgumentRules* namesArgRules = new ArgumentRules(); methods.addFunction("names", new MemberProcedure(ModelVector<RlString>::getClassTypeSpec(), namesArgRules ) ); ArgumentRules* rescaleArgRules = new ArgumentRules(); rescaleArgRules->push_back( new ArgumentRule( "factor", RealPos::getClassTypeSpec(), ArgumentRule::BY_VALUE ) ); methods.addFunction("rescale", new MemberProcedure(RlUtils::Void, rescaleArgRules ) ); // Insert inherited methods methods.insertInheritedMethods( ModelObject<RevBayesCore::TimeTree>::makeMethods() ); return methods; }
MethodTable RlAtlas::makeMethods( void ) const { MethodTable methods; ArgumentRules* nAreasArgRules = new ArgumentRules(); ArgumentRules* nEpochsArgRules = new ArgumentRules(); ArgumentRules* namesArgRules = new ArgumentRules(); methods.addFunction("names", new MemberProcedure(ModelVector<RlString>::getClassTypeSpec(), namesArgRules ) ); methods.addFunction("nAreas", new MemberProcedure(Natural::getClassTypeSpec(), nAreasArgRules ) ); methods.addFunction("nEpochs", new MemberProcedure(Natural::getClassTypeSpec(), nEpochsArgRules ) ); // Add method for call "size" as a function ArgumentRules* sizeArgRules = new ArgumentRules(); methods.addFunction("size", new MemberProcedure( Natural::getClassTypeSpec(), sizeArgRules) ); // Insert inherited methods methods.insertInheritedMethods( ModelObject<RevBayesCore::TimeAtlas>::makeMethods() ); return methods; }