blob: c4dbd6361894ee86341ebf80d208fca56d51b168 [file] [log] [blame]
Andreas Huberc9410c72016-07-28 12:18:40 -07001#ifndef VECTOR_TYPE_H_
2
3#define VECTOR_TYPE_H_
4
5#include "Type.h"
6
7namespace android {
8
9struct VectorType : public Type {
10 VectorType(Type *elementType);
11
Andreas Huber881227d2016-08-02 14:20:21 -070012 std::string getCppType(StorageMode mode, std::string *extra) const override;
13
Andreas Huber2831d512016-08-15 09:33:47 -070014 std::string getJavaType() const override;
15 std::string getJavaSuffix() const override;
16
Andreas Huber881227d2016-08-02 14:20:21 -070017 void emitReaderWriter(
18 Formatter &out,
19 const std::string &name,
20 const std::string &parcelObj,
21 bool parcelObjIsPointer,
22 bool isReader,
23 ErrorMode mode) const override;
24
25 void emitReaderWriterEmbedded(
26 Formatter &out,
27 const std::string &name,
28 bool nameIsPointer,
29 const std::string &parcelObj,
30 bool parcelObjIsPointer,
31 bool isReader,
32 ErrorMode mode,
33 const std::string &parentName,
34 const std::string &offsetText) const override;
35
36 bool needsEmbeddedReadWrite() const override;
37 bool resultNeedsDeref() const override;
38
Zhuoyao Zhang5158db42016-08-10 10:25:20 -070039 status_t emitVtsTypeDeclarations(Formatter &out) const override;
40
Andreas Huber70a59e12016-08-16 12:57:01 -070041 bool isJavaCompatible() const override;
42
Zhuoyao Zhang5158db42016-08-10 10:25:20 -070043 private:
Andreas Huberc9410c72016-07-28 12:18:40 -070044 Type *mElementType;
45
46 DISALLOW_COPY_AND_ASSIGN(VectorType);
47};
48
49} // namespace android
50
51#endif // VECTOR_TYPE_H_
52