summaryrefslogtreecommitdiff
path: root/Runtime/Export/CppAttributes.cs
blob: 57c1e13eff8fd7eef2bdea47fdd9a5acc0d93401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;

namespace UnityEngine
{
	//TodoBC: make all these internal next time we do a breaking release
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)]
	internal class CppIncludeAttribute : Attribute
	{	
		public CppIncludeAttribute(string header) {}
	}

	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)]
	internal class CppDefineAttribute : Attribute
	{	
		public CppDefineAttribute(string symbol, string value) {}
	}

	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, AllowMultiple = false)]
	internal class CppBodyAttribute : Attribute
	{
		public CppBodyAttribute(string body) {}
	}

	[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
	internal class CppInvokeAttribute : Attribute
	{
	}

	[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
	internal class CppPropertyBodyAttribute : Attribute
	{
		public CppPropertyBodyAttribute(string getterBody, string setterBody) {}
		public CppPropertyBodyAttribute(string getterBody) {}
	}

	[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
	internal class CppPropertyAttribute : Attribute
	{
		public CppPropertyAttribute(string getter, string setter) { }
		public CppPropertyAttribute(string getter) { }
	}

	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property, AllowMultiple = false)]
	public class ThreadSafeAttribute : Attribute {}

	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property, AllowMultiple = false)]
	public class ConstructorSafeAttribute : Attribute {}

	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
	internal class WritableAttribute: Attribute { }
}