The robustness and reliability of synthetic biological systems can be substantially improved by the introduction of feedback control architectures that parallel those employed in traditional engineering disciplines. One common control goal is adaptation (or disturbance rejection), which refers to a system's ability to maintain a constant output despite variation in some of its constituent processes (as frequently occurs in noisy cellular environments) or external perturbations. In this paper we propose and analyse a control architecture that employs Integrase and Excisionase proteins to invert regions of DNA, and an mRNA-mRNA annihilation reaction. Combined, these components approximate the functionality of a switching controller (as employed in classical control engineering) with three distinct operational modes. We demonstrate that this system is capable of near-perfect adaptation to variation in rates of both transcription and translation, and can also operate without excessive consumption of cellular resources. The system's steady state behaviour is analysed, and limits on its operating range are derived. Deterministic simulations of its dynamics are presented, and are then extended to the stochastic case which treats biochemical reactions as discrete events.