History log of /system/tools/aidl/type_cpp.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
041c8d7ad2f9660a44e6ebc4f173b125b35f63f0 18-Aug-2016 Christopher Wiley <wiley@google.com> Consolidate array logic

Move all formation of array related types to a single class, and then
use that class everywhere.

Bug: 30836680
Test: all tests pass against bullhead on aosp/master

Change-Id: Iae7997cfa8eccf5a6f377f22b62fc2afb85f648a
/system/tools/aidl/type_cpp.h
f05cc26630828c848e46ea0e584dbdd2541ea723 27-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy performance warnings.

* Use const reference type for parameters, local variables,
and for-loop index variables to avoid unnecessary copy.

Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: Ia09c58becfa3980faed24aa7eddeb520207ca259
Test: build with WITH_TIDY=1
/system/tools/aidl/type_cpp.h
c5afb404a8e71475993f70239df09209fa428d25 01-Mar-2016 Casey Dahlin <sadmac@google.com> Propagate interface annotations to methods

Change-Id: I85f9686e4b5df7df0d9fb77e6a1b50a93ff3e2d7
Test: Unit tests pass
Bug: 26911508
/system/tools/aidl/type_cpp.h
5d9bc936e45b5ffe487b1807b4a028dc3dc4df9f 01-Feb-2016 Christopher Wiley <wiley@google.com> Support @utf8InCpp List<String>

Bug: 26729450
Change-Id: I2ac61aadef4c3ff0527fe68b3a104f72821dd2c4
Test: unit, integration tests pass
/system/tools/aidl/type_cpp.h
57dbe24bcb8f4509a876e8445c78d9504d7e616a 04-Dec-2015 Casey Dahlin <sadmac@google.com> Add support for @nullable annotation

Using this annotation will now cause C++ types to be wrapped in
unique_ptr, and by extension be capable of handling null values.

Support extends to all arrays, Strings, Lists, and Parcelables.

Change-Id: I148a3666279c2badcba097b8925e55f8fcecb9c2
Test: Unit tests pass
Bug: 25969194
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
a2f77c40fb6287895e2030055c0104eac0a1f73a 02-Dec-2015 Casey Dahlin <sadmac@google.com> Make array types their own type object

We now offer much simpler functionality from type objects. In addition,
we attach type objects to the appropriate AST nodes, so generators can
just read and trust the model.

Test: Unit tests pass
Bug: 25939691
Change-Id: Id274a933c7bd4f1e5d6daf2b89a64b3553a37069
/system/tools/aidl/type_cpp.h
0a62067f35e957493bc37c4b42dfdcfc16353831 04-Dec-2015 Elliott Hughes <enh@google.com> Track base/ -> android-base/ change.

Change-Id: I02b64b42c17d248c5fb2c4de4b0778a441e018e3
/system/tools/aidl/type_cpp.h
c1f39b4ea30e7313eeb7f3d3fd5ec66ba00f2bb5 24-Nov-2015 Casey Dahlin <sadmac@google.com> Refactor top-level AST nodes v2

The previous version of this patch was tainted by parts of another
change to remove a memory leak, and ended up trying to treat a bare
pointer like a unique_ptr in a few places. This combines both changes in
to one.

Previous patch was b696437d842d59c0cc26411fa3d71cb91897c572:

We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.

Change-Id: I77fbb1d8448343bd02484d896289a514d636df25
Test: Unit tests pass
Bug: none
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
eedb29f028af472b90fa528c84d0d89100346e5c 24-Nov-2015 Bart Sears <bsears@google.com> Revert "Refactor top-level AST nodes"

This reverts commit b696437d842d59c0cc26411fa3d71cb91897c572.

Change-Id: Id5c716536299cfad4d13c5891d9be8b1fa2aceae
/system/tools/aidl/type_cpp.h
b696437d842d59c0cc26411fa3d71cb91897c572 17-Nov-2015 Casey Dahlin <sadmac@google.com> Refactor top-level AST nodes

We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.

Change-Id: Ia15ace677f79a153f8ebfad84ed43b08f4a3685f
Test: unit and integration tests pass
Bug: 25479378
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
b7014328e383c1e45a1687499eef09decd68d044 06-Nov-2015 Christopher Wiley <wiley@google.com> Mark cpp::Type::GetHeaders() as virtual

We override this method and then call it like a virtual method.
It should actually be a virtual method.

Bug: None
Test: Compiles, unittests pass

Change-Id: Ic8e43cf3b343528a4453cdc8bc55db165b66a70e
/system/tools/aidl/type_cpp.h
7ecd69f2cc3c31cf569840e9c2d53ed352328d18 03-Nov-2015 Casey Dahlin <sadmac@google.com> Support List<IBinder> type

Change-Id: Ia84cf258702b161f3e7857925b8c2be7b1dfd60e
Test: Expanded unit and integration tests pass
Bug: 24470786
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
56c9bf3c4fb731d5557427667f13f963fa5ef0f7 30-Oct-2015 Christopher Wiley <wiley@google.com> Add support for List<String>

Bug: 24470786
Test: expanded unit tests pass, integration test passes

