~ubuntu-branches/ubuntu/vivid/quantlib-swig/vivid

« back to all changes in this revision

Viewing changes to CSharp/csharp/Settlement.cs

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2007-12-26 08:10:08 UTC
  • mfrom: (1.1.6 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20071226081008-cjq979mvtxydli4r
New upstream release 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ----------------------------------------------------------------------------
 
2
 * This file was automatically generated by SWIG (http://www.swig.org).
 
3
 * Version 1.3.33
 
4
 *
 
5
 * Do not make changes to this file unless you know what you are doing--modify
 
6
 * the SWIG interface file instead.
 
7
 * ----------------------------------------------------------------------------- */
 
8
 
 
9
namespace QuantLib {
 
10
 
 
11
using System;
 
12
using System.Runtime.InteropServices;
 
13
 
 
14
public class Settlement : IDisposable {
 
15
  private HandleRef swigCPtr;
 
16
  protected bool swigCMemOwn;
 
17
 
 
18
  internal Settlement(IntPtr cPtr, bool cMemoryOwn) {
 
19
    swigCMemOwn = cMemoryOwn;
 
20
    swigCPtr = new HandleRef(this, cPtr);
 
21
  }
 
22
 
 
23
  internal static HandleRef getCPtr(Settlement obj) {
 
24
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 
25
  }
 
26
 
 
27
  ~Settlement() {
 
28
    Dispose();
 
29
  }
 
30
 
 
31
  public virtual void Dispose() {
 
32
    lock(this) {
 
33
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
 
34
        swigCMemOwn = false;
 
35
        NQuantLibcPINVOKE.delete_Settlement(swigCPtr);
 
36
      }
 
37
      swigCPtr = new HandleRef(null, IntPtr.Zero);
 
38
      GC.SuppressFinalize(this);
 
39
    }
 
40
  }
 
41
 
 
42
  public Settlement() : this(NQuantLibcPINVOKE.new_Settlement(), true) {
 
43
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
44
  }
 
45
 
 
46
  public enum Type {
 
47
    Physical,
 
48
    Cash
 
49
  }
 
50
 
 
51
}
 
52
 
 
53
}