Browse Source

STL containers wrappers now implement ICppMarshal (stubs).

pull/72/merge
triton 12 years ago
parent
commit
1c137fa2ae
  1. 13
      src/Runtime/StdString.cs
  2. 21
      src/Runtime/StdVector.cs

13
src/Runtime/StdString.cs

@ -20,10 +20,11 @@
* 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 CppSharp.Runtime;
namespace Std namespace Std
{ {
public struct String public struct String : ICppMarshal
{ {
public IntPtr Instance; public IntPtr Instance;
@ -47,6 +48,16 @@ namespace Std
get { return '0'; } get { return '0'; }
set { } set { }
} }
public void MarshalManagedToNative(IntPtr instance)
{
throw new NotImplementedException();
}
public void MarshalNativeToManaged(IntPtr instance)
{
throw new NotImplementedException();
}
} }
public struct WString public struct WString

21
src/Runtime/StdVector.cs

@ -22,19 +22,27 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using CppSharp.Runtime;
namespace Std namespace Std
{ {
public struct Vector public struct Vector
{ {
static public Vector Create<T>(Vector<T> vec)
{
return default(Vector);
}
} }
public struct Vector<T> : ICollection<T> public struct Vector<T> : ICollection<T> where T : ICppMarshal
{ {
public Vector Internal;
public int Count { get; private set; }
public bool IsReadOnly { get; private set; }
public Vector(Vector vector) : this()
{
Internal = vector;
}
public IEnumerator<T> GetEnumerator() public IEnumerator<T> GetEnumerator()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
@ -69,8 +77,5 @@ namespace Std
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public int Count { get; private set; }
public bool IsReadOnly { get; private set; }
} }
} }

Loading…
Cancel
Save