Browse Source

Sexy new name, cxxi

pull/1/head
Alex Corrado 14 years ago
parent
commit
891d799cbc
  1. 4
      README
  2. 6
      configure.ac
  3. 4
      cxxi.sln
  4. 1
      examples/Hello/Hello.cs
  5. 2
      examples/Hello/Makefile.am
  6. 2
      src/Makefile.am
  7. 26
      src/Mono.Cxxi/Abi/CppAbi.cs
  8. 8
      src/Mono.Cxxi/Abi/Impl/ItaniumAbi.cs
  9. 7
      src/Mono.Cxxi/Abi/Impl/ItaniumTypeInfo.cs
  10. 10
      src/Mono.Cxxi/Abi/Impl/MsvcAbi.cs
  11. 6
      src/Mono.Cxxi/Abi/Impl/VirtualOnlyAbi.cs
  12. 7
      src/Mono.Cxxi/Abi/MethodType.cs
  13. 6
      src/Mono.Cxxi/Abi/VTable.cs
  14. 8
      src/Mono.Cxxi/AssemblyInfo.cs
  15. 8
      src/Mono.Cxxi/Attributes.cs
  16. 6
      src/Mono.Cxxi/CppField.cs
  17. 8
      src/Mono.Cxxi/CppInstancePtr.cs
  18. 8
      src/Mono.Cxxi/CppLibrary.cs
  19. 8
      src/Mono.Cxxi/CppModifiers.cs
  20. 4
      src/Mono.Cxxi/CppObjectMarshaler.cs
  21. 8
      src/Mono.Cxxi/CppType.cs
  22. 10
      src/Mono.Cxxi/CppTypeInfo.cs
  23. 8
      src/Mono.Cxxi/Interfaces.cs
  24. 17
      src/Mono.Cxxi/Makefile.am
  25. 18
      src/Mono.Cxxi/Mono.Cxxi.csproj
  26. 6
      src/Mono.Cxxi/Util/DelegateTypeCache.cs
  27. 6
      src/Mono.Cxxi/Util/IEnumerableTransform.cs
  28. 6
      src/Mono.Cxxi/Util/LazyGeneratedList.cs
  29. 8
      src/Mono.Cxxi/Util/MethodSignature.cs
  30. 6
      src/Mono.Cxxi/Util/ReflectionHelper.cs
  31. 6
      src/Mono.Cxxi/mono.cxxi.pc.in
  32. 6
      src/Mono.VisualC.Interop/mono.visualc.interop.pc.in
  33. 2
      src/generator/Field.cs
  34. 2
      src/generator/Generator.cs
  35. 15
      src/generator/Makefile.am
  36. 2
      src/generator/Method.cs
  37. 2
      src/generator/Parameter.cs
  38. 2
      src/generator/Property.cs
  39. 4
      src/generator/Templates/CSharp/CSharpClass.cs
  40. 4
      src/generator/Templates/CSharp/CSharpClass.tt
  41. 2
      src/generator/Templates/CSharp/CSharpLibs.cs
  42. 2
      src/generator/Templates/CSharp/CSharpLibs.tt
  43. 4
      src/generator/generator.csproj
  44. 3
      tests/Makefile.am
  45. 51
      tests/Support/CppMockObject.cs
  46. 2
      tests/Support/CppNUnitAsserts.cs
  47. 4
      tests/Tests.csproj

4
README

@ -2,14 +2,14 @@ Directory structure
------------------- -------------------
src/ src/
Mono.VisualC.Interop Mono.Cxxi
The runtime library The runtime library
generator generator
The binding generator The binding generator
qt qt
Auto generated Qt bindings + test program Auto generated Qt bindings + test program
tests2/ tests/
Regression tests Regression tests
examples/ examples/

