当前位置: 首页>>代码示例>>C++>>正文


C++ Transition::getId方法代码示例

本文整理汇总了C++中Transition::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ Transition::getId方法的具体用法?C++ Transition::getId怎么用?C++ Transition::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transition的用法示例。


在下文中一共展示了Transition::getId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getTransitionLocally

	Transition* TransitionBase::getTransitionLocally(string transitionId) {
		vector<Transition*>::iterator i;
		Transition* transition;

		i = transitionSet->begin();
		while (i != transitionSet->end()) {
			transition = *i;
			if (transition->getId() == transitionId) {
				return transition;
			}
			++i;
		}
		return NULL;
	}
开发者ID:Gingar,项目名称:port,代码行数:14,代码来源:TransitionBase.cpp

示例2: logFailure

void
ResultBecomesNegative::logNegativeResult (const Transition& tr,
                          const SBase& object)
{
  msg =
    "The Transition with id '";
  msg += tr.getId();
  msg += "' includes a resultLevel";
  msg += " that may cause the QualitativeSpecies '";
  msg += object.getId();
  msg += "' to become negative.";
  
  logFailure(object);

}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:15,代码来源:ResultBecomesNegative.cpp

示例3: logFailure

void
ResultExceedsMaximum::logExceedsMaximum (const Transition& tr,
                          const SBase& object)
{
  msg =
    "The <transition> with id '";
  msg += tr.getId();
  msg += "' includes a resultLevel";
  msg += " that may cause the <qualitativeSpecies> '";
  msg += object.getId();
  msg += "' to exceed its maximumLevel.";
  
  logFailure(object);

}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:15,代码来源:ResultExceedsMaximum.cpp

示例4: logFailure

void
QSAssignedOnce::logMultipleAssignment (const Transition& tr,
                          const SBase& object,
                          std::string name)
{
  msg =
    "The Transition with id '";
  msg += tr.getId();
  msg += "' includes an Output";
  msg += " that uses an assignment to the QualitativeSpecies '";
  msg += name;
  msg += "' that has already been assigned.";
  
  logFailure(object);

}
开发者ID:0u812,项目名称:libsbml.js.frozen,代码行数:16,代码来源:QSAssignedOnce.cpp

示例5: generateCode

    string DescriptorGenerator::generateCode() {
        string ret = "<descriptor id=\"" + this->getId() + "\" ";
        LayoutRegion* region = this->getRegion();

        if (region != NULL) {
             ret += "region=\"" + region->getId() + "\" ";
        }
        string player = this->getPlayerName();
        if (player != "") {
            ret += "player=\"" + player + "\" ";
        }
        double explicitDuration = this->getExplicitDuration();
        if (!isNaN(explicitDuration)) {
            ret +="explicitDur=\"" + itos(explicitDuration/1000.0) + "s\" ";
        }

		if (this->isFreeze()) {
			ret+= "freeze=\"true\" ";
		}

		long repetitions = this->getRepetitions();
		if (repetitions > 0) {
			ret +="explicitDur=\"" + itos(repetitions) + "\" ";
		}

        KeyNavigation* keys = this->getKeyNavigation() ;
        if (keys != NULL) {
            ret += generateKeyNavigation(keys);
		}

        FocusDecoration* focus = this->getFocusDecoration(); {
        if (focus != NULL)
            ret += generateFocusDecoration(focus);
		}

		vector<Transition*>* inputTransitions = this->getInputTransitions();
		vector<Transition*>::iterator transIt;
		transIt = inputTransitions->begin();
		if (transIt != (inputTransitions->end())) {
			ret +="transIn=\"";
			while (true) {
				Transition* transition = *transIt;
				ret += transition->getId();
				transIt++;
				if (transIt != inputTransitions->end()) {
					ret +=",";
				} else {
					ret +="\" ";
					break;
				}
			}
		}

		vector<Transition*>* outputTransitions = this->getOutputTransitions();
		transIt = outputTransitions->begin();
		if (transIt != (outputTransitions->end())) {
			ret +="transOut=\"";
			while (true) {
				Transition* transition = *transIt;
				ret += transition->getId();
				transIt++;
				if (transIt != outputTransitions->end()) {
					ret +=",";
				} else {
					ret +="\" ";
					break;
				}
			}
		}

        vector<Parameter*>* parameters = this->getParameters();
        if (parameters->size() == 0) {
            ret += "/>";
        } else {
	    	ret += ">";
			vector<Parameter*>::iterator it;
			it = parameters->begin();
			while (it != parameters->end()) {
				ParameterGenerator* paramGen = static_cast<ParameterGenerator*>(*it);
				ret += paramGen->generateCode("descriptorParam", "value") + "\n";
				it++;
			}
            ret += "</descriptor>\n";
        }
        return ret;
    }
