package b4a.example;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class person extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "b4a.example.person");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", b4a.example.person.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public String _mfirstname = "";
public String _mlastname = "";
public long _mbirthdate = 0L;
public b4a.example.main _main = null;
public b4a.example.starter _starter = null;
public String  _initialize(b4a.example.person __ref,anywheresoftware.b4a.BA _ba,String _firstname,String _lastname,long _birthdate) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "initialize"))
	return (String) Debug.delegate(ba, "initialize", new Object[] {_ba,_firstname,_lastname,_birthdate});
RDebugUtils.currentLine=786432;
 //BA.debugLineNum = 786432;BA.debugLine="Sub Initialize (FirstName As String, LastName As S";
RDebugUtils.currentLine=786433;
 //BA.debugLineNum = 786433;BA.debugLine="mFirstName = FirstName";
__ref._mfirstname = _firstname;
RDebugUtils.currentLine=786434;
 //BA.debugLineNum = 786434;BA.debugLine="mLastName = LastName";
__ref._mlastname = _lastname;
RDebugUtils.currentLine=786435;
 //BA.debugLineNum = 786435;BA.debugLine="mBirthDate = BirthDate";
__ref._mbirthdate = _birthdate;
RDebugUtils.currentLine=786436;
 //BA.debugLineNum = 786436;BA.debugLine="End Sub";
return "";
}
public int  _getcurrentage(b4a.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getcurrentage"))
	return (Integer) Debug.delegate(ba, "getcurrentage", null);
RDebugUtils.currentLine=917504;
 //BA.debugLineNum = 917504;BA.debugLine="Public Sub GetCurrentAge As Int";
RDebugUtils.currentLine=917505;
 //BA.debugLineNum = 917505;BA.debugLine="Return GetAgeAt(DateTime.Now)";
if (true) return __ref._getageat(null,__c.DateTime.getNow());
RDebugUtils.currentLine=917506;
 //BA.debugLineNum = 917506;BA.debugLine="End Sub";
return 0;
}
public String  _class_globals(b4a.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
RDebugUtils.currentLine=720896;
 //BA.debugLineNum = 720896;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=720897;
 //BA.debugLineNum = 720897;BA.debugLine="Private mFirstName, mLastName As String";
_mfirstname = "";
_mlastname = "";
RDebugUtils.currentLine=720898;
 //BA.debugLineNum = 720898;BA.debugLine="Private mBirthDate As Long";
_mbirthdate = 0L;
RDebugUtils.currentLine=720899;
 //BA.debugLineNum = 720899;BA.debugLine="End Sub";
return "";
}
public int  _getageat(b4a.example.person __ref,long _date) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getageat"))
	return (Integer) Debug.delegate(ba, "getageat", new Object[] {_date});
long _diff = 0L;
RDebugUtils.currentLine=983040;
 //BA.debugLineNum = 983040;BA.debugLine="Public Sub GetAgeAt(Date As Long) As Int";
RDebugUtils.currentLine=983041;
 //BA.debugLineNum = 983041;BA.debugLine="Dim diff As Long";
_diff = 0L;
RDebugUtils.currentLine=983042;
 //BA.debugLineNum = 983042;BA.debugLine="diff = Date - mBirthDate";
_diff = (long) (_date-__ref._mbirthdate);
RDebugUtils.currentLine=983043;
 //BA.debugLineNum = 983043;BA.debugLine="Return Floor(diff / DateTime.TicksPerDay / 365)";
if (true) return (int) (__c.Floor(_diff/(double)__c.DateTime.TicksPerDay/(double)365));
RDebugUtils.currentLine=983044;
 //BA.debugLineNum = 983044;BA.debugLine="End Sub";
return 0;
}
public String  _getname(b4a.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getname"))
	return (String) Debug.delegate(ba, "getname", null);
RDebugUtils.currentLine=851968;
 //BA.debugLineNum = 851968;BA.debugLine="Public Sub GetName As String";
RDebugUtils.currentLine=851969;
 //BA.debugLineNum = 851969;BA.debugLine="Return mFirstName & \" \" & mLastName";
if (true) return __ref._mfirstname+" "+__ref._mlastname;
RDebugUtils.currentLine=851970;
 //BA.debugLineNum = 851970;BA.debugLine="End Sub";
return "";
}
}