blob: bbdacd79613fec942b307b72c57b43917abd8d67 [file] [log] [blame]
Andreas Huberc9410c72016-07-28 12:18:40 -07001#include "TypeDef.h"
2
3#include "Formatter.h"
4
Andreas Huber8d3ac0c2016-08-04 14:49:23 -07005#include <android-base/logging.h>
6
Andreas Huberc9410c72016-07-28 12:18:40 -07007namespace android {
8
Andreas Huber31629bc2016-08-03 09:06:40 -07009TypeDef::TypeDef(Type *type)
10 : NamedType(),
Andreas Huberc9410c72016-07-28 12:18:40 -070011 mReferencedType(type) {
12}
13
Andreas Huber737080b2016-08-02 15:38:04 -070014const ScalarType *TypeDef::resolveToScalarType() const {
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070015 CHECK(!"Should not be here");
16 return NULL;
Andreas Huber737080b2016-08-02 15:38:04 -070017}
18
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070019Type *TypeDef::referencedType() const {
Andreas Huberc9410c72016-07-28 12:18:40 -070020 return mReferencedType;
21}
22
Andreas Huber5a545442016-08-03 10:44:56 -070023bool TypeDef::isInterface() const {
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070024 CHECK(!"Should not be here");
25 return false;
Andreas Huber5a545442016-08-03 10:44:56 -070026}
27
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070028bool TypeDef::isEnum() const {
29 CHECK(!"Should not be here");
30 return false;
Andreas Huber881227d2016-08-02 14:20:21 -070031}
32
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070033bool TypeDef::isTypeDef() const {
34 return true;
Andreas Huber881227d2016-08-02 14:20:21 -070035}
36
Andreas Huber2831d512016-08-15 09:33:47 -070037std::string TypeDef::getJavaType() const {
38 CHECK(!"Should not be here");
39 return std::string();
40}
41
Andreas Huberbb797e42016-08-03 12:53:02 -070042bool TypeDef::needsEmbeddedReadWrite() const {
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070043 CHECK(!"Should not be here");
44 return false;
Andreas Huberbb797e42016-08-03 12:53:02 -070045}
46
47bool TypeDef::resultNeedsDeref() const {
Andreas Huber8d3ac0c2016-08-04 14:49:23 -070048 CHECK(!"Should not be here");
49 return false;
Andreas Huberbb797e42016-08-03 12:53:02 -070050}
51
Andreas Huberc9410c72016-07-28 12:18:40 -070052} // namespace android
53