1 /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ 2 3 #ifndef OBJECT_DEPENDENCE_TYPES_H 4 #define OBJECT_DEPENDENCE_TYPES_H 5 6 // The reason to have different dependence types is that an object may simultaneously have more than one kind of dependence to another object. 7 // Without dependence types, the dependencies would therefore need to be duplicated (stored as lists or vectors instead of maps or sets). 8 // This would also make deleting the death dependence somewhat risky since there in this case must be an exact matching number of 9 // AddDeathDependence / DeleteDeathDependence calls in order not to risk a crash. With dependence types this can never happen, i.e. 10 // DeleteDeathDependence(object, DEPENDENCE_ATTACKER) can be called a hundred times without any risk of losing some other type of dependence. 11 // Dependence types also makes it easy to detect deletion of non-existent dependence types, and output a warning for debugging purposes. 12 enum DependenceType { 13 DEPENDENCE_ATTACKER, 14 DEPENDENCE_BUILD, 15 DEPENDENCE_BUILDER, 16 DEPENDENCE_CAPTURE, 17 DEPENDENCE_COBTHREAD, 18 DEPENDENCE_COMMANDQUE, 19 DEPENDENCE_DECOYTARGET, 20 DEPENDENCE_INCOMING, 21 DEPENDENCE_INTERCEPT, 22 DEPENDENCE_INTERCEPTABLE, 23 DEPENDENCE_INTERCEPTTARGET, 24 DEPENDENCE_LANDINGPAD, 25 DEPENDENCE_LASTCOLWARN, 26 DEPENDENCE_LIGHT, 27 DEPENDENCE_ORDERTARGET, 28 DEPENDENCE_RECLAIM, 29 DEPENDENCE_REPULSE, 30 DEPENDENCE_REPULSED, 31 DEPENDENCE_RESURRECT, 32 DEPENDENCE_SELECTED, 33 DEPENDENCE_SOLIDONTOP, 34 DEPENDENCE_TARGET, 35 DEPENDENCE_TARGETUNIT, 36 DEPENDENCE_TERRAFORM, 37 DEPENDENCE_TRANSPORTEE, 38 DEPENDENCE_TRANSPORTER, 39 DEPENDENCE_WAITCMD, 40 DEPENDENCE_WEAPON, 41 DEPENDENCE_WEAPONTARGET, 42 DEPENDENCE_NONE 43 }; 44 45 #endif 46 47