本文整理汇总了C++中SC_StringArray类的典型用法代码示例。如果您正苦于以下问题:C++ SC_StringArray类的具体用法?C++ SC_StringArray怎么用?C++ SC_StringArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SC_StringArray类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetLists
void DPO_STEPWISEPS::SetLists()
{
listDataOK = indepVarObjRefUI.CheckDataObj();
SC_StringArray varList;
SC_StringArray obsList;
if (listDataOK)
{
const DC_SATable& indepTableDC =
static_cast<DO_SATable*>(indepVarObjRefUI.GetDataObj())->GetSATableRef();
indepTableDC.GetVariableIDs(varList);
indepTableDC.GetTypeIDs(DC_SATable::saVector, obsList);
}
else
{
varList.Alloc(1);
varList += "no variables";
obsList.Alloc(1);
obsList += "no obs";
}
dropIndexesUI.SetListText(obsList);
forceIndexesUI.SetListText(varList);
weightIndexUI.SetListText(varList);
SetAllSensitive();
}
示例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: 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;
};
示例4: GetIDs
bool CurveFile::GetIDs(SC_StringArray& currIDs) const
{
currIDs.SetEmpty();
if (currentCurveData != 0)
currentCurveData->GetIDs(currIDs);
return ! currIDs.IsEmpty();
}
示例5: GetCaseIDs
void ProfileSimRunResults::GetCaseIDs(SC_StringArray& caseIDs) const
{
caseIDs.DeAlloc();
caseIDs.SetStringLen(ProfileSimCaseResults::caseIDLen);
caseIDs.Alloc(Size());
for (int i = 0; i < Size(); i++)
caseIDs += (*this)[i].caseID;
};
示例6: GetGeoLayerIDs
bool LayerStaticSupport::GetGeoLayerIDs(SC_StringArray& ids)
{
ids.SetStringLen(IntervalBase::intervalIDLen);
ids.Alloc(geologyLayers.Size());
for (int i = 0; i < geologyLayers.Size(); i++)
ids += geologyLayers[i].intervalID;
return !ids.IsEmpty();
}
示例7: GetWellBoreZoneIDs
bool LayerStaticSupport::GetWellBoreZoneIDs(SC_StringArray& ids)
{
ids.SetStringLen(IntervalBase::intervalIDLen);
ids.Alloc(wellBoreZones.Size());
for (int i = 0; i < wellBoreZones.Size(); i++)
ids += wellBoreZones[i].intervalID;
return !ids.IsEmpty();
}
示例8: Update
void ExposedList::Update()
{
if (!IsExposed())
return;
ExposedObjC::Update();
if (listData.IsEmpty())
{
SC_StringArray temp;
temp.Alloc(1);
temp += "<< no data >>";
scrolledList.SetListText(temp);
exposedMS.enteredIndexValue = offsetVal;
currListData.DeAlloc();
}
else
{
// has list changed ?
if (!(currListData == listData))
{
// update if different
scrolledList.SetListText(listData);
currListData = listData;
}
if (exposedMS.enteredIndexIsSingle)
{
int currIndx = exposedMS.enteredIndexValue - offsetVal;
if (currIndx < 0)
currIndx = 0;
if (currIndx >= listData.Size())
currIndx = listData.Size() - 1;
scrolledList.SetSingleSelection(currIndx);
scrolledList.SetSelectionVisible();
exposedMS.enteredIndexValue = currIndx + offsetVal;
}
else
{
SC_IntArray currIndex(exposedMS.enteredIndexArray);
int maxIndex = listData.Size();
int nOK = 0;
int i;
for (i = 0; i < currIndex.Size(); i++)
if ((currIndex[i] - offsetVal) < maxIndex)
{
currIndex[nOK++] = currIndex[i] - offsetVal;
}
currIndex.SetSize(nOK);
scrolledList.SetMultipleSelection(currIndex);
for (i = 0; i < nOK; i++)
exposedMS.enteredIndexArray[i] = currIndex[i] + offsetVal;
exposedMS.enteredIndexArray.SetSize(nOK);
}
}
SetAllSensitive();
}
示例9: ReadStringArray
void ReadStringArray(SC_StringArray& strings)
{
strings.DeAlloc();
int nLines = ReadInt();
int strLen = ReadInt();
strings.SetStringLen(strLen);
strings.AllocAndSetSize(nLines);
for (int i = 0; i < nLines; i++ ) {
ReadText(strings[i], strLen);
}
}
示例10: WriteStringArray
void WriteStringArray(const SC_StringArray& strings)
{
WriteInt(strings.Size());
WriteInt(strings.GetStringLen());
WriteLine();
for (int i = 0; i < strings.Size(); i++ )
{
WriteText(strings[i]);
}
}
示例11: GetWellIDs
bool DataCaptureStaticSupport::GetWellIDs(SC_StringArray& wellIDs)
{
wellIDs.SetStringLen(40);
wellIDs.Alloc(dataCaptureData.Size());
for (int i = 0; i < dataCaptureData.Size(); i++)
{
DataCaptureSpecGlob& currSpec = *(dataCaptureData[i]);
if (currSpec.IsWell() && currSpec.IsPressure())
wellIDs += currSpec.dataDesig;
}
return wellIDs.IsNotEmpty();
}
示例12: GetExtraOutputID
void SimulatedAnnealingOptimizer::GetExtraOutputID(SC_StringArray& extraIDs) const
{
extraIDs.Alloc(2);
extraIDs += "Temperature";
extraIDs += "SimplexSpan";
}
示例13: SetDesc
void DFO_TableTranspose::SetDesc(SC_StringArray& descStr,
const char* desc,
int nreq)
{
int ndesc = descStr.Size();
if (ndesc < nreq)
{
for (int i = ndesc; i < nreq; i++)
{
char tempStr[80];
CopyString(tempStr, desc, 80);
ConcatInt(i, tempStr, 3, 80);
descStr.SetString(tempStr, i);
}
descStr.SetSize(nreq);
}
}
示例14: SetIndexList
void DPO_SelectOptPS::SetIndexList()
{
SC_StringArray dataIDs;
if (optSimResultsObjRefUI.CheckDataObj())
{
dataDC = static_cast<DO_OptSimResults*>(optSimResultsObjRefUI.GetDataObj())->optResults;
dataDC->GetMenuStrings(dataIDs, showFitComponents, showOKonly);
}
listDataOK = !dataIDs.IsEmpty();
if (listDataOK)
{
indexMSUI.indexListUI.SetListText(dataIDs);
}
else
{
indexMSUI.indexListUI.SetListNA();
}
SetAllSensitive();
}
示例15: SetIndexList
void DPO_SelectLabelArrayPS::SetIndexList()
{
SC_StringArray dataIDs;
if (labDataArrayObjRefUI.CheckDataObj())
{
dataIDs = static_cast<DO_LabelArray*>(labDataArrayObjRefUI.GetDataObj())->dataLabels;
}
listDataOK = !dataIDs.IsEmpty();
if (listDataOK)
{
indexMSUI.indexListUI.SetListText(dataIDs);
}
else
{
indexMSUI.indexListUI.SetListNA();
}
SetAllSensitive();
}