diff --git a/src/Bridge/ASTVisitor.cs b/src/Bridge/ASTVisitor.cs index 7b3f844d..dfefa080 100644 --- a/src/Bridge/ASTVisitor.cs +++ b/src/Bridge/ASTVisitor.cs @@ -194,6 +194,11 @@ namespace Cxxi return true; } + public virtual bool VisitEvent(Event @event) + { + return true; + } + #endregion } } \ No newline at end of file diff --git a/src/Bridge/Class.cs b/src/Bridge/Class.cs index d9d45307..8e7d4c53 100644 --- a/src/Bridge/Class.cs +++ b/src/Bridge/Class.cs @@ -82,6 +82,7 @@ namespace Cxxi public List Fields; public List Properties; public List Methods; + public List Events; // True if the record is a POD (Plain Old Data) type. public bool IsPOD; @@ -107,6 +108,7 @@ namespace Cxxi Fields = new List(); Properties = new List(); Methods = new List(); + Events = new List(); NestedClasses = new List(); NestedEnums = new List(); IsAbstract = false; diff --git a/src/Bridge/Declaration.cs b/src/Bridge/Declaration.cs index 6c8e1c9a..45f1134d 100644 --- a/src/Bridge/Declaration.cs +++ b/src/Bridge/Declaration.cs @@ -138,5 +138,6 @@ namespace Cxxi T VisitFunctionTemplateDecl(FunctionTemplate template); T VisitMacroDefinition(MacroDefinition macro); T VisitNamespace(Namespace @namespace); + T VisitEvent(Event @event); } } \ No newline at end of file diff --git a/src/Bridge/Event.cs b/src/Bridge/Event.cs new file mode 100644 index 00000000..c0b674a7 --- /dev/null +++ b/src/Bridge/Event.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +namespace Cxxi +{ + public class Event : Declaration, ITypedDecl + { + public Event() + { + Parameters = new List(); + } + + public override T Visit(IDeclVisitor visitor) + { + return visitor.VisitEvent(this); + } + + public Type Type { get { return QualifiedType.Type; } } + public QualifiedType QualifiedType { get; set; } + + public List Parameters; + } +} diff --git a/src/Generator/Generators/CLI/CLIForwardRefeferencePrinter.cs b/src/Generator/Generators/CLI/CLIForwardRefeferencePrinter.cs index 64ed68af..9f7ce042 100644 --- a/src/Generator/Generators/CLI/CLIForwardRefeferencePrinter.cs +++ b/src/Generator/Generators/CLI/CLIForwardRefeferencePrinter.cs @@ -152,5 +152,10 @@ namespace Cxxi.Generators.CLI { throw new NotImplementedException(); } + + public bool VisitEvent(Event @event) + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 52816468..a9e9b4a4 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -221,6 +221,11 @@ namespace Cxxi.Generators.CLI throw new NotImplementedException(); } + public bool VisitEvent(Event @event) + { + throw new NotImplementedException(); + } + public bool VisitDelegate(Delegate @delegate) { throw new NotImplementedException(); @@ -543,6 +548,11 @@ namespace Cxxi.Generators.CLI throw new NotImplementedException(); } + public bool VisitEvent(Event @event) + { + throw new NotImplementedException(); + } + public bool VisitDelegate(Delegate @delegate) { throw new NotImplementedException(); diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs index a21d1902..d8f35e60 100644 --- a/src/Generator/Generators/CLI/CLITypePrinter.cs +++ b/src/Generator/Generators/CLI/CLITypePrinter.cs @@ -248,5 +248,10 @@ namespace Cxxi.Generators.CLI { throw new NotImplementedException(); } + + public string VisitEvent(Event @event) + { + throw new NotImplementedException(); + } } } diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index b18e9d54..b757f853 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -200,6 +200,11 @@ namespace Cxxi.Generators.CSharp throw new NotImplementedException(); } + public string VisitEvent(Event @event) + { + throw new NotImplementedException(); + } + public string GetArgumentsString(FunctionType function, bool hasNames) { var arguments = function.Arguments;