Change-Id: Ie85e43c04e214315f42a9f1ae83e6b4c67c2f081
/system/tools/aidl/type_cpp.h
5679952c38925a54b75b087068887002e57f3174 31-Oct-2015 Christopher Wiley <wiley@google.com> Don't call virtual methods in TypeNamespace constructors

While probably safe in this particular context because of this specific
class structure, it is bad practice to call virtual methods in constructors.

Bug: None
Test: unittests continue to pass

Change-Id: I3c9a435efd89a2c2bd7ce576aed585b8ab766bda
/system/tools/aidl/type_cpp.h
09af469476ea6d187b52f22113d3b168a887100c 30-Oct-2015 Christopher Wiley <wiley@google.com> Consolidate type checking logic

Move logic used to check types used in AIDL into a common superclass
of the language specific type namespaces. Add a templated
LanguageTypeNamespace class to allow language specific type reasoning
while sharing an implementation.

Move functionality important to the the AIDL type checking into
ValidatableType and out of the Java and C++ subclasses.

Removed GenericType from the Java type system because it messed around
with the canonical name for a type post construction, while adding
absolutely no value of its own.

Bug: 24470786
Test: unittests continue to pass, full build of android succeeds.

Change-Id: Ic03eb5d770c7f51abbde87c20a9b7287ce6a277e
/system/tools/aidl/type_cpp.h
8a6579721e9390d8ed2cb49e0146a025194799f6 29-Oct-2015 Christopher Wiley <wiley@google.com> Add support for AIDL types with multiple C++ headers

We'll need this in particular for List<T> AIDL types.
Refactoring this revealed that we were already doing
this improperly for returned array types.

Bug: 24470786
Change-Id: I4b1f8e410704b75100aecb4010d6672df3c7ae31
Test: unittests continue to pass
/system/tools/aidl/type_cpp.h
389781f56bb6b4363e9eb03acf915ba297f607d5 22-Oct-2015 Casey Dahlin <sadmac@google.com> Add support for passing binders in C++

Change-Id: I6f7003b4c320897bada8f225943a50825d6c26e7
Test: Unit tests (several new), Integration tests (several new)
Bug: 23600713
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
b8e49a407e8648afb28ca9bad4bf8434224f0b18 27-Oct-2015 Christopher Wiley <wiley@google.com> Add PrimitiveType

Explicitly check if the type in question is a primitive and should be
passed by const reference. This makes it obvious that String16
instances are being passed by value.

Bug: 24470786
Test: unit tests, integration tests continue to pass

Change-Id: Ie822d89413aa8b87bc92765c73821edfcba4197c
/system/tools/aidl/type_cpp.h
cd8e89795c331e3e5c75e92d7c7804f389804e08 26-Oct-2015 Christopher Wiley <wiley@google.com> Consolidate container canonicalization logic

We need this same logic while piecing together C++ types because
we still have to reason about the type names used in AIDL.

Bug: 24470786
Test: unittests pass, integration tests pass

Change-Id: Ief2d531e1dace5e5e299f3aa246a870eb9c932c6
/system/tools/aidl/type_cpp.h
b0966619850093e117104dc34d8a6ae4c56ea3ff 20-Oct-2015 Casey Dahlin <sadmac@google.com> Add support for array types

Change-Id: Ibd7ba063a2f957950ca7f4462a0d6e600f12c00f
Test: Unit tests (including several new ones)
Bug: 25012838
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
b656a3b1954bbe4b548a3c11274c833bbca35935 16-Oct-2015 Christopher Wiley <wiley@google.com> Generate C++ in namespaces based on package

Bug: 24862770
Test: unittests

Change-Id: Iaa3b4716ca340ade745208a2f2efc057205d0f1d
/system/tools/aidl/type_cpp.h
ce776cfc9560ee541464a23fb64ecd74e442b96f 16-Oct-2015 Casey Dahlin <sadmac@google.com> Add support for missing basic types to AIDL

Change-Id: I7b9f98bcfc25ace83e23c9027fbd0655c255fdfd
Test: unit tests
Bug: 24938226
Bug: 24472672
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
ad3392747003a30928da6cd206e41f66398c2062 06-Oct-2015 Christopher Wiley <wiley@google.com> Generate server side .cpp file

Bug: 24505488
Test: Unit tests, wrote some more

Change-Id: I89d18f0bb612f3a3ffadac41c6ff32b67d6552b7
/system/tools/aidl/type_cpp.h
1ae2bc56d20fe0e19262f2721abc338662fa6e30 08-Oct-2015 Casey Dahlin <sadmac@google.com> Convert document item structs to classes

This is the least-complete first run for any of these structs, but this
shift is going to be particularly gnarly, so we need to be
extra-incremental about it.

Change-Id: I7295add8b9a1291f229743f8c36d941569a16ab6
Test: unit tests
Bug: 24410295
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/type_cpp.h
a8a2dc0ad258c1390c5d55b302774df357450caf 29-Sep-2015 Christopher Wiley <wiley@google.com> Add C++ TypeNamespace and basic primtive types

Bug: 24472672
Test: Unittests pass

Change-Id: I863bb4c5b37865d9ee57c91b28e563c68d113458
/system/tools/aidl/type_cpp.h