LSTypeIterator

CyberTech

Second-in-Command
Staff member
LSTypeIterator by CyberTech
Download: https://www.isxgames.com/EVEBot/Trunk/EVEbot/core/Lib/obj_LSTypeIterator.iss

This object is designed to allow for rapid testing of the members of a datatype, without needing to have advance knowledge or hardcoding of the members and methods of the datatype.

I wrote this to enable rapid testing of datatype members during extension updates, after patches, etc.

Amadeus is hoping that someone will use this for ISXVG to create testcases similar to the ones in https://www.isxgames.com/EVEBot/Trunk/EVEbot/Testcases. The example below is actually 'test_Me.iss" from that same directory.

-- CyberTech, cybertech@gmail.com

An example (using the EVE datatype "character") is below:

Example:

Code:
            function main()
            {
                variable int StartTime = ${Script.RunningTime}
                variable int EndTime

                variable obj_LSTypeIterator ItemTest = "character"

                ItemTest:ParseMembers
                ItemTest:IterateMembers["Me"]

                EndTime:Set[${Script.RunningTime}]
                echo "Testing of datatype ${ItemTest.TypeName} completed in ${Math.Calc[(${EndTime}-${StartTime}) / 1000]} seconds"
            }
Example output:

Code:
========================================================
            Parsing datatype character members and methods...
            Members of datatype "character", instance "Me"
              Me.ActiveTarget           == NULL
              Me.Alliance               == NULL
              Me.AllianceID             == -1
              Me.AllianceTicker         == NULL
              Me.AutoPilotOn            == FALSE
              Me.Charisma               == 15.200000
              Me.DroneControlDistance   == 45000.000000
              Me.Fleet                  == NULL
              Me.GetActiveDroneIDs      == NULL
              Me.GetActiveDrones        == NULL
              Me.GetAssets              == 0
              Me.GetAttackers           == 0
              Me.GetCorpHangarItems     == NULL
              Me.GetHangarItems         == 13
              Me.GetHangarShips         == 5
              Me.GetJammers             == NULL
              Me.GetMyOrders            == NULL
              Me.GetSkillQueue          == 1
              Me.GetSkills              == NULL
              Me.GetStationsWithAssets  == 0
              Me.GetTargetedBy          == NULL
              Me.GetTargeting           == NULL
              Me.GetTargets             == NULL
              Me.InSpace                == FALSE
              Me.InStation              == TRUE
              Me.Intelligence           == 30.300000
              Me.MaxActiveDrones        == 5.000000
              Me.MaxJumpClones          == 4.000000
              Me.MaxLockedTargets       == 6.000000
              Me.Memory                 == 23.500000
              Me.MiningDroneAmountBonus == 100.000000
              Me.Perception             == 22.000000
              Me.RegionID               == 10000422
              Me.Skill                  == NULL
              Me.SkillCurrentlyTraining == NULL
              Me.SkillPoints            == NULL
              Me.StandingTo             == NULL
              Me.Willpower              == 19.900000
            Testing of datatype character completed in 0.156000 seconds
 
Top Bottom