pappso::GrpSubGroupSet Class Reference

`#include <grpsubgroupset.h>`

## Public Member Functions

| GrpSubGroupSet ()
| GrpSubGroupSet (const GrpSubGroupSet &other)
| ~GrpSubGroupSet ()
unsigned int | size () const
void | addAll (const GrpSubGroupSet &other)
void | remove (GrpSubGroup *p_remove_sub_group)
void | add (GrpSubGroup *p_add_sub_group)
std::list< GrpSubGroup * >::iterator | erase (std::list< GrpSubGroup * >::iterator it)
std::list< GrpSubGroup * >::const_iterator | begin () const
std::list< GrpSubGroup * >::const_iterator | end () const
bool | contains (GrpSubGroup *get) const
const QString | printInfos () const

## Private Attributes

friend | GrpGroup
std::list< GrpSubGroup * > | m_grpSubGroupPtrList

## Detailed Description

Definition at line 33 of file grpsubgroupset.h.

## Constructor & Destructor Documentation

## GrpSubGroupSet() [1/2]

pappso::GrpSubGroupSet::GrpSubGroupSet | ( |  | ) |

Definition at line 30 of file grpsubgroupset.cpp.

{
}

## GrpSubGroupSet() [2/2]

pappso::GrpSubGroupSet::GrpSubGroupSet | ( | const GrpSubGroupSet & | other | ) |

Definition at line 34 of file grpsubgroupset.cpp.

: m_grpSubGroupPtrList(other.m_grpSubGroupPtrList)
{
}
pappso::GrpSubGroupSet::m_grpSubGroupPtrList
std::list< GrpSubGroup * > m_grpSubGroupPtrList
Definition: grpsubgroupset.h:38

## ~GrpSubGroupSet()

pappso::GrpSubGroupSet::~GrpSubGroupSet | ( |  | ) |

Definition at line 39 of file grpsubgroupset.cpp.

{
}

## Member Function Documentation

## add()

void pappso::GrpSubGroupSet::add | ( | GrpSubGroup * | p_add_sub_group | ) |

Definition at line 112 of file grpsubgroupset.cpp.

{
std::list<GrpSubGroup *>::iterator it(m_grpSubGroupPtrList.begin()),
itEnd(m_grpSubGroupPtrList.end());
while(it != itEnd)
{
if(p_add_sub_group == *it)
{
// this subgroup is already in list
return;
}
if(p_add_sub_group > *it)
{
it = m_grpSubGroupPtrList.insert(it, p_add_sub_group);
return;
}
it++;
}
m_grpSubGroupPtrList.push_back(p_add_sub_group);
}

References m_grpSubGroupPtrList.

## addAll()

void pappso::GrpSubGroupSet::addAll | ( | const GrpSubGroupSet & | other | ) |

Definition at line 45 of file grpsubgroupset.cpp.

{
std::list<GrpSubGroup *>::iterator it(m_grpSubGroupPtrList.begin());
std::list<GrpSubGroup *>::iterator itEnd(m_grpSubGroupPtrList.end());
std::list<GrpSubGroup *>::const_iterator itIn(
other.m_grpSubGroupPtrList.begin());
std::list<GrpSubGroup *>::const_iterator itInEnd(
other.m_grpSubGroupPtrList.end());
while((itIn != itInEnd) && (it != itEnd))
{
if(*itIn < *it)
{
it++;
continue;
}
if(*itIn > *it)
{
it = m_grpSubGroupPtrList.insert(it, *itIn);
it++;
itIn++;
continue;
}
if(*itIn == *it)
{
itIn++;
it++;
}
}
while(itIn != itInEnd)
{
m_grpSubGroupPtrList.push_back(*itIn);
itIn++;
}
}

References m_grpSubGroupPtrList.

Referenced by pappso::GrpMapPeptideToSubGroupSet::getSubGroupSet().

## begin()

std::list<GrpSubGroup *>::const_iterator pappso::GrpSubGroupSet::begin | ( |  | ) | const

inline

Definition at line 58 of file grpsubgroupset.h.

{
return m_grpSubGroupPtrList.begin();
};

References m_grpSubGroupPtrList.

## contains()

bool pappso::GrpSubGroupSet::contains | ( | GrpSubGroup * | get | ) | const

Definition at line 89 of file grpsubgroupset.cpp.

{
std::list<GrpSubGroup *>::const_iterator it(m_grpSubGroupPtrList.begin()),
itEnd(m_grpSubGroupPtrList.end());
while(it != itEnd)
{
if(p_sub_group == *it)
{
// this subgroup is already in list
return true;
}
if(p_sub_group > *it)
{
return false;
}
it++;
}
return false;
}

References m_grpSubGroupPtrList.

Referenced by pappso::GrpGroup::addSubGroupSp().

## end()

std::list<GrpSubGroup *>::const_iterator pappso::GrpSubGroupSet::end | ( |  | ) | const

inline

Definition at line 63 of file grpsubgroupset.h.

{
return m_grpSubGroupPtrList.end();
};

References m_grpSubGroupPtrList.

## erase()

std::list<GrpSubGroup *>::iterator pappso::GrpSubGroupSet::erase | ( | std::list< GrpSubGroup * >::iterator | it | ) |

inline

Definition at line 53 of file grpsubgroupset.h.

{
return m_grpSubGroupPtrList.erase(it);
};

References m_grpSubGroupPtrList.

Referenced by pappso::GrpGroup::addSubGroupSp().

## printInfos()

const QString pappso::GrpSubGroupSet::printInfos | ( |  | ) | const

Definition at line 138 of file grpsubgroupset.cpp.

{
QString infos;
std::list<GrpSubGroup *>::const_iterator it(m_grpSubGroupPtrList.begin()),
itEnd(m_grpSubGroupPtrList.end());
while(it != itEnd)
{
infos.append((*it)->getFirstAccession() + " " +
QString("0x%1").arg(
(quintptr)*it, QT_POINTER_SIZE * 2, 16, QChar('0')) +
"\n");
it++;
}
return infos;
}

References m_grpSubGroupPtrList.

Referenced by pappso::GrpGroup::check().

## remove()

void pappso::GrpSubGroupSet::remove | ( | GrpSubGroup * | p_remove_sub_group | ) |

Definition at line 83 of file grpsubgroupset.cpp.

{
m_grpSubGroupPtrList.remove(p_remove_sub_group);
}

References m_grpSubGroupPtrList.

## size()

unsigned int pappso::GrpSubGroupSet::size | ( |  | ) | const

inline

Definition at line 45 of file grpsubgroupset.h.

{
return m_grpSubGroupPtrList.size();
};

References m_grpSubGroupPtrList.

## Member Data Documentation

## GrpGroup

friend pappso::GrpSubGroupSet::GrpGroup

private

Definition at line 35 of file grpsubgroupset.h.

## m_grpSubGroupPtrList

std::list<GrpSubGroup *> pappso::GrpSubGroupSet::m_grpSubGroupPtrList

private

Definition at line 38 of file grpsubgroupset.h.

Referenced by add(), addAll(), pappso::GrpGroup::addSubGroupSp(), begin(), contains(), end(), erase(), printInfos(), remove(), and size().

The documentation for this class was generated from the following files:

- pappsomspp/grouping/grpsubgroupset.h
- pappsomspp/grouping/grpsubgroupset.cpp