Browse Source

Added better support for properties.

pull/1/head
triton 12 years ago
parent
commit
9a2a0a5a5c
  1. 1
      src/Bridge/Declaration.cs
  2. 9
      src/Bridge/Property.cs
  3. 5
      src/Generator/Generators/CLI/CLIForwardReferencePrinter.cs
  4. 5
      src/Generator/Generators/CLI/CLITypePrinter.cs
  5. 5
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs
  6. 5
      src/Generator/Types/CppTypePrinter.cs

1
src/Bridge/Declaration.cs

@ -207,5 +207,6 @@ namespace CppSharp
T VisitMacroDefinition(MacroDefinition macro); T VisitMacroDefinition(MacroDefinition macro);
T VisitNamespace(Namespace @namespace); T VisitNamespace(Namespace @namespace);
T VisitEvent(Event @event); T VisitEvent(Event @event);
T VisitProperty(Property @property);
} }
} }

9
src/Bridge/Property.cs

@ -8,13 +8,12 @@ namespace CppSharp
/// </summary> /// </summary>
public class Property : Declaration public class Property : Declaration
{ {
public Property(string name, Declaration type) public Property()
{ {
Name = name;
Type = type;
} }
public Declaration Type public Type Type
{ {
get; get;
set; set;
@ -34,7 +33,7 @@ namespace CppSharp
public override T Visit<T>(IDeclVisitor<T> visitor) public override T Visit<T>(IDeclVisitor<T> visitor)
{ {
throw new NotImplementedException(); return visitor.VisitProperty(this);
} }
} }
} }

5
src/Generator/Generators/CLI/CLIForwardReferencePrinter.cs

@ -197,5 +197,10 @@ namespace CppSharp.Generators.CLI
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public bool VisitProperty(Property property)
{
throw new NotImplementedException();
}
} }
} }

5
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -324,6 +324,11 @@ namespace CppSharp.Generators.CLI
throw new NotImplementedException(); throw new NotImplementedException();
} }
public string VisitProperty(Property property)
{
throw new NotImplementedException();
}
public string ToString(Type type) public string ToString(Type type)
{ {
return type.Visit(this); return type.Visit(this);

5
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -365,6 +365,11 @@ namespace CppSharp.Generators.CSharp
throw new NotImplementedException(); throw new NotImplementedException();
} }
public CSharpTypePrinterResult VisitProperty(Property property)
{
throw new NotImplementedException();
}
public CSharpTypePrinterResult VisitParameters(IEnumerable<Parameter> @params, public CSharpTypePrinterResult VisitParameters(IEnumerable<Parameter> @params,
bool hasNames) bool hasNames)
{ {

5
src/Generator/Types/CppTypePrinter.cs

@ -242,6 +242,11 @@ namespace CppSharp.Types
throw new NotImplementedException(); throw new NotImplementedException();
} }
public string VisitProperty(Property property)
{
throw new NotImplementedException();
}
public string ToString(Type type) public string ToString(Type type)
{ {
return type.Visit(this); return type.Visit(this);

Loading…
Cancel
Save