amuse/AudioUnit/AudioGroupFilePresenter.hpp

50 lines
1.4 KiB
C++
Raw Normal View History

#ifndef __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__
#define __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__
#import <Foundation/Foundation.h>
2016-06-03 02:53:52 +00:00
#import <AppKit/AppKit.h>
#include <map>
#include <string>
@class AudioGroupFilePresenter;
struct AudioGroupDataCollection
{
2016-06-03 02:53:52 +00:00
NSURL* m_proj;
NSURL* m_pool;
NSURL* m_sdir;
NSURL* m_samp;
std::unique_ptr<uint8_t[]> m_projData;
std::unique_ptr<uint8_t[]> m_poolData;
std::unique_ptr<uint8_t[]> m_sdirData;
std::unique_ptr<uint8_t[]> m_sampData;
void moveURL(NSURL* oldUrl, NSURL* newUrl);
2016-06-03 02:53:52 +00:00
bool loadProj(AudioGroupFilePresenter* presenter);
bool loadPool(AudioGroupFilePresenter* presenter);
bool loadSdir(AudioGroupFilePresenter* presenter);
bool loadSamp(AudioGroupFilePresenter* presenter);
2016-06-03 02:53:52 +00:00
AudioGroupDataCollection(NSURL* proj, NSURL* pool, NSURL* sdir, NSURL* samp)
: m_proj(proj), m_pool(pool), m_sdir(sdir), m_samp(samp) {}
bool isDataComplete () const {return m_projData && m_poolData && m_sdirData && m_sampData;}
};
2016-06-03 02:53:52 +00:00
@interface AudioGroupFilePresenter : NSObject <NSFilePresenter, NSOutlineViewDataSource>
{
NSURL* m_groupURL;
NSOperationQueue* m_dataQueue;
std::map<std::string, AudioGroupDataCollection> m_audioGroupCollections;
2016-06-03 02:53:52 +00:00
std::map<std::string, AudioGroupDataCollection>::const_iterator m_audioGroupOutlineIt;
size_t m_audioGroupOutlineIdx;
}
2016-06-03 02:53:52 +00:00
- (void)update;
@end
#endif // __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__