| {%- set class_name = union.name ~ "_Data" %} |
| |
| // static |
| {{class_name}}* {{class_name}}::New(mojo::internal::Buffer* buf) { |
| return new (buf->Allocate(sizeof({{class_name}}))) {{class_name}}(); |
| } |
| |
| // static |
| bool {{class_name}}::Validate(const void* data, |
| mojo::internal::BoundsChecker* bounds_checker) { |
| // TODO(azani): Implement validation. |
| return true; |
| } |
| |
| {{class_name}}::{{class_name}}() { |
| } |
| |
| void {{class_name}}::EncodePointersAndHandles( |
| std::vector<mojo::Handle>* handles) { |
| // TODO(azani): Implement pointers and handles. |
| } |
| |
| void {{class_name}}::DecodePointersAndHandles( |
| std::vector<mojo::Handle>* handles) { |
| // TODO(azani): Implement pointers and handles. |
| } |