| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef __OUTPUT_SET_H |
| 18 |
#define __OUTPUT_SET_H |
| 19 |
|
| 20 |
#include <set> |
| 21 |
#include <utils/Errors.h> |
| 22 |
#include <utils/String8.h> |
| 23 |
#include <utils/StrongPointer.h> |
| 24 |
|
| 25 |
class AaptFile; |
| 26 |
|
| 27 |
class OutputEntry { |
| 28 |
public: |
| 29 |
OutputEntry() {} |
| 30 |
OutputEntry(const android::String8& path, const android::sp<const AaptFile>& file) |
| 31 |
: mPath(path), mFile(file) {} |
| 32 |
|
| 33 |
inline const android::sp<const AaptFile>& getFile() const { |
| 34 |
return mFile; |
| 35 |
} |
| 36 |
|
| 37 |
inline const android::String8& getPath() const { |
| 38 |
return mPath; |
| 39 |
} |
| 40 |
|
| 41 |
bool operator<(const OutputEntry& o) const { return getPath() < o.mPath; } |
| 42 |
bool operator==(const OutputEntry& o) const { return getPath() == o.mPath; } |
| 43 |
|
| 44 |
private: |
| 45 |
android::String8 mPath; |
| 46 |
android::sp<const AaptFile> mFile; |
| 47 |
}; |
| 48 |
|
| 49 |
class OutputSet : public virtual android::RefBase { |
| 50 |
public: |
| 51 |
virtual const std::set<OutputEntry>& getEntries() const = 0; |
| 52 |
|
| 53 |
virtual ~OutputSet() {} |
| 54 |
}; |
| 55 |
|
| 56 |
#endif |