A new device concept based on coherent processing of optical signals and allowing generation of ultrafast all-optical functions is introduced. The device is modeled by rate equations and its functionality is demonstrated by studying the re-amplification and re-shaping (2R) regeneration of a 30-GHz signal in detail. The main components of the regenerator are phase-locked lasers, optical isolators and band pass filters. Small signal analysis of the model predicts that bandwidths in excess of 100 GHz might be attainable. The technological feasibility of the device is also discussed.