本文整理汇总了C++中MethodTable::setParentTable方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodTable::setParentTable方法的具体用法?C++ MethodTable::setParentTable怎么用?C++ MethodTable::setParentTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodTable
的用法示例。
在下文中一共展示了MethodTable::setParentTable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MethodTable
/* Get method specifications */
const MethodTable& RateMatrix::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false ) {
// add method for call "x[]" as a function
ArgumentRules* squareBracketArgRules = new ArgumentRules();
squareBracketArgRules->push_back( new ArgumentRule( "index" , true, Natural::getClassTypeSpec() ) );
methods.addFunction("[]", new MemberProcedure( ModelVector<RealPos>::getClassTypeSpec(), squareBracketArgRules) );
// add method for call "x[]" as a function
ArgumentRules* sizeArgRules = new ArgumentRules();
methods.addFunction("size", new MemberProcedure( Natural::getClassTypeSpec(), sizeArgRules) );
// necessary call for proper inheritance
methods.setParentTable( &ModelObject<RevBayesCore::RateMatrix>::getMethods() );
methodsSet = true;
}
return methods;
}
示例2: MethodTable
/* Get method specifications */
const RevLanguage::MethodTable& RealNodeValTree::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false )
{
ArgumentRules* meanArgRules = new ArgumentRules();
methods.addFunction("mean", new MemberFunction<RealNodeValTree,Real>( this, meanArgRules ) );
ArgumentRules* tipmeanArgRules = new ArgumentRules();
methods.addFunction("tipMean", new MemberFunction<RealNodeValTree,Real>( this, tipmeanArgRules ) );
ArgumentRules* stdevArgRules = new ArgumentRules();
methods.addFunction("stdev", new MemberFunction<RealNodeValTree,RealPos>( this, stdevArgRules ) );
ArgumentRules* rootArgRules = new ArgumentRules();
methods.addFunction("rootVal", new MemberProcedure(Real::getClassTypeSpec(), rootArgRules ) );
ArgumentRules* clampArgRules = new ArgumentRules();
clampArgRules->push_back(new ArgumentRule("data", false, AbstractCharacterData::getClassTypeSpec()));
clampArgRules->push_back(new ArgumentRule("dataIndex", false, Natural::getClassTypeSpec()));
methods.addFunction("clampAt", new MemberProcedure(RealNodeValTree::getClassTypeSpec(), clampArgRules ) );
// necessary call for proper inheritance
methods.setParentTable( &ModelObject<RevBayesCore::RealNodeContainer>::getMethods() );
methodsSet = true;
}
return methods;
}
示例3: MethodTable
/* Get method specifications */
const MethodTable& ParallelMcmcmc::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false ) {
ArgumentRules* runArgRules = new ArgumentRules();
runArgRules->push_back( new ArgumentRule("generations", true, Natural::getClassTypeSpec()) );
methods.addFunction("run", new MemberProcedure( RlUtils::Void, runArgRules) );
ArgumentRules* burninArgRules = new ArgumentRules();
burninArgRules->push_back( new ArgumentRule("generations", true, Natural::getClassTypeSpec()) );
burninArgRules->push_back( new ArgumentRule("tuningInterval", true, Natural::getClassTypeSpec()) );
methods.addFunction("burnin", new MemberProcedure( RlUtils::Void, burninArgRules) );
ArgumentRules* operatorSummaryArgRules = new ArgumentRules();
methods.addFunction("operatorSummary", new MemberProcedure( RlUtils::Void, operatorSummaryArgRules) );
// necessary call for proper inheritance
methods.setParentTable( &RevObject::getMethods() );
methodsSet = true;
}
return methods;
}
示例4: MethodTable
/* Get method specifications */
const MethodTable& SteppingStoneSampler::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false )
{
ArgumentRules* marginalArgRules = new ArgumentRules();
methods.addFunction("marginal", new MemberProcedure( Real::getClassTypeSpec(), marginalArgRules) );
// necessary call for proper inheritance
methods.setParentTable( &RevObject::getMethods() );
methodsSet = true;
}
return methods;
}
示例5: MethodTable
/* Get method specifications */
const RevLanguage::MethodTable& Taxon::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false ) {
// ArgumentRules* nnodesArgRules = new ArgumentRules();
// methods.addFunction("nnodes", new MemberProcedure(Natural::getClassTypeSpec(), nnodesArgRules ) );
//
// ArgumentRules* namesArgRules = new ArgumentRules();
// methods.addFunction("names", new MemberProcedure(ModelVector<RlString>::getClassTypeSpec(), namesArgRules ) );
// necessary call for proper inheritance
methods.setParentTable( &RevObject::getMethods() );
methodsSet = true;
}
return methods;
}
示例6: MethodTable
/* Get method specifications */
const MethodTable& RateMap::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false ) {
// add method for call "x.nChars()" as a function
ArgumentRules* nCharsArgRules = new ArgumentRules();
methods.addFunction("nChars", new MemberProcedure( Natural::getClassTypeSpec(), nCharsArgRules) );
// add method for call "x.nStates()" as a function
ArgumentRules* nStatesArgRules = new ArgumentRules();
methods.addFunction("nStates", new MemberProcedure( Natural::getClassTypeSpec(), nStatesArgRules) );
// necessary call for proper inheritance
methods.setParentTable( &ModelObject<RevBayesCore::RateMap>::getMethods() );
methodsSet = true;
}
return methods;
}