commit | b1d2ebc0d97936eade44db4bc8c43b6f49363c05 | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Tue Dec 20 17:18:07 2016 -0800 |
committer | Yifan Hong <elsk@google.com> | Tue Dec 20 17:18:07 2016 -0800 |
tree | 90e9f3389fab6e79041e22807434d0e090718091 | |
parent | 111489d0ebd63a928305ce9ed381180a0babac0a [diff] |
HIDL structs are declared final in C++. Interfaces are allowed to be extended, but structs are not. Emitting final keyword to prevent this. Also, operator== will be well defined, because otherwise, Parent p = ...; Child c = ...; p == c can behave differently than c == p. In Java, the class is already declared final. Test: compiles Change-Id: I04adef1bb4d05fe5764bcddca156bfc065ab0445
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0