Logo Search packages:      
Sourcecode: fet version File versions

int Rules::searchSubgroup ( const QString &  yearName,
const QString &  groupName,
const QString &  subgroupName 
)

Returns -1 if not found or the index of the subgroup in the list of subgroups of this group

Definition at line 1313 of file rules.cpp.

References searchGroup(), searchYear(), and yearsList.

Referenced by modifySubgroup().

{
      StudentsYear* sty=this->yearsList.at(this->searchYear(yearName));
      assert(sty);
      StudentsGroup* stg=sty->groupsList.at(this->searchGroup(yearName, groupName));
      assert(stg);
      
      StudentsSubgroup* sts;
      int i;
      for(sts=stg->subgroupsList.first(), i=0; sts; sts=stg->subgroupsList.next(), i++)
            if(sts->name==subgroupName)
                  return i;
      return -1;
}


Generated by  Doxygen 1.6.0   Back to index