本文整理汇总了C++中Series::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ Series::insert方法的具体用法?C++ Series::insert怎么用?C++ Series::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Series
的用法示例。
在下文中一共展示了Series::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serie
void
LocalService::CheckDataSet(
DcmDataset *dataSet,
SerieInfo &sInfo,
TableRow &row,
std::string path)
{
// load data from dataSet
GetTableRowFromDataSet( dataSet, &row);
GetSeriesInfo( dataSet, &sInfo);
// now check what is in database
Patients::iterator patIt = m_patients.find( row.patientID);
if( patIt == m_patients.end() )
{
// insert new patient
// insert new study
Serie serie(sInfo.id, sInfo.description, path);
Series s;
s.insert( Series::value_type( serie.id, serie) );
Study stud(row.studyID, row.date, s);
Studies buddStudies;
buddStudies.insert( Studies::value_type( stud.id, stud));
Patient buddPat( row.patientID, row.name, row.birthDate, row.sex, buddStudies);
m_patients.insert( Patients::value_type( row.patientID, buddPat) );
}
else
{
// perform lookup level down
Studies &studies = patIt->second.studies;
Studies::iterator studItr = studies.find( row.studyID);
if( studItr == studies.end() )
{
// insert new study
Serie serie(sInfo.id, sInfo.description, path);
Series s;
s.insert( Series::value_type( serie.id, serie) );
Study stud(row.studyID, row.date, s);
patIt->second.studies.insert( Studies::value_type(
stud.id, stud) );
}
else
{
// perform lookup level down
Series &series = studItr->second.series;
Series::iterator serItr = series.find( sInfo.id);
if( serItr == series.end() )
{
// insert new serie
Serie buddy(sInfo.id, sInfo.description, path);
series.insert( Series::value_type( sInfo.id, buddy) );
}
// else do nothing
}
}
}