struct_constructor_macros.h 715 B

123456789101112131415161718192021
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef IPC_STRUCT_CONSTRUCTOR_MACROS_H_
  5. #define IPC_STRUCT_CONSTRUCTOR_MACROS_H_
  6. // Null out all the macros that need nulling.
  7. #include "ipc/ipc_message_null_macros.h"
  8. // Set up so next include will generate constructors.
  9. #undef IPC_STRUCT_BEGIN_WITH_PARENT
  10. #undef IPC_STRUCT_MEMBER
  11. #undef IPC_STRUCT_END
  12. #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) \
  13. struct_name::struct_name() : parent()
  14. #define IPC_STRUCT_MEMBER(type, name, ...) , name(__VA_ARGS__)
  15. #define IPC_STRUCT_END() {}
  16. #endif // IPC_STRUCT_CONSTRUCTOR_MACROS_H_