/[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 3925 by schoenebeck, Mon Jun 14 12:15:51 2021 UTC revision 3926 by schoenebeck, Tue Jun 15 10:16:40 2021 UTC
# Line 5301  namespace { Line 5301  namespace {
5301      }      }
5302    
5303      /**      /**
5304         * Returns Region at supplied @a pos position within the region list of
5305         * this instrument. If supplied @a pos is out of bounds then @c NULL is
5306         * returned.
5307         *
5308         * @param pos - position of sought Region in region list
5309         * @returns pointer address to requested region or @c NULL if @a pos is
5310         *          out of bounds
5311         */
5312        Region* Instrument::GetRegionAt(size_t pos) {
5313            if (!pRegions) return NULL;
5314            if (pos >= pRegions->size()) return NULL;
5315            return static_cast<gig::Region*>( (*pRegions)[pos] );
5316        }
5317    
5318        /**
5319       * Returns the first Region of the instrument. You have to call this       * Returns the first Region of the instrument. You have to call this
5320       * method once before you use GetNextRegion().       * method once before you use GetNextRegion().
5321       *       *
5322       * @returns  pointer address to first region or NULL if there is none       * @returns  pointer address to first region or NULL if there is none
5323       * @see      GetNextRegion()       * @see      GetNextRegion()
5324         * @deprecated  This method is not reentrant-safe, use GetRegionAt()
5325         *              instead.
5326       */       */
5327      Region* Instrument::GetFirstRegion() {      Region* Instrument::GetFirstRegion() {
5328          if (!pRegions) return NULL;          if (!pRegions) return NULL;
# Line 5320  namespace { Line 5337  namespace {
5337       *       *
5338       * @returns  pointer address to the next region or NULL if end reached       * @returns  pointer address to the next region or NULL if end reached
5339       * @see      GetFirstRegion()       * @see      GetFirstRegion()
5340         * @deprecated  This method is not reentrant-safe, use GetRegionAt()
5341         *              instead.
5342       */       */
5343      Region* Instrument::GetNextRegion() {      Region* Instrument::GetNextRegion() {
5344          if (!pRegions) return NULL;          if (!pRegions) return NULL;

Legend:
Removed from v.3925  
changed lines
  Added in v.3926

  ViewVC Help
Powered by ViewVC