开发者ID:lince,项目名称:ginga-srpp,代码行数:86,代码来源:DescriptorGenerator.cpp

示例6: string

END_TEST


START_TEST (test_QualExtension_read_L3V1V1_defaultNS)
{
  string filename = string(TestDataDirectory) + "qual-example1-defaultNS.xml";
  SBMLDocument *document = readSBMLFromFile(filename.c_str());
  
  fail_unless(document->getPackageName() == "core");

  Model *model = document->getModel();

  fail_unless(model != NULL);
  fail_unless(model->getPackageName() == "core");

  // get the Qualitative species

  QualModelPlugin* mplugin = static_cast<QualModelPlugin*>(model->getPlugin("qual"));
  fail_unless(mplugin != NULL);

  fail_unless(mplugin->getNumQualitativeSpecies() == 1);
  fail_unless(mplugin->getListOfQualitativeSpecies()->getPackageName() == "qual");

  fail_unless(mplugin->getNumTransitions() == 1);
  fail_unless(mplugin->getListOfTransitions()->getPackageName() == "qual");

  QualitativeSpecies* qs = mplugin->getQualitativeSpecies(0);
  fail_unless(qs->getPackageName() == "qual");
  fail_unless(qs->getId() == "s1");
  fail_unless(qs->getName() == "sss");
  fail_unless(qs->getMetaId() == "_ddd");
  fail_unless(qs->getCompartment() == "c");
  fail_unless(qs->getConstant() == false);
  fail_unless(qs->getInitialLevel() == 1);
  fail_unless(qs->getMaxLevel() == 4);

  Transition* t = mplugin->getTransition(0);

  
  fail_unless(t->getPackageName() == "qual");
  fail_unless(t->getId() == "d");
  fail_unless(t->getNumInputs() == 1);
  fail_unless(t->getNumOutputs() == 1);
  fail_unless(t->getNumFunctionTerms() == 1);
  fail_unless(t->isSetDefaultTerm() == true);

  Input *i = t->getInput(0);
  
  fail_unless(i->getPackageName() == "qual");
  fail_unless(i->getId() == "RD");
  fail_unless(i->getName() == "aa" );
  fail_unless(i->getQualitativeSpecies() == "s1");
  fail_unless(i->getTransitionEffect() == INPUT_TRANSITION_EFFECT_NONE );
  fail_unless(i->getSign() == INPUT_SIGN_NEGATIVE);
  fail_unless(i->getThresholdLevel() == 2);

  Output *o = t->getOutput(0);
  
  fail_unless(o->getPackageName() == "qual");
  fail_unless(o->getId() == "wd");
  fail_unless(o->getName() == "asa" );
  fail_unless(o->getQualitativeSpecies() == "s1");
  fail_unless(o->getTransitionEffect() == OUTPUT_TRANSITION_EFFECT_PRODUCTION );
  fail_unless(o->getOutputLevel() == 2);

  FunctionTerm* ft1 = t->getFunctionTerm(0);

  fail_unless(ft1->getPackageName() == "qual");
  fail_unless(ft1->getResultLevel() == 1);
  fail_unless(ft1->getMath() != NULL);

  DefaultTerm* dt = t->getDefaultTerm();

  fail_unless(dt->getPackageName() == "qual");
  fail_unless(dt->getResultLevel() == 2);


  delete document;  
}
开发者ID:copasi,项目名称:copasi-dependencies,代码行数:79,代码来源:TestReadQualExtension.cpp

示例7: addTransition

void SubAutomata::addTransition ( Transition trans, Point* p ) {
	this->transitionList.push_back(trans);
	this->mapTransPoint[trans.getId()] = p;
}
开发者ID:Diegojnb,项目名称:JdeRobot,代码行数:4,代码来源:subautomata.cpp


注:本文中的Transition::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。