Let $X$, $A$, and $B$ be topological spaces. I'm interested in functions $f:A\rightarrow B$ that preserve continuous functions with domain $X$; that is functions $f$ such that
$f\circ a:X\rightarrow B$ is continuous whenever $a:X\rightarrow A$ is continuous.
Call such a function $X$-continuous. So $X$-continuity is vacuous if $X$ is discrete, and $X$ continuity coincides with continuity when $X=A$.
Can anybody point me to a reference where such functions are studied? (In particular, for fixed $A,B$, I want to know for which $X$ are continuity and $X$-continuity equivalent.)