protected function marshallComplex(QtiDatatype $complex)
    {
        if ($complex instanceof QtiPoint) {
            return $this->marshallPoint($complex);
        } elseif ($complex instanceof QtiDirectedPair) {
            return $this->marshallDirectedPair($complex);
        } elseif ($complex instanceof QtiPair) {
            return $this->marshallPair($complex);
        } elseif ($complex instanceof QtiDuration) {
            return $this->marshallDuration($complex);
        } elseif ($complex instanceof QtiFile) {
            return $this->marshallFile($complex);
        }
    }