pappsomspp
Library for mass spectrometry
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_iterator< GrpSubGroup * > erase (std::_List_iterator< GrpSubGroup * > 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 52 of file grpsubgroupset.h.

Constructor & Destructor Documentation

◆ GrpSubGroupSet() [1/2]

pappso::GrpSubGroupSet::GrpSubGroupSet ( )

Definition at line 49 of file grpsubgroupset.cpp.

◆ GrpSubGroupSet() [2/2]

pappso::GrpSubGroupSet::GrpSubGroupSet ( const GrpSubGroupSet other)

Definition at line 53 of file grpsubgroupset.cpp.

56  {

◆ ~GrpSubGroupSet()

pappso::GrpSubGroupSet::~GrpSubGroupSet ( )

Definition at line 58 of file grpsubgroupset.cpp.

58  {
59  it++;
60  continue;

Member Function Documentation

◆ add()

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

Definition at line 131 of file grpsubgroupset.cpp.

139 {
140  QString infos;
141  std::list<GrpSubGroup *>::const_iterator it(m_grpSubGroupPtrList.begin()),
142  itEnd(m_grpSubGroupPtrList.end());
143 
144 
145  while(it != itEnd)
146  {
147  infos.append((*it)->getFirstAccession() + " " +
148  QString("0x%1").arg(
149  (quintptr)*it, QT_POINTER_SIZE * 2, 16, QChar('0')) +
150  "\n");
151  it++;
152  }
153 

◆ addAll()

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

Definition at line 64 of file grpsubgroupset.cpp.

70  {
71  itIn++;
72  it++;
73  }
74  }
75  while(itIn != itInEnd)
76  {
77  m_grpSubGroupPtrList.push_back(*itIn);
78  itIn++;
79  }
80 }
81 
82 void
83 GrpSubGroupSet::remove(GrpSubGroup *p_remove_sub_group)
84 {
85  m_grpSubGroupPtrList.remove(p_remove_sub_group);
86 }
87 
88 bool
89 GrpSubGroupSet::contains(GrpSubGroup *p_sub_group) const
90 {
91 
92  std::list<GrpSubGroup *>::const_iterator it(m_grpSubGroupPtrList.begin()),
93  itEnd(m_grpSubGroupPtrList.end());
94 
95 
96  while(it != itEnd)
97  {
98  if(p_sub_group == *it)
99  {

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

◆ begin()

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

Definition at line 77 of file grpsubgroupset.h.

◆ contains()

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

Definition at line 108 of file grpsubgroupset.cpp.

113 {
114 
115  std::list<GrpSubGroup *>::iterator it(m_grpSubGroupPtrList.begin()),
116  itEnd(m_grpSubGroupPtrList.end());
117 
118 
119  while(it != itEnd)
120  {
121  if(p_add_sub_group == *it)
122  {
123  // this subgroup is already in list
124  return;
125  }
126  if(p_add_sub_group > *it)
127  {
128  it = m_grpSubGroupPtrList.insert(it, p_add_sub_group);
129  return;

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

◆ end()

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

Definition at line 82 of file grpsubgroupset.h.

◆ erase()

std::_List_iterator<GrpSubGroup *> pappso::GrpSubGroupSet::erase ( std::_List_iterator< GrpSubGroup * >  it)
inline

Definition at line 72 of file grpsubgroupset.h.

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

◆ printInfos()

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

Definition at line 157 of file grpsubgroupset.cpp.

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

◆ remove()

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

Definition at line 102 of file grpsubgroupset.cpp.

104  {
105  return false;

◆ size()

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

Definition at line 64 of file grpsubgroupset.h.

64  {
65  return m_grpSubGroupPtrList.end();
66  };
67  bool contains(GrpSubGroup *get) const;

References m_grpSubGroupPtrList.

Member Data Documentation

◆ GrpGroup

friend pappso::GrpSubGroupSet::GrpGroup
private

Definition at line 54 of file grpsubgroupset.h.

◆ m_grpSubGroupPtrList

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

Definition at line 57 of file grpsubgroupset.h.

Referenced by pappso::GrpGroup::addSubGroupSp(), and size().


The documentation for this class was generated from the following files:
pappso::GrpSubGroupSet::contains
bool contains(GrpSubGroup *get) const
Definition: grpsubgroupset.cpp:108
pappso::GrpSubGroupSet::remove
void remove(GrpSubGroup *p_remove_sub_group)
Definition: grpsubgroupset.cpp:102
pappso::GrpSubGroupSet::m_grpSubGroupPtrList
std::list< GrpSubGroup * > m_grpSubGroupPtrList
Definition: grpsubgroupset.h:57