Flutter Engine
macros.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 
5 #ifndef FLUTTER_FML_MACROS_H_
6 #define FLUTTER_FML_MACROS_H_
7 
8 #ifndef FML_USED_ON_EMBEDDER
9 
10 #define FML_EMBEDDER_ONLY [[deprecated]]
11 
12 #else // FML_USED_ON_EMBEDDER
13 
14 #define FML_EMBEDDER_ONLY
15 
16 #endif // FML_USED_ON_EMBEDDER
17 
18 #define FML_DISALLOW_COPY(TypeName) TypeName(const TypeName&) = delete
19 
20 #define FML_DISALLOW_ASSIGN(TypeName) \
21  TypeName& operator=(const TypeName&) = delete
22 
23 #define FML_DISALLOW_MOVE(TypeName) \
24  TypeName(TypeName&&) = delete; \
25  TypeName& operator=(TypeName&&) = delete
26 
27 #define FML_DISALLOW_COPY_AND_ASSIGN(TypeName) \
28  TypeName(const TypeName&) = delete; \
29  TypeName& operator=(const TypeName&) = delete
30 
31 #define FML_DISALLOW_COPY_ASSIGN_AND_MOVE(TypeName) \
32  TypeName(const TypeName&) = delete; \
33  TypeName(TypeName&&) = delete; \
34  TypeName& operator=(const TypeName&) = delete; \
35  TypeName& operator=(TypeName&&) = delete
36 
37 #define FML_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
38  TypeName() = delete; \
39  FML_DISALLOW_COPY_ASSIGN_AND_MOVE(TypeName)
40 
41 #endif // FLUTTER_FML_MACROS_H_