The generated classes are suitable for using anyhow you see fit in your code. They do not need to be used exclusively with mojom method calls.
That makes sense. I guess the main issue I'm having is that the Ptr types handed to you in a mojom method implementation aren't copyable (although the comments in struct_ptr.h kind of imply otherwise,
On Mon, Jun 23, 2014 at 2:19 PM, 'Tim Steele' via mojo-dev <mojo...@chromium.org> wrote:
That makes sense. I guess the main issue I'm having is that the Ptr types handed to you in a mojom method implementation aren't copyable (although the comments in struct_ptr.h kind of imply otherwise,The comment doesn't mean that mojo::InlinedStructPtr<Foo> is copyable. Instead, it says that using mojo::InlinedStructPtr<Foo> requires that Foo to be copyable. (Because we use std::swap() with Foo, I think.)
That makes sense. I guess the main issue I'm having is that the Ptr types handed to you in a mojom method implementation aren't copyable (although the comments in struct_ptr.h kind of imply otherwise, so I thought maybe I was missing something?). So if you have something likeinterface MyService {Save(Point point)SavePoints(Point[] points)}you end up implementing a function like 'void SavePoints(mojo::Array<PointPtr> points)' and having to write the code to iterate and .Pass() one by one to an array or std::vector of your own.