blob: 647b7bbfdd23ac3a57904ff91a611fcd94335374 [file] [log] [blame]
Dianne Hackborne6b68032011-10-13 16:26:02 -07001//
2// Copyright 2011 The Android Open Source Project
3//
4// Build resource files from raw assets.
5//
6
7#ifndef RESOURCE_FILTER_H
8#define RESOURCE_FILTER_H
9
10#include "AaptAssets.h"
11
12/**
13 * Implements logic for parsing and handling "-c" and "--preferred-configurations"
14 * options.
15 */
16class ResourceFilter
17{
18public:
19 ResourceFilter() : mData(), mContainsPseudo(false) {}
20 status_t parse(const char* arg);
21 bool isEmpty() const;
22 bool match(int axis, uint32_t value) const;
23 bool match(int axis, const ResTable_config& config) const;
24 bool match(const ResTable_config& config) const;
25 const SortedVector<uint32_t>* configsForAxis(int axis) const;
26 inline bool containsPseudo() const { return mContainsPseudo; }
27
28private:
29 KeyedVector<int,SortedVector<uint32_t> > mData;
30 bool mContainsPseudo;
31};
32
33#endif