Skip to content

Instantly share code, notes, and snippets.

@andrey-krivobok
Created October 16, 2012 09:57
Show Gist options
  • Save andrey-krivobok/3898431 to your computer and use it in GitHub Desktop.
Save andrey-krivobok/3898431 to your computer and use it in GitHub Desktop.
WTF
+ (NSArray *)optionGroups:(NSString *)machineFamily
{
NSMutableArray *items = [NSMutableArray arrayWithCapacity:10];
EppOptionsGroup *group = nil;
EppMachineOption *item = nil;
NSMutableArray *options = nil;
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupEngineAndAccessories;
group.title = VTLocalizedString(kGroupEngineAndAccessories, nil);
//group.title = @"";
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kEngine];
item.name = kEngine;
item.title = VTLocalizedString(kEngine, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kValveCover];
item.name = kValveCover;
item.title = VTLocalizedString(kValveCover, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kOilCooler];
item.name = kOilCooler;
item.title = VTLocalizedString(kOilCooler, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kRadiator];
item.name = kRadiator;
item.title = VTLocalizedString(kRadiator, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kExhaust];
item.name = kExhaust;
item.title = VTLocalizedString(kExhaust, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kManifolds];
item.name = kManifolds;
item.title = VTLocalizedString(kManifolds, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kFanMotor];
item.name = kFanMotor;
item.title = VTLocalizedString(kFanMotor, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kWaterPump];
item.name = kWaterPump;
item.title = VTLocalizedString(kWaterPump, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kFuelInjection];
item.name = kFuelInjection;
item.title = VTLocalizedString(kFuelInjection, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kInjectors];
item.name = kInjectors;
item.title = VTLocalizedString(kInjectors, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kLift];
item.name = kLift;
item.title = VTLocalizedString(kLift, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kSenders];
item.name = kSenders;
item.title = VTLocalizedString(kSenders, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kThermostat];
item.name = kThermostat;
item.title = VTLocalizedString(kThermostat, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kFlyWheel];
item.name = kFlyWheel;
item.title = VTLocalizedString(kFlyWheel, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kOilPan];
item.name = kOilPan;
item.title = VTLocalizedString(kOilPan, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kOilFilter];
item.name = kOilFilter;
item.title = VTLocalizedString(kOilFilter, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kTurbocharger];
item.name = kTurbocharger;
item.title = VTLocalizedString(kTurbocharger, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kPulleys];
item.name = kPulleys;
item.title = VTLocalizedString(kPulleys, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kStarter];
item.name = kStarter;
item.title = VTLocalizedString(kStarter, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kAlternator];
item.name = kAlternator;
item.title = VTLocalizedString(kAlternator, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kCompressor];
item.name = kCompressor;
item.title = VTLocalizedString(kCompressor, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kEngineMounts];
item.name = kEngineMounts;
item.title = VTLocalizedString(kEngineMounts, nil);
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kElectronicControl];
item.name = kElectronicControl;
item.title = VTLocalizedString(kElectronicControl, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kGovernor];
item.name = kGovernor;
item.title = VTLocalizedString(kGovernor, nil);
if (![machineFamily isEqualToString:MACHINE_FAMILY_TTT] && ![machineFamily isEqualToString:MACHINE_FAMILY_WL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MG])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kFuelLines];
item.name = kFuelLines;
item.title = VTLocalizedString(kFuelLines, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kFuelTank];
item.name = kFuelTank;
item.title = VTLocalizedString(kFuelTank, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kWaterPiping];
item.name = kWaterPiping;
item.title = VTLocalizedString(kWaterPiping, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupEngineAndAccessories, kOilHoses];
item.name = kOilHoses;
item.title = VTLocalizedString(kOilHoses, nil);
[options addObject:item];
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupTransmission;
group.title = VTLocalizedString(kGroupTransmission, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kTransmissions];
item.name = kTransmissions;
item.title = VTLocalizedString(kTransmissions, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kFinalDrivesPlanetary];
item.name = kFinalDrivesPlanetary;
item.title = VTLocalizedString(kFinalDrivesPlanetary, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kDriveShafts];
item.name = kDriveShafts;
item.title = VTLocalizedString(kDriveShafts, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kTransferCase];
item.name = kTransferCase;
item.title = VTLocalizedString(kTransferCase, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kWetBrake];
item.name = kWetBrake;
item.title = VTLocalizedString(kWetBrake, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kHydrostaticPumps];
item.name = kHydrostaticPumps;
item.title = VTLocalizedString(kHydrostaticPumps, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kLinkage];
item.name = kLinkage;
item.title = VTLocalizedString(kLinkage, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kControlValves];
item.name = kControlValves;
item.title = VTLocalizedString(kControlValves, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupTransmission, kSendersSensors];
item.name = kSendersSensors;
item.title = VTLocalizedString(kSendersSensors, nil);
[options addObject:item];
//!CCE: SSL, MTL, CTL, MHE
if ( ![machineFamily isEqualToString:MACHINE_FAMILY_SSL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MTL]
&& ![machineFamily isEqualToString:MACHINE_FAMILY_CTL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[items addObject:group];
}
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupHydrostatic; //for CCE EPP
group.title = VTLocalizedString(kGroupHydrostatic, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kHydrostaticLinesBetweenPumpMotors];
item.name = kHydrostaticLinesBetweenPumpMotors;
item.title = VTLocalizedString(kHydrostaticLinesBetweenPumpMotors, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kLinkages];
item.name = kLinkages;
item.title = VTLocalizedString(kLinkages, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kFinalDrives];
item.name = kFinalDrives;
item.title = VTLocalizedString(kFinalDrives, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kControlValves];
item.name = kControlValves;
item.title = VTLocalizedString(kControlValves, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kDriveBeltTensioner];
item.name = kDriveBeltTensioner;
item.title = VTLocalizedString(kDriveBeltTensioner, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydrostatic, kSendersSensors];
item.name = kSendersSensors;
item.title = VTLocalizedString(kSendersSensors, nil);
[options addObject:item];
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[items addObject:group];
}
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupAxles;
group.title = VTLocalizedString(kGroupAxles, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAxles, kAxles];
item.name = kAxles;
item.title = VTLocalizedString(kAxles, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAxles, kAxleBearings]; // for CCE
item.name = kAxleBearings;
item.title = VTLocalizedString(kAxleBearings, nil);
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAxles, kAxleSeals];
item.name = kAxleSeals;
item.title = VTLocalizedString(kAxleSeals, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAxles, kLugNuts];
item.name = kLugNuts;
item.title = VTLocalizedString(kLugNuts, nil);
[options addObject:item];
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupDifferentials;
group.title = VTLocalizedString(kGroupDifferentials, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupDifferentials, kDifferentials];
item.name = kDifferentials;
item.title = VTLocalizedString(kDifferentials, nil);
[options addObject:item];
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupUndercarriage;
group.title = VTLocalizedString(kGroupUndercarriage, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupUndercarriage, kIdlers];
item.name = kIdlers;
item.title = VTLocalizedString(kIdlers, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupUndercarriage, kRollersBogies];
item.name = kRollersBogies;
item.title = VTLocalizedString(kRollersBogies, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupUndercarriage, kTrackAdjuster];
item.name = kTrackAdjuster;
item.title = VTLocalizedString(kTrackAdjuster, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupUndercarriage, kDriveSprocket];
item.name = kDriveSprocket;
item.title = VTLocalizedString(kDriveSprocket, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupUndercarriage, kTrackFrame];
item.name = kTrackFrame;
item.title = VTLocalizedString(kTrackFrame, nil);
[options addObject:item];
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[items addObject:group];
}
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupHydraulicSystems;
group.title = VTLocalizedString(kGroupHydraulicSystems, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kHydraulicPumpsMotors];
item.name = kHydraulicPumpsMotors;
item.title = VTLocalizedString(kHydraulicPumpsMotors, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kCylinders];
item.name = kCylinders;
item.title = VTLocalizedString(kCylinders, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kValves];
item.name = kValves;
item.title = VTLocalizedString(kValves, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kAccumulators];
item.name = kAccumulators;
item.title = VTLocalizedString(kAccumulators, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kOilCoolers];
item.name = kOilCoolers;
item.title = VTLocalizedString(kOilCoolers, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kHoses];
item.name = kHoses;
item.title = VTLocalizedString(kHoses, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kQuickCouplers];
item.name = kQuickCouplers;
item.title = VTLocalizedString(kQuickCouplers, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupHydraulicSystems, kOilFilters];
item.name = kOilFilters;
item.title = VTLocalizedString(kOilFilters, nil);
[options addObject:item];
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupElectricalAndInterior;
group.title = VTLocalizedString(kGroupElectricalAndInterior, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupElectricalAndInterior, kGauges];
item.name = kGauges;
item.title = VTLocalizedString(kGauges, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupElectricalAndInterior, kWiringHarnesses];
item.name = kWiringHarnesses;
item.title = VTLocalizedString(kWiringHarnesses, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupElectricalAndInterior, kSwitches];
item.name = kSwitches;
item.title = VTLocalizedString(kSwitches, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupElectricalAndInterior, kJoysticks];
item.name = kJoysticks;
item.title = VTLocalizedString(kJoysticks, nil);
//!CCE: SSL, MTL, CTL, MHE
if ( ![machineFamily isEqualToString:MACHINE_FAMILY_SSL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MTL]
&& ![machineFamily isEqualToString:MACHINE_FAMILY_CTL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupElectricalAndInterior, kRelays];
item.name = kRelays;
item.title = VTLocalizedString(kRelays, nil);
//!CCE: SSL, MTL, CTL, MHE
if ( ![machineFamily isEqualToString:MACHINE_FAMILY_SSL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MTL]
&& ![machineFamily isEqualToString:MACHINE_FAMILY_CTL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupFramesAndLinkages;
group.title = VTLocalizedString(kGroupFramesAndLinkages, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupFramesAndLinkages, kChassis];
item.name = kChassis;
item.title = VTLocalizedString(kChassis, nil);
//!CCE: SSL, MTL, CTL, MHE
if ( ![machineFamily isEqualToString:MACHINE_FAMILY_SSL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MTL]
&& ![machineFamily isEqualToString:MACHINE_FAMILY_CTL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupFramesAndLinkages, kWeldment];
item.name = kWeldment;
item.title = VTLocalizedString(kWeldment, nil);
//!CCE: SSL, MTL, CTL, MHE
if ( ![machineFamily isEqualToString:MACHINE_FAMILY_SSL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MTL]
&& ![machineFamily isEqualToString:MACHINE_FAMILY_CTL] && ![machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupFramesAndLinkages, kBoomLoaderArm]; // for ECC
item.name = kBoomLoaderArm;
item.title = VTLocalizedString(kBoomLoaderArm, nil);
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupFramesAndLinkages, kLoaderFrame]; //for ECC
item.name = kLoaderFrame;
item.title = VTLocalizedString(kLoaderFrame, nil);
//CCE: SSL, MTL, CTL, MHE
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_SSL] || [machineFamily isEqualToString:MACHINE_FAMILY_MTL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_CTL] || [machineFamily isEqualToString:MACHINE_FAMILY_MHE])
{
[options addObject:item];
}
[items addObject:group];
group = [[EppOptionsGroup new] autorelease];
group.name = kGroupAdministrative;
group.title = VTLocalizedString(kGroupAdministrative, nil);
options = [NSMutableArray arrayWithCapacity:10];
group.eppMachineOptions = options;
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kTerritoryRestrictions];
item.name = kTerritoryRestrictions;
item.title = VTLocalizedString(kTerritoryRestrictions, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kTransfer];
item.name = kTransfer;
item.title = VTLocalizedString(kTransfer, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kOilSampling];
item.name = kOilSampling;
item.title = VTLocalizedString(kOilSampling, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kTravelTime];
item.name = kTravelTime;
item.title = VTLocalizedString(kTravelTime, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kTransport];
item.name = kTransport;
item.title = VTLocalizedString(kTransport, nil);
[options addObject:item];
item = [[EppMachineOption new] autorelease];
item.machineProperty = [NSString stringWithFormat:@"%@.%@", kGroupAdministrative, kExcludedMachines];
item.name = kExcludedMachines;
item.title = VTLocalizedString(kExcludedMachines, nil);
[options addObject:item];
//Heavy: HEX, MWL, AT
if ( !machineFamily || [machineFamily isEqualToString:MACHINE_FAMILY_HEX] || [machineFamily isEqualToString:MACHINE_FAMILY_MWL]
|| [machineFamily isEqualToString:MACHINE_FAMILY_AT])
{
[items addObject:group];
}
return items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment