Andreas Huber | 5345ec2 | 2016-07-29 13:33:27 -0700 | [diff] [blame] | 1 | #ifndef COORDINATOR_H_ |
| 2 | |
| 3 | #define COORDINATOR_H_ |
| 4 | |
| 5 | #include <android-base/macros.h> |
| 6 | #include <string> |
| 7 | #include <utils/KeyedVector.h> |
| 8 | |
| 9 | namespace android { |
| 10 | |
| 11 | struct AST; |
| 12 | struct FQName; |
| 13 | struct Type; |
| 14 | |
| 15 | struct Coordinator { |
Andreas Huber | dc98133 | 2016-07-29 15:46:54 -0700 | [diff] [blame] | 16 | Coordinator(const std::string &interfacesPath); |
Andreas Huber | 5345ec2 | 2016-07-29 13:33:27 -0700 | [diff] [blame] | 17 | ~Coordinator(); |
| 18 | |
Andreas Huber | 68f2459 | 2016-07-29 14:53:48 -0700 | [diff] [blame] | 19 | AST *parse(const FQName &fqName); |
Andreas Huber | 5345ec2 | 2016-07-29 13:33:27 -0700 | [diff] [blame] | 20 | |
| 21 | Type *lookupType(const FQName &fqName) const; |
| 22 | |
Andreas Huber | 881227d | 2016-08-02 14:20:21 -0700 | [diff] [blame^] | 23 | std::string getPackagePath( |
| 24 | const FQName &fqName, bool relative = false) const; |
Andreas Huber | 5345ec2 | 2016-07-29 13:33:27 -0700 | [diff] [blame] | 25 | |
| 26 | private: |
Andreas Huber | dc98133 | 2016-07-29 15:46:54 -0700 | [diff] [blame] | 27 | std::string mInterfacesPath; |
Andreas Huber | 68f2459 | 2016-07-29 14:53:48 -0700 | [diff] [blame] | 28 | KeyedVector<FQName, AST *> mCache; |
Andreas Huber | 5345ec2 | 2016-07-29 13:33:27 -0700 | [diff] [blame] | 29 | |
| 30 | DISALLOW_COPY_AND_ASSIGN(Coordinator); |
| 31 | }; |
| 32 | |
| 33 | } // namespace android |
| 34 | |
| 35 | #endif // COORDINATOR_H_ |