예제 #1
0
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
0
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
0
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
0
// 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;
                }
            }
        }
    }
}