--- libgig/trunk/src/gig.h 2021/06/15 12:22:26 3929 +++ libgig/trunk/src/gig.h 2021/06/19 10:48:12 3958 @@ -1231,7 +1231,7 @@ public: String Name; ///< Name of this script group. For example to be displayed in an instrument editor. - Script* GetScript(uint index); + Script* GetScript(size_t index); Script* AddScript(); void DeleteScript(Script* pScript); protected: @@ -1245,7 +1245,7 @@ private: File* pFile; RIFF::List* pList; ///< 'RTIS' list chunk - std::list* pScripts; + std::vector* pScripts; }; /** @brief Provides access to a Gigasampler/GigaStudio instrument. @@ -1288,8 +1288,8 @@ using DLS::Resource::GetParent; // overridden methods Region* GetRegionAt(size_t pos); - Region* GetFirstRegion() LIBGIG_DEPRECATED("Use GetRegionAt() instead."); - Region* GetNextRegion() LIBGIG_DEPRECATED("Use GetRegionAt() instead."); + Region* GetFirstRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead."); + Region* GetNextRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead."); Region* AddRegion(); void DeleteRegion(Region* pRegion); void MoveTo(Instrument* dst); @@ -1303,15 +1303,15 @@ MidiRuleAlternator* AddMidiRuleAlternator(); void DeleteMidiRule(int i); // real-time instrument script methods - Script* GetScriptOfSlot(uint index); + Script* GetScriptOfSlot(size_t index); void AddScriptSlot(Script* pScript, bool bypass = false); - void SwapScriptSlots(uint index1, uint index2); - void RemoveScriptSlot(uint index); + void SwapScriptSlots(size_t index1, size_t index2); + void RemoveScriptSlot(size_t index); void RemoveScript(Script* pScript); - uint ScriptSlotCount() const; - bool IsScriptSlotBypassed(uint index); - void SetScriptSlotBypassed(uint index, bool bBypass); - bool IsScriptPatchVariableSet(int slot, String variable); + size_t ScriptSlotCount() const; + bool IsScriptSlotBypassed(size_t index); + void SetScriptSlotBypassed(size_t index, bool bBypass); + bool IsScriptPatchVariableSet(size_t slot, String variable); std::map GetScriptPatchVariables(int slot); String GetScriptPatchVariable(int slot, String variable); void SetScriptPatchVariable(int slot, String variable, String value); @@ -1338,7 +1338,7 @@ }; typedef std::array _UUID; typedef std::map _PatchVars; - typedef std::map _VarsBySlot; + typedef std::map _VarsBySlot; typedef std::map<_UUID,_VarsBySlot> _VarsByScript; MidiRule** pMidiRules; std::vector<_ScriptPooolEntry> scriptPoolFileOffsets; @@ -1365,8 +1365,9 @@ public: String Name; ///< Stores the name of this Group. - Sample* GetFirstSample(); - Sample* GetNextSample(); + Sample* GetSample(size_t index); + Sample* GetFirstSample() LIBGIG_DEPRECATED_API("Use GetSample() instead."); + Sample* GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead."); void AddSample(Sample* pSample); protected: Group(File* file, RIFF::Chunk* ck3gnm); @@ -1440,22 +1441,22 @@ // overridden methods File(); File(RIFF::File* pRIFF); - Sample* GetFirstSample(progress_t* pProgress = NULL) LIBGIG_DEPRECATED("Use GetSample() instead."); - Sample* GetNextSample() LIBGIG_DEPRECATED("Use GetSample() instead."); + Sample* GetFirstSample(progress_t* pProgress = NULL) LIBGIG_DEPRECATED_API("Use GetSample() instead."); + Sample* GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead."); Sample* GetSample(size_t index, progress_t* pProgress = NULL); Sample* AddSample(); size_t CountSamples(); void DeleteSample(Sample* pSample); - Instrument* GetFirstInstrument(); ///< Returns a pointer to the first Instrument object of the file, NULL otherwise. - Instrument* GetNextInstrument(); ///< Returns a pointer to the next Instrument object of the file, NULL otherwise. - Instrument* GetInstrument(uint index, progress_t* pProgress = NULL); + Instrument* GetFirstInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead."); + Instrument* GetNextInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead."); + Instrument* GetInstrument(size_t index, progress_t* pProgress = NULL); Instrument* AddInstrument(); Instrument* AddDuplicateInstrument(const Instrument* orig); size_t CountInstruments(); void DeleteInstrument(Instrument* pInstrument); - Group* GetFirstGroup(); ///< Returns a pointer to the first Group object of the file, NULL otherwise. - Group* GetNextGroup(); ///< Returns a pointer to the next Group object of the file, NULL otherwise. - Group* GetGroup(uint index); + Group* GetFirstGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead."); + Group* GetNextGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead."); + Group* GetGroup(size_t index); Group* GetGroup(String name); Group* AddGroup(); void DeleteGroup(Group* pGroup); @@ -1463,7 +1464,7 @@ void SetAutoLoad(bool b); bool GetAutoLoad(); void AddContentOf(File* pFile); - ScriptGroup* GetScriptGroup(uint index); + ScriptGroup* GetScriptGroup(size_t index); ScriptGroup* GetScriptGroup(const String& name); ScriptGroup* AddScriptGroup(); void DeleteScriptGroup(ScriptGroup* pGroup); @@ -1491,10 +1492,10 @@ friend class Group; // so Group can access protected member pRIFF friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF private: - std::list* pGroups; - std::list::iterator GroupsIterator; + std::vector* pGroups; + std::vector::iterator GroupsIterator; bool bAutoLoad; - std::list* pScriptGroups; + std::vector* pScriptGroups; bool UsesAnyGigFormatExtension() const; };