I have wrapped the quantlib library in java using swig and skwash
(following the Skwash Tutorial).
I am trying to rewrite the SwapValuation example but I am blocked with
enumeration classes such as TimeUnit or BusinessDayConvention which are not
wrapped. The swig wrapper has created SWIGTYPE_p_*.java classes which give no
help...
Hereafter is the example of SWIGTYPE_p_TimeUnit class. The problem is : I
cannot create and affect a new TimeUnit object for use with for example
Calendar.Advance function.
In date.i interface file I can find a timeunitFromString function which
could be the solution if it was wrapped... but nothing equivalent in java
classes.
Has someone an idea?
Ignace Martin
/*
----------------------------------------------------------------------------
*
This file was automatically generated by SWIG (
http://www.swig.org).
* Version
1.3.24
*
* Do not make changes to this file unless you know
what you are doing--modify
* the SWIG interface file
instead.
*
-----------------------------------------------------------------------------
*/
package org.quantlib;
public class SWIGTYPE_p_TimeUnit {
private long swigCPtr;
protected SWIGTYPE_p_TimeUnit(long cPtr, boolean bFutureUse)
{
swigCPtr = cPtr;
}
protected SWIGTYPE_p_TimeUnit() {
swigCPtr =
0;
}
protected static long getCPtr(SWIGTYPE_p_TimeUnit obj)
{
return (obj == null) ? 0 : obj.swigCPtr;
}
}