/[svn]/libgig/trunk/src/gig.cpp
ViewVC logotype

Diff of /libgig/trunk/src/gig.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2540 by schoenebeck, Wed Apr 23 16:39:43 2014 UTC revision 2543 by schoenebeck, Sat May 10 02:06:58 2014 UTC
# Line 4659  namespace { Line 4659  namespace {
4659          return NULL;          return NULL;
4660      }      }
4661    
4662        /**
4663         * Returns the group with the given group name.
4664         *
4665         * Note: group names don't have to be unique in the gig format! So there
4666         * can be multiple groups with the same name. This method will simply
4667         * return the first group found with the given name.
4668         *
4669         * @param name - name of the sought group
4670         * @returns sought group or NULL if there's no group with that name
4671         */
4672        Group* File::GetGroup(String name) {
4673            if (!pGroups) LoadGroups();
4674            GroupsIterator = pGroups->begin();
4675            for (uint i = 0; GroupsIterator != pGroups->end(); ++GroupsIterator, ++i)
4676                if ((*GroupsIterator)->Name == name) return *GroupsIterator;
4677            return NULL;
4678        }
4679    
4680      Group* File::AddGroup() {      Group* File::AddGroup() {
4681          if (!pGroups) LoadGroups();          if (!pGroups) LoadGroups();
4682          // there must always be at least one group          // there must always be at least one group

Legend:
Removed from v.2540  
changed lines
  Added in v.2543

  ViewVC Help
Powered by ViewVC