+ name=n;
+ if (tn==std::string())
+ TeX_name = "\\\\mbox{"+name+"}";
+ else
+ TeX_name = tn;
+ return *this;
+}
+
+function_options & function_options::latex_name(std::string const & tn)
+{
+ TeX_name=tn;
+ return *this;
+}
+
+// the following lines have been generated for max. ${maxargs} parameters
+$eval_func_implementation
+$evalf_func_implementation
+$derivative_func_implementation
+$series_func_implementation
+// end of generated lines
+
+function_options & function_options::set_return_type(unsigned rt, unsigned rtt)
+{
+ use_return_type = true;
+ return_type = rt;
+ return_type_tinfo = rtt;
+ return *this;
+}
+
+function_options & function_options::do_not_evalf_params(void)
+{
+ evalf_params_first = false;
+ return *this;
+}
+
+function_options & function_options::remember(unsigned size,
+ unsigned assoc_size,
+ unsigned strategy)
+{
+ use_remember = true;
+ remember_size = size;
+ remember_assoc_size = assoc_size;
+ remember_strategy = strategy;
+ return *this;
+}
+
+function_options & function_options::overloaded(unsigned o)
+{
+ functions_with_same_name = o;
+ return *this;
+}
+
+function_options & function_options::set_symmetry(const symmetry & s)
+{
+ symtree = s;
+ return *this;
+}
+
+void function_options::test_and_set_nparams(unsigned n)
+{
+ if (nparams==0) {
+ nparams = n;
+ } else if (nparams!=n) {
+ // we do not throw an exception here because this code is
+ // usually executed before main(), so the exception could not
+ // caught anyhow
+ std::cerr << "WARNING: number of parameters ("
+ << n << ") differs from number set before ("
+ << nparams << ")" << std::endl;
+ }
+}
+
+GINAC_IMPLEMENT_REGISTERED_CLASS(function, exprseq)
+
+//////////
+// default ctor, dtor, copy ctor assignment operator and helpers
+//////////
+
+// public
+
+function::function() : serial(0)
+{
+ debugmsg("function default ctor",LOGLEVEL_CONSTRUCT);
+ tinfo_key = TINFO_function;