* <tt>ParameterHandler</tt> in order to get a valid XML document and all
* subsections under it.
*
- * In <tt>Text</tt> format, the output contains the same information but in
+ * In <tt>LaTeX</tt> format, the output contains the same information but in
* a format so that the resulting file can be input into a latex document
* such as a manual for the code for which this object handles run-time
* parameters. The various sections of parameters are then represented by
for (boost::property_tree::ptree::const_assoc_iterator
p = current_section.ordered_begin();
p != current_section.not_found(); ++p)
- if (is_parameter_node (p->second) == true)
+ if ((is_parameter_node (p->second) == true)
+ ||
+ (is_alias_node (p->second) == true))
{
parameters_exist_here = true;
break;
<< p->second.get<std::string> ("pattern_description")
<< std::endl;
}
+ else if (is_alias_node (p->second) == true)
+ {
+ const std::string alias = p->second.get<std::string>("alias");
+
+ // print name
+ out << "\\item {\\it Parameter name:} {\\tt " << demangle(p->first) << "}\n"
+ << "\\phantomsection\\label{parameters:";
+ for (unsigned int i=0; i<subsection_path.size(); ++i)
+ out << subsection_path[i] << "/";
+ out << demangle(p->first);
+ out << "}\n\n"
+ << std::endl;
+
+ out << "\\index[prmindex]{"
+ << demangle(p->first)
+ << "}\n";
+ out << "\\index[prmindexfull]{";
+ for (unsigned int i=0; i<subsection_path.size(); ++i)
+ out << subsection_path[i] << "!";
+ out << demangle(p->first)
+ << "}\n";
+
+ // finally print value and default
+ out << "This parameter is an alias for the parameter ``\\texttt{"
+ << alias << "}''.\n\n"
+ << std::endl;
+ }
out << "\\end{itemize}" << std::endl;
}
prm.declare_entry ("int",
"1",
Patterns::Integer());
+ prm.declare_alias ("int",
+ "int_alias");
prm.declare_entry ("double",
"3.1415926",
Patterns::Double(),
"docs 3");
+ prm.declare_alias ("double",
+ "double_alias");
}
prm.leave_subsection ();
{\it Possible values:} [Double -1.79769e+308...1.79769e+308 (inclusive)]
+\item {\it Parameter name:} {\tt double_alias}
+\phantomsection\label{parameters:Testing/double_alias}
+
+
+\index[prmindex]{double_alias}
+\index[prmindexfull]{Testing!double_alias}
+This parameter is an alias for the parameter ``\texttt{double}''.
+
+
\item {\it Parameter name:} {\tt int}
\phantomsection\label{parameters:Testing/int}
{\it Possible values:} [Integer range -2147483648...2147483647 (inclusive)]
+\item {\it Parameter name:} {\tt int_alias}
+\phantomsection\label{parameters:Testing/int_alias}
+
+
+\index[prmindex]{int_alias}
+\index[prmindexfull]{Testing!int_alias}
+This parameter is an alias for the parameter ``\texttt{int}''.
+
+
\item {\it Parameter name:} {\tt string list}
\phantomsection\label{parameters:Testing/string list}