diff options
Diffstat (limited to 'Runtime/Export/CppAttributes.cs')
-rw-r--r-- | Runtime/Export/CppAttributes.cs | 52 |
1 files changed, 52 insertions, 0 deletions
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 { } +} + |