//======================================================= //+ // FUNCTION: // // const char* GroundWaterStorage::replaceOldSlotName ( // const char* inName, // bool issueWarning /*=false*/) const // PURPOSE: // // Return the currently used name for a given slot name, replacing // old names with the current name. This method processes // GroundWaterStorage-specific slot name translation. // // PARAMETERS: // // (I) inName The given name (possibly an old name) // (I) issueWarning Boolean indication of whether or not this method // should issue a warning if an old name is found. // // RETURN VALUES: // const char* The currently used slot name -- possibly the given // name, or else a replacement for an old name. // // PRECONDITIONS & ASSUMPTIONS: // inName is not NULL, and points to a null-terminated ASCII string. // // WARNINGS & SIDE EFFECTS: // none // // virtual from SimObj const char* GroundWaterStorage::replaceOldSlotName ( const char* inName, bool issueWarning /*=false*/) const { const char* newName (NULL); // *************************************************** // *** Replacement Old Slot Names: GW Flow Slots *** // *************************************************** if (strcmp (inName, "Groundwater Flow Upstream") == 0) { newName = GW_FLOW_UP_C; } else if (strcmp (inName, "Groundwater Flow Downstream") == 0) { newName = GW_FLOW_DOWN_C; } else if (strcmp (inName, "Groundwater Flow Left") == 0) { newName = GW_FLOW_LEFT_C; } else if (strcmp (inName, "Groundwater Flow Right") == 0) { newName = GW_FLOW_RIGHT_C; } // ***************************************************** // *** Replacement Old Slot Names: Elevation Slots *** // ***************************************************** else if (strcmp (inName, "Previous Water Table Elevation") == 0) { newName = GW_ELEV_PREV_C; } else if (strcmp (inName, "Previous Adjacent Elevation Upstream") == 0) { newName = GW_ELEV_UP_C; } else if (strcmp (inName, "Previous Adjacent Elevation Downstream") == 0) { newName = GW_ELEV_DOWN_C; } else if (strcmp (inName, "Previous Adjacent Elevation Right") == 0) { newName = GW_ELEV_RIGHT_C; } else if (strcmp (inName, "Previous Adjacent Elevation Left") == 0) { newName = GW_ELEV_LEFT_C; } // ***************************************************** // *** Conditinally Issue Slot Name Change Warning *** // ***************************************************** if (newName && issueWarning) { rwWarning (SOBJID_STATE, MSG_OLD_SLOT, inName, newName); } return (newName ? newName : inName); } ---