本文整理汇总了C++中DataDefnBlk::ForScenario方法的典型用法代码示例。如果您正苦于以下问题:C++ DataDefnBlk::ForScenario方法的具体用法?C++ DataDefnBlk::ForScenario怎么用?C++ DataDefnBlk::ForScenario使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataDefnBlk
的用法示例。
在下文中一共展示了DataDefnBlk::ForScenario方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BuildDataDefn
/*This provides access to the variables of the model and calls the
BuildDataDefn for objects used by the model.*/
void BeltCnv::BuildDataDefn(DataDefnBlk & DDB)
{
DDB.BeginStruct(this);
//DDB.Page ("Parms");
DDB.Text ("");
DDB.Visibility(NM_Dynamic|SM_All|HM_All);
BuildDataDefnElevation(DDB);
DDB.Text("");
DDB.Double ("BeltSpeed", "", DC_Ldt, "m/s", xidBeltSpeed, this, isResult);
DDB.Visibility();
DDB.Double ("Length", "L", DC_L, "m", xidBeltLength, this, isParm);
DDB.Visibility(NM_Dynamic|SM_All|HM_All);
DDB.Double ("MaxSpeed", "", DC_Ldt, "m/s", &m_MaxVelocity, this, isParm);
DDB.Double ("MaxLoading", "MaxSpillLoad", DC_MpL, "kg/m", &m_MaxSpillLoading, this, isParm);
DDB.Double ("MinLoading", "", DC_MpL, "kg/m", &m_MinLoading, this, isParm|InitHidden);
DDB.Long ("MaxTurndown", "", DC_, "", &m_MaxTurnDown, this, isParm|InitHidden);
DDB.Visibility(NM_Dynamic|SM_All|HM_All);
DDB.Double ("", "MaxStallLoad", DC_M, "kg", &m_MaxStallLoading, this, isParm);
DDB.CheckBox("", "StartIfStalled", DC_, "", &m_fStartIfStalled, this, isParm);
DDB.Byte ("", "WasRunning", DC_, "", &m_fWasRunning, this, isResult|InitHidden);
DDB.Double ("TotalMass", "", DC_M, "kg", xidTotalMass, this, isResult);
DDB.Double ("AvgLoading", "", DC_MpL, "kg/m", xidAvgLoading, this, isResult);
if (OrigPrjFileVerNo()<90 && DDB.ForFileSnpScn())
DDB.String ("SpillArea", "", DC_, "", &m_sAreaTag, this, isParmStopped);
DDB.Double ("TotalSpilt", "", DC_M, "kg", xidTotSpilt, this, isParm);
DDB.Double ("TotalVented", "", DC_M, "kg", xidTotVented, this, isParm);
DDB.Page("BeltDrive", DDB_RqdPage);
DDB.Text ("Power Draw");
DDB.Double ("NoLoadPower", "", DC_Pwr, "kW", &m_NLPower, this, isParm);
DDB.Double ("FullLoadPower","", DC_Pwr, "kW", &m_FLPower, this, isParm);
DDB.Double ("Power", "", DC_Pwr, "kW", &m_Power, this, isResult);
DDB.Text("");
m_Pwr.BuildDataDefn(DDB);
m_BeltSB.BuildDataDefn(DDB, this, "Speed", 1);
DDB.Visibility();
DDB.Text("");
DDB.Long ("NoWtMtrs", "", DC_, "", xidNWtMtrs, this, isParm);
static DDBValueLst DDB1[] = {
{QPT_None, "None" },
{QPT_FixedPts, "Fixed Points"},
{QPT_AllSections, "All Section Pts"},
{QPT_MinSections, "Min Section Pts"},
{0}};
DDB.CheckBox("ShowProfile", "", DC_, "", xidShowProf, this, isParm|SetOnChange);
DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile);
DDB.Long ("ProfDispType", "", DC_, "", xidProfDispType, this, isParm, DDB1);
//DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile && m_ProfDispType==QPT_FixedPts);
//DDB.Long ("ProfilePts", "", DC_, "", xidProfPts, this, isParm);
DDB.Visibility(NM_Dynamic|SM_All|HM_All);
DDB.Long ("NSections", "", DC_, "", xidNSections, this, isResult);
if (DDB.BeginStruct(this, "MinSect", 0, DDB_NoPage))
{
DDB.Double ("Length", "", DC_Frac, "%", &m_Q.m_dMinFracSectLen, this, isParm);
DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_Q.m_dMinFracSectLen>0);
DDB.Double ("LoadTol", "", DC_Frac, "%", &m_Q.m_dLoadTol, this, isParm);
DDB.Double ("TempTol", "", DC_Frac, "%", &m_Q.m_dTempTol, this, isParm);
DDB.Double ("MFracTol", "", DC_Frac, "%", &m_Q.m_dMFracTol, this, isParm);
}
DDB.EndStruct();
DDB.Text("");
BuildDataDefnShowIOs(DDB);
if (m_WtMtrPos.GetSize())
{
DDB.Page("WtMtrs", DDB_RqdPage);
if (DDB.BeginArray(this, "WtMtr", "WtMtr", m_WtMtrPos.GetSize(), 0))
{
for (int i=0; i<m_WtMtrPos.GetSize(); i++)
if (DDB.BeginElement(this, i))
{
DDB.Double("Pos", "", DC_L , "m", xidWtrMtrPos0+i, this, isParm);
DDB.Double("Loading", "", DC_MpL, "kg/m", xidWtrMtrLd0+i, this, isResult|0);
DDB.Double("Rate", "", DC_Qm, "kg/s", xidWtrMtrRate0+i, this, isResult|0);
DDB.Text("");
}
}
DDB.EndArray();
}
int FdLst[MaxIOList], PrLst[MaxIOList];
int nFd=0, nPr=0;
for (int i=0; i<NoFlwIOs(); i++)
if (IOId_Self(i)==idFeed)
FdLst[nFd++]=i;
else if (IOId_Self(i)==idProd)
PrLst[nPr++]=i;
int DoOld=((!DDB.ForFiling() && !DDB.ForSnapShot() && !DDB.ForScenario() && !DDB.ForView()) ||
//.........这里部分代码省略.........