blob: 2f4de5adb0ab966f31edf3c4e5bc889b98749836 [file] [log] [blame]
Steven Morelandf1a35f72016-08-17 08:41:49 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef TYPE_DEF_H_
18#define TYPE_DEF_H_
19
20#include <android-base/macros.h>
21#include <android-base/logging.h>
22#include <string>
23#include <vector>
24#include "Declaration.h"
25
26namespace android {
27
28struct TypeDef : Declaration {
29 TypeDef(const std::string &name, Declaration* declaration);
30 ~TypeDef();
31
32 static std::string type() { return "typedef"; }
33 const std::string decType() const override { return type(); }
34
35 void generateSource(Formatter &out) const override;
36 void processContents(AST &ast) override;
37
38private:
39 Declaration* mDeclaration;
40
41 DISALLOW_COPY_AND_ASSIGN(TypeDef);
42};
43
44} // namespace android
45
46#endif // TYPE_DEF_H_