Lines Matching refs:type

33 // Special reserved type names.
73 // CanonicalName() returns the canonical AIDL type, with packages.
102 // Add a container type to this namespace. Returns false only
106 // Returns true iff this has a type for |import|.
112 // Returns a pointer to a type corresponding to |raw_type| or nullptr
113 // if this is an invalid return type.
119 // Returns a pointer to a type corresponding to |a| or nullptr if |a|
120 // has an invalid argument type.
127 // Returns a pointer to a type corresponding to |interface|.
136 const AidlType& type, std::string* error_msg,
149 // Get a pointer to an existing type. Searches first by fully-qualified
153 // Find a type by its |name|. If |name| refers to a container type (e.g.
176 bool Add(const T* type);
179 // Returns true iff the name can be canonicalized to a container type.
185 // Returns true if this is a container type, rather than a normal type.
189 const AidlType& type, std::string* error_msg,
198 bool LanguageTypeNamespace<T>::Add(const T* type) {
199 const T* existing = FindTypeByCanonicalName(type->CanonicalName());
201 types_.emplace_back(type);
206 LOG(ERROR) << type->DeclFile() << ":" << type->DeclLine()
208 << type->CanonicalName();
212 if (type->Kind() != existing->Kind()) {
213 LOG(ERROR) << type->DeclFile() << ":" << type->DeclLine()
214 << " attempt to redefine " << type->CanonicalName()
215 << " as " << type->HumanReadableKind();
254 for (const auto& type : types_) {
257 if (type->CanonicalName() == name) {
258 ret = type.get();
262 if (type->ShortName() == name) {
263 ret = type.get();
294 // We only support two types right now and this type is one of them.
340 LOG(ERROR) << "Invalid template type '" << name << "'";
350 // given a non-canonical name for non-compound type (i.e. not another
392 const ValidatableType* type = Find(aidl_type);
393 if (type == nullptr) {
394 *error_msg = "unknown type";
400 *error_msg = "void type cannot be an array";
405 *error_msg = "void type cannot be annotated";
409 return type;
412 // No type may be annotated with both these annotations.
424 // type. However, for non-compound types (i.e. those not in a container) we
426 if (IsContainerType(type->CanonicalName())) {
436 *error_msg = StringPrintf("type '%s' may not be annotated as %s.",
443 type = FindTypeByCanonicalName(kUtf8StringCanonicalName);
445 type = FindTypeByCanonicalName(kUtf8InCppStringCanonicalName);
448 // One of our UTF8 transforms made type null
449 if (type == nullptr) {
458 if (!type->CanWriteToParcel()) {
459 *error_msg = "type cannot be marshalled";
464 type = type->ArrayType();
465 if (!type) {
466 *error_msg = StringPrintf("type '%s' cannot be an array",
473 const ValidatableType* nullableType = type->NullableType();
481 type = type->NullableType();
482 if (!type) {
483 *error_msg = StringPrintf("type '%s%s' cannot be marked as possibly null",
490 return type;