| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef __CONFIG_DESCRIPTION_H |
| 18 |
#define __CONFIG_DESCRIPTION_H |
| 19 |
|
| 20 |
#include <androidfw/ResourceTypes.h> |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
struct ConfigDescription : public android::ResTable_config { |
| 27 |
ConfigDescription() { |
| 28 |
memset(this, 0, sizeof(*this)); |
| 29 |
size = sizeof(android::ResTable_config); |
| 30 |
} |
| 31 |
|
| 32 |
ConfigDescription(const android::ResTable_config&o) { |
| 33 |
*static_cast<android::ResTable_config*>(this) = o; |
| 34 |
size = sizeof(android::ResTable_config); |
| 35 |
} |
| 36 |
|
| 37 |
ConfigDescription(const ConfigDescription&o) |
| 38 |
: android::ResTable_config(o) { |
| 39 |
} |
| 40 |
|
| 41 |
ConfigDescription& operator=(const android::ResTable_config& o) { |
| 42 |
*static_cast<android::ResTable_config*>(this) = o; |
| 43 |
size = sizeof(android::ResTable_config); |
| 44 |
return *this; |
| 45 |
} |
| 46 |
|
| 47 |
ConfigDescription& operator=(const ConfigDescription& o) { |
| 48 |
*static_cast<android::ResTable_config*>(this) = o; |
| 49 |
return *this; |
| 50 |
} |
| 51 |
|
| 52 |
inline bool operator<(const ConfigDescription& o) const { return compare(o) < 0; } |
| 53 |
inline bool operator<=(const ConfigDescription& o) const { return compare(o) <= 0; } |
| 54 |
inline bool operator==(const ConfigDescription& o) const { return compare(o) == 0; } |
| 55 |
inline bool operator!=(const ConfigDescription& o) const { return compare(o) != 0; } |
| 56 |
inline bool operator>=(const ConfigDescription& o) const { return compare(o) >= 0; } |
| 57 |
inline bool operator>(const ConfigDescription& o) const { return compare(o) > 0; } |
| 58 |
}; |
| 59 |
|
| 60 |
#endif |