Index: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
index 613c70d2dc8c23306a719e437acde5e93089629e..263bc9fff4c566fc4906e4c972c8b3ad346b9ef3 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
@@ -4,9 +4,6 @@ class {{struct.name}} { |
public: |
using Data_ = internal::{{struct.name}}_Data; |
- // TODO(yzshen): Remove Reader. |
- using Reader = {{struct.name}}_Reader; |
- |
{#--- Enums #} |
{%- for enum in struct.enums -%} |
{{enum_decl(enum)|indent(2)}} |
@@ -61,47 +58,3 @@ class {{struct.name}} { |
{%- endfor %} |
}; |
-{# TODO(yzshen): Redo the Reader interface. #} |
-{# NOTE: Generated Reader instances are intentionally cheap to copy and devoid |
- of heap allocations. They should stay this way. #} |
-// TODO(yzshen): Remove this. |
-class {{struct.name}}_Reader { |
- public: |
- {{struct.name}}_Reader(internal::{{struct.name}}_Data* data, |
- mojo::internal::SerializationContext* context); |
- |
-{%- for pf in struct.packed.packed_fields_in_ordinal_order %} |
-{%- set kind = pf.field.kind -%} |
-{%- set name = pf.field.name -%} |
-{%- if kind|is_nullable_kind %} |
- bool has_{{name}}() const; |
-{%- endif %} |
-{%- if kind|is_struct_kind and not kind|is_native_only_kind %} |
- {{kind|get_name_for_kind}}_Reader {{name}}() const; |
-{%- elif kind|is_string_kind %} |
- base::StringPiece {{name}}() const; |
-{%- elif kind|is_union_kind %} |
- // TODO(rockot): Support reading unions. ({{name}}() omitted) |
-{%- elif kind|is_object_kind %} |
- // TODO(rockot): Support reading other object kinds. ({{name}}() omitted) |
-{%- elif kind|is_any_handle_kind %} |
- // TODO(rockot): Support reading handles. ({{name}}() omitted) |
-{%- elif kind|is_interface_kind %} |
- // TODO(rockot): Support reading interfaces. ({{name}}() omitted) |
-{%- elif kind|is_interface_request_kind %} |
- // TODO(rockot): Support reading interface requests. ({{name}}() omitted) |
-{%- elif kind|is_associated_kind %} |
- // TODO(rockot): Support reading associated kinds. ({{name}}() omitted) |
-{%- elif kind|is_enum_kind %} |
- {{kind|cpp_result_type}} {{name}}() const { |
- return static_cast<{{kind|cpp_result_type}}>(data_->{{name}}); |
- } |
-{%- else %} |
- {{kind|cpp_result_type}} {{name}}() const { return data_->{{name}}; } |
-{%- endif %} |
-{%- endfor %} |
- |
- private: |
- internal::{{struct.name}}_Data* data_; |
- mojo::internal::SerializationContext* context_; |
-}; |