本文整理汇总了C++中SC_StringArray::ForceMinStringLen方法的典型用法代码示例。如果您正苦于以下问题:C++ SC_StringArray::ForceMinStringLen方法的具体用法?C++ SC_StringArray::ForceMinStringLen怎么用?C++ SC_StringArray::ForceMinStringLen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_StringArray
的用法示例。
在下文中一共展示了SC_StringArray::ForceMinStringLen方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetRunIDs
void DC_ProfileSimResults::GetRunIDs(SC_StringArray& runIDs) const
{
runIDs.ForceMinStringLen(ProfileSimRunResults::runIDLen);
runIDs.Alloc(Size());
for (int i = 0; i < Size(); i++)
runIDs += (*this)[i].runID;
};
示例2: GetFitIDs
void OptSimRunResults::GetFitIDs(SC_StringArray& fitIDs) const
{
fitIDs.ForceMinStringLen(OptFitDescription::fitIDLen);
fitIDs.Alloc(fitDescriptions.Size());
for (int i = 0; i < fitDescriptions.Size(); i++)
fitIDs += fitDescriptions[i].fitID;
};
示例3: GetCaseIDs
void DC_ProfileSimResults::GetCaseIDs(SC_StringArray& caseIDs) const
{
static const int maxStrLen = ProfileSimRunResults::runIDLen + 1 + ProfileSimCaseResults::caseIDLen;
caseIDs.ForceMinStringLen(maxStrLen);
caseIDs.Alloc(GetnCases());
char tempStr[maxStrLen];
for (int i = 0; i < Size(); i++)
{
ProfileSimRunResults& currRun = (*this)[i];
for (int j = 0; j < currRun.Size(); j++)
{
CopyString(tempStr, currRun.runID, maxStrLen);
ConcatString(tempStr, "\t", maxStrLen);
ConcatString(tempStr, currRun[j].caseID, maxStrLen);
caseIDs += tempStr;
}
}
}
示例4: GetMenuStrings
// for use in menus
void DC_OptSimResults::GetMenuStrings(SC_StringArray& ids,
bool includeFitComponents,
bool includeOKonly) const
{
static const int maxStrLen = OptSimRunResults::runIDLen + 2 +
CaseVarDescription::caseVarDescLen + 2 +
OptFitDescription::fitIDLen + 2 +
OptFitComponentDescription::fitIDLen;
ids.ForceMinStringLen(maxStrLen);
if (includeFitComponents)
{
ids.Alloc(GetnFitComponents());
}
else
{
ids.Alloc(GetnFits());
}
char runStr[maxStrLen];
char caseStr[maxStrLen];
char fitStr[maxStrLen];
char fitCompStr[maxStrLen];
char okStr[maxStrLen];
for (int i = 0; i < Size(); i++)
{
OptCaseResultsArray& currCases = (*this)[i].runResults;
CopyString(runStr, (*this)[i].runID, maxStrLen);
for (int j = 0; j < currCases.Size(); j++)
{
CopyString(caseStr, currCases[j].caseDesc, maxStrLen);
int nfit = currCases[j].caseResults.Size();
OptSingleFitArray& currFits = currCases[j].caseResults;
for (int k = 0; k < currFits.Size(); k++)
{
if (includeOKonly && (!currFits[k].fitCompletedOK))
continue;
if (currFits[k].fitCompletedOK)
{
CopyString(okStr, " \t OK", maxStrLen);
}
else
{
CopyString(okStr, " \t Bad", maxStrLen);
}
CopyString(fitStr, runStr, maxStrLen);
ConcatString(fitStr, "\t", maxStrLen);
ConcatString(fitStr, caseStr, maxStrLen);
ConcatString(fitStr, "\t", maxStrLen);
ConcatString(fitStr, (*this)[i].fitDescriptions[k].fitID, maxStrLen);
if (!includeOKonly)
ConcatString(fitStr, okStr, maxStrLen);
if (includeFitComponents)
{
OptFitComponentArray& currFitComp = currFits[k].fitComponents;
for (int l = 0; l < currFitComp.Size(); l++)
{
CopyString(fitCompStr, fitStr, maxStrLen);
ConcatString(fitCompStr, "\t", maxStrLen);
ConcatString(fitCompStr, (*this)[i].fitDescriptions[k].fitComponentDescription[l].fitID, maxStrLen);
ids += fitCompStr;
}
}
else
{
ids += fitStr;
}
}
}
}
}