blip  0.1
AssetManager.hpp
Go to the documentation of this file.
1 #ifndef __blip_AssetManager_hpp
2 #define __blip_AssetManager_hpp
3 
4 #include <blip/Blip.hpp>
5 
6 #include <commonc++/String.h++>
7 
8 class AAssetManager;
9 
10 namespace blip {
11 
12 class Asset;
13 class AssetDirectory;
14 
16 enum AssetMode {
27 
35 {
36  friend class NativeActivity;
37 
38  public:
39 
41  ~AssetManager();
42 
51  AssetDirectory* openDir(const ccxx::String& path);
52 
62  Asset* open(const ccxx::String& path, AssetMode mode);
63 
64  private: // called by NativeActivity
65 
66  AssetManager(AAssetManager* mgr);
67 
68  private:
69 
70  AAssetManager* _mgr;
71 
72  CCXX_COPY_DECLS(AssetManager);
73 };
74 
75 } // namespace blip
76 
77 #endif // __blip_AssetManager_hpp
An asset manager, which provides access to the application&#39;s raw asset files.
Definition: AssetManager.hpp:34
Asset * open(const ccxx::String &path, AssetMode mode)
Open the asset file with the given path.
Definition: AssetManager.cpp:48
An application asset directory.
Definition: AssetDirectory.hpp:19
No specific access mode.
Definition: AssetManager.hpp:18
Fast small reads; the system will attempt to load the entire contents of the asset into memory...
Definition: AssetManager.hpp:26
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
An abstract base class for all "native" (C++) Android activities.
Definition: NativeActivity.hpp:71
AssetMode
Asset access modes.
Definition: AssetManager.hpp:16
An application asset file.
Definition: Asset.hpp:23
AssetDirectory * openDir(const ccxx::String &path)
Open the asset directory with the given file path.
Definition: AssetManager.cpp:34
~AssetManager()
Destructor.
Definition: AssetManager.cpp:27
Sequential access mode, with occasional forward seeks.
Definition: AssetManager.hpp:22
Random access mode, with both forward and backward seeks.
Definition: AssetManager.hpp:20