Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1069)

Unified Diff: mojo/public/bindings/generators/cpp_struct.template

Issue 52973003: mojo: break struct headers into headers and source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constant for header size Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/bindings/generators/cpp_struct.template
diff --git a/mojo/public/bindings/generators/cpp_struct.template b/mojo/public/bindings/generators/cpp_struct.template
deleted file mode 100644
index 507879284f3d1694bad96fbf2a76c0ae53a4d42a..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/generators/cpp_struct.template
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright $year The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef $header_guard
-#define $header_guard
-
-#include "mojo/public/bindings/lib/bindings.h"
-
-namespace $namespace {
-
-#pragma pack(push, 1)
-
-class $classname {
- public:
- static $classname* New(mojo::Buffer* buf) {
- return new (buf->Allocate(sizeof($classname))) $classname();
- }
-
-$setters
-
-$getters
-
- private:
- friend class mojo::internal::ObjectTraits<$classname>;
-
- $classname() {
- header_.num_bytes = sizeof(*this);
- header_.num_fields = $num_fields;
- }
- ~$classname(); // NOT IMPLEMENTED
-
- mojo::internal::StructHeader _header_;
-$fields
-};
-
-MOJO_COMPILE_ASSERT(sizeof($classname) == $size, bad_sizeof_$classname);
-
-#pragma pack(pop)
-
-} // namespace $namespace
-
-#endif // $header_guard
« no previous file with comments | « mojo/public/bindings/generators/cpp_interface.template ('k') | mojo/public/bindings/generators/module_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698