From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Export/CppAttributes.cs | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Runtime/Export/CppAttributes.cs (limited to 'Runtime/Export/CppAttributes.cs') diff --git a/Runtime/Export/CppAttributes.cs b/Runtime/Export/CppAttributes.cs new file mode 100644 index 0000000..57c1e13 --- /dev/null +++ b/Runtime/Export/CppAttributes.cs @@ -0,0 +1,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 { } +} + -- cgit v1.1-26-g67d0