package b4a.example;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class person_subs_0 {


public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 2;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 3;BA.debugLine="Private mFirstName, mLastName As String";
person._mfirstname = RemoteObject.createImmutable("");__ref.setField("_mfirstname",person._mfirstname);
person._mlastname = RemoteObject.createImmutable("");__ref.setField("_mlastname",person._mlastname);
 //BA.debugLineNum = 4;BA.debugLine="Private mBirthDate As Long";
person._mbirthdate = RemoteObject.createImmutable(0L);__ref.setField("_mbirthdate",person._mbirthdate);
 //BA.debugLineNum = 5;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _getageat(RemoteObject __ref,RemoteObject _date) throws Exception{
try {
		Debug.PushSubsStack("GetAgeAt (person) ","person",2,__ref.getField(false, "ba"),__ref,22);
if (RapidSub.canDelegate("getageat")) return __ref.runUserSub(false, "person","getageat", __ref, _date);
RemoteObject _diff = RemoteObject.createImmutable(0L);
Debug.locals.put("Date", _date);
 BA.debugLineNum = 22;BA.debugLine="Public Sub GetAgeAt(Date As Long) As Int";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 23;BA.debugLine="Dim diff As Long";
Debug.ShouldStop(4194304);
_diff = RemoteObject.createImmutable(0L);Debug.locals.put("diff", _diff);
 BA.debugLineNum = 24;BA.debugLine="diff = Date - mBirthDate";
Debug.ShouldStop(8388608);
_diff = RemoteObject.solve(new RemoteObject[] {_date,__ref.getField(true,"_mbirthdate")}, "-",1, 2);Debug.locals.put("diff", _diff);
 BA.debugLineNum = 25;BA.debugLine="Return Floor(diff / DateTime.TicksPerDay / 365)";
Debug.ShouldStop(16777216);
if (true) return BA.numberCast(int.class, person.__c.runMethod(true,"Floor",(Object)(RemoteObject.solve(new RemoteObject[] {_diff,person.__c.getField(false,"DateTime").getField(true,"TicksPerDay"),RemoteObject.createImmutable(365)}, "//",0, 0))));
 BA.debugLineNum = 26;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _getcurrentage(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("GetCurrentAge (person) ","person",2,__ref.getField(false, "ba"),__ref,18);
if (RapidSub.canDelegate("getcurrentage")) return __ref.runUserSub(false, "person","getcurrentage", __ref);
 BA.debugLineNum = 18;BA.debugLine="Public Sub GetCurrentAge As Int";
Debug.ShouldStop(131072);
 BA.debugLineNum = 19;BA.debugLine="Return GetAgeAt(DateTime.Now)";
Debug.ShouldStop(262144);
if (true) return __ref.runClassMethod (b4a.example.person.class, "_getageat",(Object)(person.__c.getField(false,"DateTime").runMethod(true,"getNow")));
 BA.debugLineNum = 20;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _getname(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("GetName (person) ","person",2,__ref.getField(false, "ba"),__ref,14);
if (RapidSub.canDelegate("getname")) return __ref.runUserSub(false, "person","getname", __ref);
 BA.debugLineNum = 14;BA.debugLine="Public Sub GetName As String";
Debug.ShouldStop(8192);
 BA.debugLineNum = 15;BA.debugLine="Return mFirstName & \" \" & mLastName";
Debug.ShouldStop(16384);
if (true) return RemoteObject.concat(__ref.getField(true,"_mfirstname"),RemoteObject.createImmutable(" "),__ref.getField(true,"_mlastname"));
 BA.debugLineNum = 16;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba,RemoteObject _firstname,RemoteObject _lastname,RemoteObject _birthdate) throws Exception{
try {
		Debug.PushSubsStack("Initialize (person) ","person",2,__ref.getField(false, "ba"),__ref,8);
if (RapidSub.canDelegate("initialize")) return __ref.runUserSub(false, "person","initialize", __ref, _ba, _firstname, _lastname, _birthdate);
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
Debug.locals.put("FirstName", _firstname);
Debug.locals.put("LastName", _lastname);
Debug.locals.put("BirthDate", _birthdate);
 BA.debugLineNum = 8;BA.debugLine="Sub Initialize (FirstName As String, LastName As S";
Debug.ShouldStop(128);
 BA.debugLineNum = 9;BA.debugLine="mFirstName = FirstName";
Debug.ShouldStop(256);
__ref.setField ("_mfirstname",_firstname);
 BA.debugLineNum = 10;BA.debugLine="mLastName = LastName";
Debug.ShouldStop(512);
__ref.setField ("_mlastname",_lastname);
 BA.debugLineNum = 11;BA.debugLine="mBirthDate = BirthDate";
Debug.ShouldStop(1024);
__ref.setField ("_mbirthdate",_birthdate);
 BA.debugLineNum = 12;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
}