6
configure.ac

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.54]) AC_PREREQ([2.54])
AC_INIT([CPPInterop], [0.99.1]) AC_INIT([Mono.Cxxi], [0.99.1])
AM_INIT_AUTOMAKE([foreign]) AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
@ -57,8 +57,8 @@ dnl package checks, per config
AC_CONFIG_FILES([ AC_CONFIG_FILES([
src/Mono.VisualC.Interop/mono.visualc.interop.pc src/Mono.Cxxi/mono.cxxi.pc
src/Mono.VisualC.Interop/Makefile src/Mono.Cxxi/Makefile
src/QtBindings/qtbindings.pc src/QtBindings/qtbindings.pc
src/QtBindings/Makefile src/QtBindings/Makefile
src/generator/generator src/generator/generator

4
CPPInterop.sln → cxxi.sln

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.VisualC.Interop", "src\Mono.VisualC.Interop\Mono.VisualC.Interop.csproj", "{4A864586-93C5-4DC1-8A80-F094A88506D7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cxxi", "src\Mono.Cxxi\Mono.Cxxi.csproj", "{4A864586-93C5-4DC1-8A80-F094A88506D7}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{3C290CBE-CA39-47F6-B3A0-ACD16C5A38C8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{3C290CBE-CA39-47F6-B3A0-ACD16C5A38C8}"
EndProject EndProject

1
examples/Hello/Hello.cs

@ -1,5 +1,4 @@
using System; using System;
using Mono.VisualC.Interop;
public class HelloExample public class HelloExample
{ {

2
examples/Hello/Makefile.am

@ -10,7 +10,7 @@ BUILD_DIR=$(top_srcdir)/bin/Release
endif endif
INTEROP_DLL = \ INTEROP_DLL = \
$(BUILD_DIR)/Mono.VisualC.Interop.dll $(BUILD_DIR)/Mono.Cxxi.dll
HELLO_EXE = \ HELLO_EXE = \
$(BUILD_DIR)/Hello.exe $(BUILD_DIR)/Hello.exe

2
src/Makefile.am

@ -1,2 +1,2 @@
SUBDIRS = Mono.VisualC.Interop generator SUBDIRS = Mono.Cxxi generator

26
src/Mono.VisualC.Interop/ABI/CppAbi.cs → src/Mono.Cxxi/Abi/CppAbi.cs

@ -1,11 +1,29 @@
// //
// Mono.VisualC.Interop.ABI.CppAbi.cs: Represents an abstract C++ ABI // Mono.Cxxi.Abi.CppAbi.cs: Represents an abstract C++ ABI
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System; using System;
using System.Linq; using System.Linq;
@ -16,9 +34,9 @@ using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Diagnostics; using System.Diagnostics;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
//FIXME: Exception handling, operator overloading etc. //FIXME: Exception handling, operator overloading etc.
//FIXME: Allow interface to override default calling convention //FIXME: Allow interface to override default calling convention

8
src/Mono.VisualC.Interop/ABI/Impl/ItaniumAbi.cs → src/Mono.Cxxi/Abi/Impl/ItaniumAbi.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.ABI.ItaniumAbi.cs: An implementation of the Itanium C++ ABI // Mono.Cxxi.Abi.ItaniumAbi.cs: An implementation of the Itanium C++ ABI
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -34,9 +34,9 @@ using System.Reflection.Emit;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
public class ItaniumAbi : CppAbi { public class ItaniumAbi : CppAbi {
public static readonly ItaniumAbi Instance = new ItaniumAbi (); public static readonly ItaniumAbi Instance = new ItaniumAbi ();

7
src/Mono.VisualC.Interop/ABI/Impl/ItaniumTypeInfo.cs → src/Mono.Cxxi/Abi/Impl/ItaniumTypeInfo.cs

@ -1,3 +1,6 @@
//
// Mono.Cxxi.Abi.ItaniumTypeInfo.cs: An implementation of the Itanium C++ ABI
//
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// //
@ -28,9 +31,9 @@ using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Reflection; using System.Reflection;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
public class ItaniumTypeInfo : CppTypeInfo { public class ItaniumTypeInfo : CppTypeInfo {
public ItaniumTypeInfo (ItaniumAbi abi, IEnumerable<PInvokeSignature> virtualMethods, Type nativeLayout, Type wrapperType) public ItaniumTypeInfo (ItaniumAbi abi, IEnumerable<PInvokeSignature> virtualMethods, Type nativeLayout, Type wrapperType)

10
src/Mono.VisualC.Interop/ABI/Impl/MsvcAbi.cs → src/Mono.Cxxi/Abi/Impl/MsvcAbi.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.ABI.MsvcAbi.cs: An implementation of the Microsoft Visual C++ ABI // Mono.Cxxi.Abi.MsvcAbi.cs: An implementation of the Microsoft Visual C++ ABI
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,10 +33,10 @@ using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Mono.VisualC.Interop; using Mono.Cxxi;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
// FIXME: No 64-bit support // FIXME: No 64-bit support
public class MsvcAbi : CppAbi { public class MsvcAbi : CppAbi {

6
src/Mono.VisualC.Interop/ABI/Impl/VirtualOnlyAbi.cs → src/Mono.Cxxi/Abi/Impl/VirtualOnlyAbi.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.ABI.VirtualOnlyAbi.cs: A generalized C++ ABI that only supports virtual methods // Mono.Cxxi.Abi.VirtualOnlyAbi.cs: A generalized C++ ABI that only supports virtual methods
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -31,7 +31,7 @@ using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
public class VirtualOnlyAbi : CppAbi { public class VirtualOnlyAbi : CppAbi {

7
src/Mono.VisualC.Interop/ABI/MethodType.cs → src/Mono.Cxxi/Abi/MethodType.cs

@ -1,8 +1,11 @@
//
// Mono.Cxxi.Abi.MethodType.cs: Method annotation for IL codegen
//
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -24,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System; using System;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi.Abi {
public enum MethodType { public enum MethodType {
NoOp, NoOp,
NotImplemented, NotImplemented,

6
src/Mono.VisualC.Interop/ABI/VTable.cs → src/Mono.Cxxi/Abi/VTable.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.ABI.VTable.cs: abstract vtable // Mono.Cxxi.Abi.VTable.cs: Managed VTable Implementation
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -34,7 +34,7 @@ using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
// TODO: RTTI .. support virtual inheritance // TODO: RTTI .. support virtual inheritance

8
src/Mono.VisualC.Interop/AssemblyInfo.cs → src/Mono.Cxxi/AssemblyInfo.cs

@ -2,7 +2,7 @@
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -23,10 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// AssemblyInfo.cs created with MonoDevelop
// User: alex at 21:36 03/13/2009
//
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -34,7 +30,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes. // Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project. // Change them to the values specific to your project.
[assembly: AssemblyTitle("Mono.VisualC.Interop")] [assembly: AssemblyTitle("Mono.Cxxi")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]

8
src/Mono.VisualC.Interop/Attributes.cs → src/Mono.Cxxi/Attributes.cs

@ -1,5 +1,5 @@
// //
// Mono.VisualC.Interop.Attributes.cs // Mono.Cxxi.Attributes.cs
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
@ -11,7 +11,7 @@ using System;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
#region Interface method attributes #region Interface method attributes
@ -99,8 +99,8 @@ namespace Mono.VisualC.Interop {
#endregion #endregion
} }
namespace Mono.VisualC.Interop.ABI { namespace Mono.Cxxi.Abi {
using Mono.VisualC.Interop; using Mono.Cxxi;
public partial class CppAbi { public partial class CppAbi {

6
src/Mono.VisualC.Interop/CppField.cs → src/Mono.Cxxi/CppField.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppField.cs: Represents a field in a native C++ object // Mono.Cxxi.CppField.cs: Represents a field in a native C++ object
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -29,7 +29,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
public class CppField<T> { public class CppField<T> {
private int fieldOffset; private int fieldOffset;

8
src/Mono.VisualC.Interop/CppInstancePtr.cs → src/Mono.Cxxi/CppInstancePtr.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppInstancePtr.cs: Represents a pointer to a native C++ instance // Mono.Cxxi.CppInstancePtr.cs: Represents a pointer to a native C++ instance
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -32,9 +32,9 @@ using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Diagnostics; using System.Diagnostics;
using Mono.VisualC.Interop.ABI; using Mono.Cxxi.Abi;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
public struct CppInstancePtr : ICppObject { public struct CppInstancePtr : ICppObject {
private IntPtr ptr, native_vtptr; private IntPtr ptr, native_vtptr;

8
src/Mono.VisualC.Interop/CppLibrary.cs → src/Mono.Cxxi/CppLibrary.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppLibrary.cs: Represents a native C++ library for interop // Mono.Cxxi.CppLibrary.cs: Represents a native C++ library for interop
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -35,9 +35,9 @@ using System.Runtime.InteropServices;
using System.Reflection; using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
using Mono.VisualC.Interop.ABI; using Mono.Cxxi.Abi;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
public enum InlineMethods { public enum InlineMethods {

8
src/Mono.VisualC.Interop/CppModifiers.cs → src/Mono.Cxxi/CppModifiers.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppModifiers.cs: Abstracts a C++ type modifiers // Mono.Cxxi.CppModifiers.cs: Abstracts a C++ type modifiers
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -31,9 +31,9 @@ using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
public abstract class CppModifiers { public abstract class CppModifiers {
#pragma warning disable 0414 #pragma warning disable 0414

4
src/Mono.VisualC.Interop/CppObjectMarshaler.cs → src/Mono.Cxxi/CppObjectMarshaler.cs

@ -2,7 +2,7 @@
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -27,7 +27,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
public class CppObjectMarshaler : ICustomMarshaler { public class CppObjectMarshaler : ICustomMarshaler {
private static CppObjectMarshaler marshaler = null; private static CppObjectMarshaler marshaler = null;
private CppObjectMarshaler () { private CppObjectMarshaler () {

8
src/Mono.VisualC.Interop/CppType.cs → src/Mono.Cxxi/CppType.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppType.cs: Abstracts a C++ type declaration // Mono.Cxxi.CppType.cs: Abstracts a C++ type declaration
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,9 +33,9 @@ using System.Text.RegularExpressions;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
// These can be used anywhere a CppType could be used. // These can be used anywhere a CppType could be used.
public enum CppTypes { public enum CppTypes {

10
src/Mono.VisualC.Interop/CppTypeInfo.cs → src/Mono.Cxxi/CppTypeInfo.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.CppTypeInfo.cs: Type metadata for C++ types // Mono.Cxxi.CppTypeInfo.cs: Type metadata for C++ types
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -34,10 +34,10 @@ using System.Collections.ObjectModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Mono.VisualC.Interop.ABI; using Mono.Cxxi.Abi;
using Mono.VisualC.Interop.Util; using Mono.Cxxi.Util;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
// NOTE: As AddBase is called, properties change. // NOTE: As AddBase is called, properties change.
// TypeComplete indicates when the dust has settled. // TypeComplete indicates when the dust has settled.

8
src/Mono.VisualC.Interop/Interfaces.cs → src/Mono.Cxxi/Interfaces.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Interfaces.cs // Mono.Cxxi.Interfaces.cs
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -27,9 +27,9 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System; using System;
using Mono.VisualC.Interop.ABI; using Mono.Cxxi.Abi;
namespace Mono.VisualC.Interop { namespace Mono.Cxxi {
// The contract for ICppObject requires implementations to have the following constructors: // The contract for ICppObject requires implementations to have the following constructors:
// + A public constructor that takes CppInstancePtr (native constructor) // + A public constructor that takes CppInstancePtr (native constructor)

17
src/Mono.VisualC.Interop/Makefile.am → src/Mono.Cxxi/Makefile.am

@ -6,11 +6,10 @@ ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG" ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
BUILD_DIR = $(top_srcdir)/bin/Debug BUILD_DIR = $(top_srcdir)/bin/Debug
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Interop.dll ASSEMBLY = $(BUILD_DIR)/Mono.Cxxi.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb ASSEMBLY_MDB = $(ASSEMBLY).mdb
MONO_VISUALC_INTEROP_DLL_MDB_SOURCE=bin/Debug/Mono.VisualC.Interop.dll.mdb MONO_CXXI_DLL_MDB=$(BUILD_DIR)/Mono.Cxxi.dll.mdb
MONO_VISUALC_INTEROP_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Interop.dll.mdb
endif endif
@ -19,7 +18,7 @@ ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
BUILD_DIR = $(top_srcdir)/bin/Release BUILD_DIR = $(top_srcdir)/bin/Release
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Interop.dll ASSEMBLY = $(BUILD_DIR)/Mono.Cxxi.dll
ASSEMBLY_MDB = ASSEMBLY_MDB =
MONO_VISUALC_INTEROP_DLL_MDB= MONO_VISUALC_INTEROP_DLL_MDB=
@ -33,10 +32,10 @@ AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \ PROGRAMFILES = \
$(MONO_VISUALC_INTEROP_DLL_MDB) $(MONO_CXXI_DLL_MDB)
LINUX_PKGCONFIG = \ LINUX_PKGCONFIG = \
$(MONO_VISUALC_INTEROP_PC) $(MONO_CXXI_PC)
RESGEN=resgen2 RESGEN=resgen2
@ -75,7 +74,7 @@ EXTRAS = \
ABI \ ABI \
ABI/Impl \ ABI/Impl \
Util \ Util \
mono.visualc.interop.pc.in mono.cxxi.pc.in
REFERENCES = \ REFERENCES = \
System \ System \
@ -87,9 +86,9 @@ CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG)
include $(top_srcdir)/Makefile.include include $(top_srcdir)/Makefile.include
MONO_VISUALC_INTEROP_PC = $(BUILD_DIR)/mono.visualc.interop.pc MONO_CXXI_PC = $(BUILD_DIR)/mono.cxxi.pc
$(eval $(call emit-deploy-wrapper,MONO_VISUALC_INTEROP_PC,mono.visualc.interop.pc)) $(eval $(call emit-deploy-wrapper,MONO_CXXI_PC,mono.cxxi.pc))
$(eval $(call emit_resgen_targets)) $(eval $(call emit_resgen_targets))

18
src/Mono.VisualC.Interop/Mono.VisualC.Interop.csproj → src/Mono.Cxxi/Mono.Cxxi.csproj

@ -7,7 +7,7 @@
<ProjectGuid>{4A864586-93C5-4DC1-8A80-F094A88506D7}</ProjectGuid> <ProjectGuid>{4A864586-93C5-4DC1-8A80-F094A88506D7}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<RootNamespace>Mono.VisualC.Interop</RootNamespace> <RootNamespace>Mono.Cxxi</RootNamespace>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
@ -39,7 +39,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
<AssemblyName>Mono.VisualC.Interop</AssemblyName> <AssemblyName>Mono.Cxxi</AssemblyName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@ -59,16 +59,16 @@
<ItemGroup> <ItemGroup>
<Compile Include="CppLibrary.cs" /> <Compile Include="CppLibrary.cs" />
<Compile Include="AssemblyInfo.cs" /> <Compile Include="AssemblyInfo.cs" />
<Compile Include="ABI\CppAbi.cs" /> <Compile Include="Abi\CppAbi.cs" />
<Compile Include="Interfaces.cs" /> <Compile Include="Interfaces.cs" />
<Compile Include="Attributes.cs" /> <Compile Include="Attributes.cs" />
<Compile Include="CppInstancePtr.cs" /> <Compile Include="CppInstancePtr.cs" />
<Compile Include="CppField.cs" /> <Compile Include="CppField.cs" />
<Compile Include="ABI\VTable.cs" /> <Compile Include="Abi\VTable.cs" />
<Compile Include="ABI\MethodType.cs" /> <Compile Include="Abi\MethodType.cs" />
<Compile Include="ABI\Impl\ItaniumAbi.cs" /> <Compile Include="Abi\Impl\ItaniumAbi.cs" />
<Compile Include="ABI\Impl\VirtualOnlyAbi.cs" /> <Compile Include="Abi\Impl\VirtualOnlyAbi.cs" />
<Compile Include="ABI\Impl\MsvcAbi.cs" /> <Compile Include="Abi\Impl\MsvcAbi.cs" />
<Compile Include="CppObjectMarshaler.cs" /> <Compile Include="CppObjectMarshaler.cs" />
<Compile Include="CppType.cs" /> <Compile Include="CppType.cs" />
<Compile Include="CppTypeInfo.cs" /> <Compile Include="CppTypeInfo.cs" />
@ -78,7 +78,7 @@
<Compile Include="Util\ReflectionHelper.cs" /> <Compile Include="Util\ReflectionHelper.cs" />
<Compile Include="Util\MethodSignature.cs" /> <Compile Include="Util\MethodSignature.cs" />
<Compile Include="CppModifiers.cs" /> <Compile Include="CppModifiers.cs" />
<Compile Include="ABI\Impl\ItaniumTypeInfo.cs" /> <Compile Include="Abi\Impl\ItaniumTypeInfo.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>

6
src/Mono.VisualC.Interop/Util/DelegateTypeCache.cs → src/Mono.Cxxi/Util/DelegateTypeCache.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Util.DelegateTypeCache.cs: Automatic delegate type creation and caching // Mono.Cxxi.Util.DelegateTypeCache.cs: Automatic delegate type creation and caching
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,7 +33,7 @@ using System.Reflection.Emit;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Collections.Generic; using System.Collections.Generic;
namespace Mono.VisualC.Interop.Util { namespace Mono.Cxxi.Util {
public static class DelegateTypeCache { public static class DelegateTypeCache {

6
src/Mono.VisualC.Interop/Util/IEnumerableTransform.cs → src/Mono.Cxxi/Util/IEnumerableTransform.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Util.IEnumerableTransform.cs: Rule-based transformation for IEnumerable // Mono.Cxxi.Util.IEnumerableTransform.cs: Rule-based transformation for IEnumerable
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -31,7 +31,7 @@ using System.Linq;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Mono.VisualC.Interop.Util { namespace Mono.Cxxi.Util {
public static class IEnumerableTransform { public static class IEnumerableTransform {

6
src/Mono.VisualC.Interop/Util/LazyGeneratedList.cs → src/Mono.Cxxi/Util/LazyGeneratedList.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Util.LazyGeneratedList.cs: A list whose items are generated and cached on first access // Mono.Cxxi.Util.LazyGeneratedList.cs: A list whose items are generated and cached on first access
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -30,7 +30,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Mono.VisualC.Interop.Util { namespace Mono.Cxxi.Util {
public class LazyGeneratedList<TItem> : IList<TItem> public class LazyGeneratedList<TItem> : IList<TItem>
where TItem : class where TItem : class

8
src/Mono.VisualC.Interop/Util/MethodSignature.cs → src/Mono.Cxxi/Util/MethodSignature.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Util.MethodSignature.cs: Hash-friendly structs to represent arbitrary method and delegate signatures // Mono.Cxxi.Util.MethodSignature.cs: Hash-friendly structs to represent arbitrary method and delegate signatures
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,7 +33,9 @@ using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Collections.Generic; using System.Collections.Generic;
namespace Mono.VisualC.Interop.Util { using Mono.Cxxi.Abi;
namespace Mono.Cxxi.Util {
public class BasicSignature { public class BasicSignature {
public CallingConvention? CallingConvention { get; set; } public CallingConvention? CallingConvention { get; set; }

6
src/Mono.VisualC.Interop/Util/ReflectionHelper.cs → src/Mono.Cxxi/Util/ReflectionHelper.cs

@ -1,11 +1,11 @@
// //
// Mono.VisualC.Interop.Util.ReflectionHelper.cs: Helper methods for common reflection API tasks // Mono.Cxxi.Util.ReflectionHelper.cs: Helper methods for common reflection API tasks
// //
// Author: // Author:
// Alexander Corrado (alexander.corrado@gmail.com) // Alexander Corrado (alexander.corrado@gmail.com)
// Andreia Gaita (shana@spoiledcat.net) // Andreia Gaita (shana@spoiledcat.net)
// //
// Copyright (C) 2010 Alexander Corrado // Copyright (C) 2010-2011 Alexander Corrado
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
using System.Reflection; using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
namespace Mono.VisualC.Interop.Util { namespace Mono.Cxxi.Util {
internal static class ReflectionHelper { internal static class ReflectionHelper {
public static MethodInfo GetMethodInfoForDelegate (Type delType) public static MethodInfo GetMethodInfoForDelegate (Type delType)

6
src/Mono.Cxxi/mono.cxxi.pc.in

@ -0,0 +1,6 @@
Name: Mono.Cxxi
Description: C++ interoperability for managed code
Version: 0.1
Requires:
Libs: -r:@expanded_libdir@/@PACKAGE@/Mono.Cxxi.dll

6
src/Mono.VisualC.Interop/mono.visualc.interop.pc.in

@ -1,6 +0,0 @@
Name: Mono.VisualC.Interop
Description: Mono.VisualC.Interop
Version: 0.1
Requires:
Libs: -r:@expanded_libdir@/@PACKAGE@/CPPInterop.dll

2
src/generator/Field.cs

@ -32,7 +32,7 @@ using System.Collections.Generic;
using System.CodeDom; using System.CodeDom;
using System.CodeDom.Compiler; using System.CodeDom.Compiler;
using Mono.VisualC.Interop; using Mono.Cxxi;
public class Field { public class Field {

2
src/generator/Generator.cs

@ -12,7 +12,7 @@ using System.Reflection;
using Templates; using Templates;
using NDesk.Options; using NDesk.Options;
using Mono.VisualC.Interop; using Mono.Cxxi;
public class Generator { public class Generator {

15
src/generator/Makefile.am

@ -9,8 +9,8 @@ BUILD_DIR = $(top_srcdir)/bin/Debug
ASSEMBLY = $(BUILD_DIR)/generator.exe ASSEMBLY = $(BUILD_DIR)/generator.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb ASSEMBLY_MDB = $(ASSEMBLY).mdb
MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_CXXI_DLL_SOURCE=$(BUILD_DIR)/Mono.Cxxi.dll
MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_CXXI_DLL=$(BUILD_DIR)/Mono.Cxxi.dll
GENERATOR_EXE_MDB_SOURCE=$(BUILD_DIR)/generator.exe.mdb GENERATOR_EXE_MDB_SOURCE=$(BUILD_DIR)/generator.exe.mdb
GENERATOR_EXE_MDB=$(BUILD_DIR)/generator.exe.mdb GENERATOR_EXE_MDB=$(BUILD_DIR)/generator.exe.mdb
@ -24,8 +24,8 @@ BUILD_DIR = $(top_srcdir)/bin/Release
ASSEMBLY = $(BUILD_DIR)/generator.exe ASSEMBLY = $(BUILD_DIR)/generator.exe
ASSEMBLY_MDB = ASSEMBLY_MDB =
MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_CXXI_DLL_SOURCE=$(BUILD_DIR)/Mono.Cxxi.dll
MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_CXXI_DLL=$(BUILD_DIR)/Mono.Cxxi.dll
GENERATOR_EXE_MDB= GENERATOR_EXE_MDB=
endif endif
@ -36,7 +36,7 @@ AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \ PROGRAMFILES = \
$(MONO_VISUALC_INTEROP_DLL) \ $(MONO_CXXI_DLL) \
$(GENERATOR_EXE_MDB) $(GENERATOR_EXE_MDB)
BINARIES = \ BINARIES = \
@ -70,7 +70,7 @@ EXTRAS = \
generator.in generator.in
REFERENCES = \ REFERENCES = \
../../bin/Debug/Mono.VisualC.Interop.dll \ ../../bin/Debug/Mono.Cxxi.dll \
System \ System \
System.Core \ System.Core \
System.Xml \ System.Xml \
@ -84,9 +84,8 @@ include $(top_srcdir)/Makefile.include
GENERATOR = $(BUILD_DIR)/generator GENERATOR = $(BUILD_DIR)/generator
$(eval $(call emit-deploy-target,MONO_VISUALC_INTEROP_DLL)) $(eval $(call emit-deploy-target,MONO_CXXI_DLL))
$(eval $(call emit-deploy-wrapper,GENERATOR,generator,x)) $(eval $(call emit-deploy-wrapper,GENERATOR,generator,x))
$(eval $(call emit-deploy-target,CPPINTEROP_DLL))
$(eval $(call emit_resgen_targets)) $(eval $(call emit_resgen_targets))

2
src/generator/Method.cs

@ -31,7 +31,7 @@ using System;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Mono.VisualC.Interop; using Mono.Cxxi;
public class Method { public class Method {

2
src/generator/Parameter.cs

@ -27,7 +27,7 @@ using System.Collections.Generic;
using System.CodeDom; using System.CodeDom;
using System.CodeDom.Compiler; using System.CodeDom.Compiler;
using Mono.VisualC.Interop; using Mono.Cxxi;
public class Parameter public class Parameter
{ {

2
src/generator/Property.cs

@ -28,7 +28,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Mono.VisualC.Interop; using Mono.Cxxi;
public class Property { public class Property {

4
src/generator/Templates/CSharp/CSharpClass.cs

@ -12,7 +12,7 @@ namespace Templates {
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Mono.VisualC.Interop; using Mono.Cxxi;
using System; using System;
@ -196,7 +196,7 @@ private bool IsByVal (CppType t)
#line hidden #line hidden
#line 16 "/Users/alex/OpenSource/cppinterop/src/generator/Templates/CSharp/CSharpClass.tt" #line 16 "/Users/alex/OpenSource/cppinterop/src/generator/Templates/CSharp/CSharpClass.tt"
this.Write("\n//\n// This file was auto generated. Do not edit.\n// -------------------------------------------------------------------------\n\nusing System;\nusing Mono.VisualC.Interop;\n\nnamespace "); this.Write("\n//\n// This file was auto generated. Do not edit.\n// -------------------------------------------------------------------------\n\nusing System;\nusing Mono.Cxxi;\n\nnamespace ");
#line default #line default
#line hidden #line hidden

4
src/generator/Templates/CSharp/CSharpClass.tt

@ -2,7 +2,7 @@
<#@ import namespace="System.IO" #> <#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #> <#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections.Generic" #> <#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="Mono.VisualC.Interop" #> <#@ import namespace="Mono.Cxxi" #>
<# <#
var hasBase = Class.BaseClasses.Count > 0; var hasBase = Class.BaseClasses.Count > 0;
var wrapper = Class.Name; var wrapper = Class.Name;
@ -19,7 +19,7 @@
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
using System; using System;
using Mono.VisualC.Interop; using Mono.Cxxi;
namespace <#= Generator.Namespace #> { namespace <#= Generator.Namespace #> {

2
src/generator/Templates/CSharp/CSharpLibs.cs

@ -30,7 +30,7 @@ namespace Templates {
#line hidden #line hidden
#line 4 "/Users/alex/OpenSource/cppinterop/src/generator/Templates/CSharp/CSharpLibs.tt" #line 4 "/Users/alex/OpenSource/cppinterop/src/generator/Templates/CSharp/CSharpLibs.tt"
this.Write("\n//\n// This file was auto generated. Do not edit.\n// -------------------------------------------------------------------------\n\nusing System;\nusing Mono.VisualC.Interop;\n\nnamespace "); this.Write("\n//\n// This file was auto generated. Do not edit.\n// -------------------------------------------------------------------------\n\nusing System;\nusing Mono.Cxxi;\n\nnamespace ");
#line default #line default
#line hidden #line hidden

2
src/generator/Templates/CSharp/CSharpLibs.tt

@ -7,7 +7,7 @@
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
using System; using System;
using Mono.VisualC.Interop; using Mono.Cxxi;
namespace <#= Generator.Namespace #> { namespace <#= Generator.Namespace #> {

4
src/generator/generator.csproj

@ -113,9 +113,9 @@
</MonoDevelop> </MonoDevelop>
</ProjectExtensions> </ProjectExtensions>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Mono.VisualC.Interop\Mono.VisualC.Interop.csproj"> <ProjectReference Include="..\Mono.Cxxi\Mono.Cxxi.csproj">
<Project>{4A864586-93C5-4DC1-8A80-F094A88506D7}</Project> <Project>{4A864586-93C5-4DC1-8A80-F094A88506D7}</Project>
<Name>Mono.VisualC.Interop</Name> <Name>Mono.Cxxi</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

3
tests/Makefile.am

@ -2,7 +2,7 @@ top_srcdir = ../
BUILD_DIR = $(top_srcdir)/bin/Debug BUILD_DIR = $(top_srcdir)/bin/Debug
INTEROP_DLL = \ INTEROP_DLL = \
$(BUILD_DIR)/Mono.VisualC.Interop.dll $(BUILD_DIR)/Mono.Cxxi.dll
TEST_DLL = $(BUILD_DIR)/Test.dll TEST_DLL = $(BUILD_DIR)/Test.dll
@ -12,7 +12,6 @@ NATIVE = \
MANAGED = \ MANAGED = \
ByValTests.cs \ ByValTests.cs \
Support/CppMockObject.cs \
Support/CppNUnitAsserts.cs \ Support/CppNUnitAsserts.cs \
VirtualTests.cs VirtualTests.cs

51
tests/Support/CppMockObject.cs

@ -1,51 +0,0 @@
//
// CPPTestLibBase.cs: Base class for supporting tests using CPPTestLib
//
// Author:
// Alexander Corrado (alexander.corrado@gmail.com)
//
// Copyright (C) 2010 Alexander Corrado
//
using System;
using NUnit.Framework;
using Mono.VisualC.Interop;
using Mono.VisualC.Interop.ABI;
namespace Tests.Support {
public class CppMockObject : ICppObject {
public static CppMockObject Instance = new CppMockObject ();
protected CppMockObject ()
{
}
public CppInstancePtr Native {
get {
throw new System.NotImplementedException ();
}
}
public int NativeSize {
get {
throw new NotImplementedException ();
}
}
public void Dispose ()
{
throw new System.NotImplementedException ();
}
}
public interface EmptyTestInterface : ICppClassOverridable<CppMockObject> {
}
public struct EmptyTestStruct {
}
}

2
tests/Support/CppNUnitAsserts.cs

@ -10,7 +10,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using NUnit.Framework; using NUnit.Framework;
using Mono.VisualC.Interop; using Mono.Cxxi;
namespace Tests.Support { namespace Tests.Support {
public static class CppNUnitAsserts { public static class CppNUnitAsserts {

4
tests/Tests.csproj

@ -95,9 +95,9 @@
<Reference Include="System" /> <Reference Include="System" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\src\Mono.VisualC.Interop\Mono.VisualC.Interop.csproj"> <ProjectReference Include="..\src\Mono.Cxxi\Mono.Cxxi.csproj">
<Project>{4A864586-93C5-4DC1-8A80-F094A88506D7}</Project> <Project>{4A864586-93C5-4DC1-8A80-F094A88506D7}</Project>
<Name>Mono.VisualC.Interop</Name> <Name>Mono.Cxxi</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
</Project> </Project>
Loading…
Cancel
Save