Xantrex is a brand of inverter that has a charger and switch built in. When not hooked to shore power it will convert 12V DC to 120V AC.
When on it will convert the power as previously stated so you have 120V AC for dry camping. At the same time it has a built in switch to stop the AC output of the inverter when you plug into shore power.
These are usually used with multiple batteries and solar panels for people that like their comforts when boon docking.