From: Daniel Arndt Date: Sat, 7 Jul 2018 21:04:59 +0000 (+0200) Subject: Fix comments in @code blocks in base headers X-Git-Tag: v9.1.0-rc1~915^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c94ac7f3de56b350e608c332069a4c89a20bfc4;p=dealii.git Fix comments in @code blocks in base headers --- diff --git a/include/deal.II/base/auto_derivative_function.h b/include/deal.II/base/auto_derivative_function.h index 34950a8b14..7720d329cd 100644 --- a/include/deal.II/base/auto_derivative_function.h +++ b/include/deal.II/base/auto_derivative_function.h @@ -35,13 +35,18 @@ DEAL_II_NAMESPACE_OPEN * * @code * class UserFunction: public AutoDerivativeFunction - * { // access to one component at one point - * double value (const Point &p, const - * unsigned int component = 0) const - * { // Implementation .... }; - * } user_function; + * { + * // access to one component at one point + * double value (const Point &p, + * const unsigned int component = 0) const override + * { + * // Implementation .... + * }; + * }; * - * // gradient by employing difference quotients. + * UserFunction user_function; + * + * // gradient by employing difference quotients. * Tensor<1,dim> grad=user_function.gradient(some_point); * @endcode * diff --git a/include/deal.II/base/conditional_ostream.h b/include/deal.II/base/conditional_ostream.h index 0ff1dd36e8..381da973e2 100644 --- a/include/deal.II/base/conditional_ostream.h +++ b/include/deal.II/base/conditional_ostream.h @@ -49,13 +49,11 @@ DEAL_II_NAMESPACE_OPEN * @code * ConditionalOStream pout(std::cout, this_mpi_process==0); * - * // all processes print following - * // information to standard output + * // all processes print the following information to standard output * std::cout << "Reading parameter file on process " * << this_mpi_process << std::endl; * - * // following is printed by - * // process 0 only + * // following is printed by process 0 only * pout << "Solving ..." << std::endl; * solve(); * pout << "done" << std::endl; diff --git a/include/deal.II/base/parameter_acceptor.h b/include/deal.II/base/parameter_acceptor.h index df955e207e..db438221a6 100644 --- a/include/deal.II/base/parameter_acceptor.h +++ b/include/deal.II/base/parameter_acceptor.h @@ -78,31 +78,31 @@ DEAL_II_NAMESPACE_OPEN * * @code * // This is your own class, derived from ParameterAcceptor - * class MyClass : public ParameterAcceptor { - * - * // The constructor of ParameterAcceptor requires a std::string, - * // which defines the section name where the parameters of MyClass - * // will be stored. - * - * MyClass() : - * ParameterAcceptor("Some class name") + * class MyClass : public ParameterAcceptor * { - * add_parameter("A param", member_var); - * } + * // The constructor of ParameterAcceptor requires a std::string, + * // which defines the section name where the parameters of MyClass + * // will be stored. + * MyClass() + * : ParameterAcceptor("Some class name") + * { + * add_parameter("A param", member_var); + * } * * private: * std::vector member_var; - * ... + * ... * }; * - * int main() { - * // Make sure you create your object BEFORE calling - * // ParameterAcceptor::initialize() - * MyClass class; + * int main() + * { + * // Make sure you create your object BEFORE calling + * // ParameterAcceptor::initialize() + * MyClass class; * - * // With this call, all derived classes will have their - * // parameters initialized - * ParameterAcceptor::initialize("file.prm"); + * // With this call, all derived classes will have their + * // parameters initialized + * ParameterAcceptor::initialize("file.prm"); * } * @endcode * @@ -115,23 +115,26 @@ DEAL_II_NAMESPACE_OPEN * // If you don't pass anything to the constructor of * // ParameterAcceptor, then the class name is used, "MyClass" * // in this case - * class MyClass : public ParameterAcceptor { - * - * virtual void declare_parameters(ParameterHandler &prm) { - * ... + * class MyClass : public ParameterAcceptor + * { + * virtual void declare_parameters(ParameterHandler &prm) + * { + * ... * } * - * virtual void parse_parameters(ParameterHandler &prm) { + * virtual void parse_parameters(ParameterHandler &prm) + * { * ... * } * }; * - * int main() { - * // Make sure you create your object BEFORE calling - * // ParameterAcceptor::initialize() - * MyClass class; - * ParameterAcceptor::initialize("file.prm"); - * class.run(); + * int main() + * { + * // Make sure you create your object BEFORE calling + * // ParameterAcceptor::initialize() + * MyClass class; + * ParameterAcceptor::initialize("file.prm"); + * class.run(); * } * @endcode * @@ -162,17 +165,16 @@ DEAL_II_NAMESPACE_OPEN * @code * class MyClass : public ParameterAcceptor * { - * MyClass (std::string name); - * virtual void declare_parameters(ParameterHandler &prm); - * private: - * SomeParsedClass my_subclass; - * ... + * MyClass (std::string name); + * virtual void declare_parameters(ParameterHandler &prm); + * private: + * SomeParsedClass my_subclass; + * ... * }; * * MyClass::MyClass(std::string name) - * : - * ParameterAcceptor(name), - * my_subclass("Forcing term") + * : ParameterAcceptor(name) + * , my_subclass("Forcing term") * {} * * void MyClass::declare_parmeters(ParameterHandler &prm) @@ -184,8 +186,8 @@ DEAL_II_NAMESPACE_OPEN * * int main() * { - * MyClass mc("My Class"); - * ParameterAcceptor::initialize("file.prm"); + * MyClass mc("My Class"); + * ParameterAcceptor::initialize("file.prm"); * } * @endcode * @@ -229,9 +231,8 @@ DEAL_II_NAMESPACE_OPEN * the constructor of MyClass: * @code * MyClass::MyClass(std::string name) - * : - * ParameterAcceptor(name), - * my_subclass(name+" --- forcing term") + * : ParameterAcceptor(name) + * , my_subclass(name+" --- forcing term") * {} * @endcode * diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index f056df7049..b5b906e9f4 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -66,12 +66,12 @@ class MultipleParameterLoop; * ... * ParameterHandler prm; * prm.declare_entry ("Time step size", - * "0.2", - * Patterns::Double(), - * "Some documentation"); + * "0.2", + * Patterns::Double(), + * "Some documentation"); * prm.declare_entry ("Geometry", - * "[0,1]x[0,1]", - * Patterns::Anything()); + * "[0,1]x[0,1]", + * Patterns::Anything()); * ... * @endcode * Each entry is declared using the function declare_entry(). The first @@ -91,43 +91,45 @@ class MultipleParameterLoop; * example input parameters for linear solver routines should be classified in * a subsection named Linear solver or any other suitable name. This * is accomplished in the following way: - * @code - * ... - * LinEq eq; - * eq.declare_parameters (prm); + * @code + * ... + * LinEq eq; + * eq.declare_parameters (prm); + * ... + * + * void LinEq::declare_parameters (ParameterHandler &prm) + * { + * prm.enter_subsection("Linear solver"); + * { + * prm.declare_entry ("Solver", + * "CG", + * Patterns::Selection("CG|GMRES|GaussElim"), + * "Name of a linear solver for the inner iteration"); + * prm.declare_entry ("Maximum number of iterations", "20", + * ParameterHandler::RegularExpressions::Integer()); * ... - * - * void LinEq::declare_parameters (ParameterHandler &prm) { - * prm.enter_subsection("Linear solver"); - * { - * prm.declare_entry ("Solver", - * "CG", - * Patterns::Selection("CG|GMRES|GaussElim"), - * "Name of a linear solver for the inner - * iteration"); prm.declare_entry ("Maximum number of iterations", "20", - * ParameterHandler::RegularExpressions::Integer()); - * ... - * } - * prm.leave_subsection (); - * } - * @endcode + * } + * prm.leave_subsection (); + * } + * @endcode * * Subsections may be nested. For example a nonlinear solver may have a linear * solver as member object. Then the function call tree would be something * like (if the class NonLinEq has a member variables eq of * type LinEq): - * @code - * void NonLinEq::declare_parameters (ParameterHandler &prm) { - * prm.enter_subsection ("Nonlinear solver"); - * { - * prm.declare_entry ("Nonlinear method", - * "Newton-Raphson", - * ParameterHandler::RegularExpressions::Anything()); - * eq.declare_parameters (prm); - * } - * prm.leave_subsection (); - * } - * @endcode + * @code + * void NonLinEq::declare_parameters (ParameterHandler &prm) + * { + * prm.enter_subsection ("Nonlinear solver"); + * { + * prm.declare_entry ("Nonlinear method", + * "Newton-Raphson", + * ParameterHandler::RegularExpressions::Anything()); + * eq.declare_parameters (prm); + * } + * prm.leave_subsection (); + * } + * @endcode * * For class member functions which declare the different entries we propose * to use the common name declare_parameters. In normal cases this @@ -137,25 +139,26 @@ class MultipleParameterLoop; * has two or more member variables of the same type both of which should have * their own parameters, this parent class' method declare_parameters * is responsible to group them into different subsections: - * @code - * void NonLinEq::declare_parameters (ParameterHandler &prm) { - * prm.enter_subsection ("Nonlinear solver"); - * { - * prm.enter_subsection ("Linear solver 1"); - * { - * eq1.declare_parameters (prm); - * } - * prm.leave_subsection (); - * - * prm.enter_subsection ("Linear solver 2"); - * { - * eq2.declare_parameters (prm); - * } - * prm.leave_subsection (); - * } - * prm.leave_subsection (); + * @code + * void NonLinEq::declare_parameters (ParameterHandler &prm) + * { + * prm.enter_subsection ("Nonlinear solver"); + * { + * prm.enter_subsection ("Linear solver 1"); + * { + * eq1.declare_parameters (prm); * } - * @endcode + * prm.leave_subsection (); + * + * prm.enter_subsection ("Linear solver 2"); + * { + * eq2.declare_parameters (prm); + * } + * prm.leave_subsection (); + * } + * prm.leave_subsection (); + * } + * @endcode * * *

Input files and special characters

@@ -257,7 +260,8 @@ class MultipleParameterLoop; * Each class gets its data out of a ParameterHandler object by calling the * get() member functions like this: * @code - * void NonLinEq::get_parameters (ParameterHandler &prm) { + * void NonLinEq::get_parameters (ParameterHandler &prm) + * { * prm.enter_subsection ("Nonlinear solver"); * std::string method = prm.get ("Nonlinear method"); * eq.get_parameters (prm); @@ -343,8 +347,7 @@ class MultipleParameterLoop; * prm.declare_entry ("Number of iterations", // name of parameter * "10", // default value * Patterns::Integer(1,100),// allowed values: 1...100 - * "The number of ..."); // some documentation, to be - * completed + * "The number of ..."); // some documentation * * // next read the parameter from an input file... * prm.parse_input ("my_algorithm.prm"); @@ -371,9 +374,10 @@ class MultipleParameterLoop; * prm.declare_entry ("Number of iterations", // name of parameter * "10", // default value * Patterns::Integer(1,100),// allowed values: 1...100 - * "The number of ..."); // some documentation, to be - * completed prm.add_action ("Number of iterations", - * [&](const std::string &value) { + * "The number of ..."); // some documentation + * prm.add_action ("Number of iterations", + * [&](const std::string &value) + * { * this->n_iterations = Utilities::string_to_int(value); * }); * @@ -495,11 +499,12 @@ class MultipleParameterLoop; * void Problem::declare_parameters (ParameterHandler &prm) * { * // first some global parameter entries - * prm.declare_entry ("Output file", - * "out", - * Patterns::Anything(), - * "Name of the output file, either relative to the - * present " "path or absolute"); prm.declare_entry ("Equation 1", "Laplace", + * prm.declare_entry ( + * "Output file", + * "out", + * Patterns::Anything(), + * "Name of the output file, either relative or absolute"); + * prm.declare_entry ("Equation 1", "Laplace", * Patterns::Anything(), * "String identifying the equation we want to solve"); * prm.declare_entry ("Equation 2", @@ -553,11 +558,11 @@ class MultipleParameterLoop; * eq2.get_parameters (prm); // for eq2 * } * prm.leave_subsection (); - * std::cout << " Problem: outfile=" << outfile << '\n' - * << " eq1=" << equation1 << ", eq2=" << equation2 - * << '\n' - * << " matrix1=" << matrix1 << ", matrix2=" << matrix2 - * << std::endl; + * std::cout + * << " Problem: outfile=" << outfile << '\n' + * << " eq1=" << equation1 << ", eq2=" << equation2 << '\n' + * << " matrix1=" << matrix1 << ", matrix2=" << matrix2 + * << std::endl; * } * * @@ -693,13 +698,17 @@ class MultipleParameterLoop; * "up on a matrix."); * prm.enter_subsection ("Preconditioner"); * { - * prm.declare_entry ("Kind", - * "SSOR", - * Patterns::Selection ("SSOR|Jacobi"), - * "A string that describes the kind of preconditioner - * " "to use."); prm.declare_entry ("Relaxation factor", "1.0", Patterns::Double - * (0, 1), "The numerical value (between zero and one) for the " "relaxation - * factor to use in the preconditioner."); + * prm.declare_entry( + * "Kind", + * "SSOR", + * Patterns::Selection ("SSOR|Jacobi"), + * "A string that describes the kind of preconditioner to use."); + * prm.declare_entry( + * "Relaxation factor", + * "1.0", + * Patterns::Double (0, 1), + * "The numerical value (between zero and one) for the " + * "relaxation factor to use in the preconditioner."); * } * prm.leave_subsection (); * @endcode @@ -751,26 +760,35 @@ class MultipleParameterLoop; * * 10 * 10 - * A parameter that describes the maximal number of - * iterations the CG method is to take before giving up on a - * matrix. 0 [Integer - * range 1...1000 (inclusive)] + * + * A parameter that describes the maximal number of iterations the CG + * method is to take before giving up on a matrix. + * + * 0 + * + * [Integer range 1...1000 (inclusive)] + * * * * SSOR * SSOR - * A string that describes the kind of preconditioner to - * use. 1 + * + * A string that describes the kind of preconditioner to use. + * + * 1 * SSOR|Jacobi * * * 1.0 * 1.0 - * The numerical value (between zero and one) for the - * relaxation factor to use in the preconditioner. + * + * The numerical value (between zero and one) for the relaxation + * factor to use in the preconditioner. + * * 2 - * [Floating point range 0...1 - * (inclusive)] + * + * [Floating point range 0...1 (inclusive)] + * * * * @@ -937,8 +955,8 @@ public: * << "> with default values for you." * << std::endl; * std::ofstream output (filename); - * parameter_handler.print_parameters (output, - * ParameterHandler::OutputStyle::Text); + * parameter_handler.print_parameters( + * output, ParameterHandler::OutputStyle::Text); * } * } * @endcode @@ -1279,8 +1297,8 @@ public: * @code * \usepackage{imakeidx} * \makeindex[name=prmindex, title=Index of run-time parameter entries] - * \makeindex[name=prmindexfull, title=Index of run-time parameters with - * section names] + * \makeindex[name=prmindexfull, + * title=Index of run-time parameters with section names] * @endcode * and at the end of the file this: * @code diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index a6b3c172f7..cf675452fe 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1268,8 +1268,8 @@ namespace Patterns * ... // Build compare class * std::map, std::vector, compare> map; * - * map = convert::to_value("1,2,3 : 5.0,6.0,7.0 ; 8,9,10 : - * 11.0,12.0,13.0"); + * map = convert::to_value( + * "1,2,3 : 5.0,6.0,7.0 ; 8,9,10 : 11.0,12.0,13.0"); * * @endcode * diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index 3e07cd955b..1ba7b2fef1 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -299,7 +299,7 @@ namespace parallel * This class can then be use with CellDataStorage in the following way: * @code * CellDataStorage::cell_iterator,MyQData> - * data_storage; + * data_storage; * parallel::distributed::ContinuousQuadratureDataTransfer * data_transfer(FE_Q(2),QGauss(3),QGauss(4)); * //...populate data for all active cells in data_storage @@ -307,7 +307,8 @@ namespace parallel * data_transfer.prepare_for_coarsening_and_refinement(triangulation,data_storage); * triangulation.execute_coarsening_and_refinement(); * //...initialize quadrature point data on new cells by calling - * CellDataStorage::reinit() data_transfer.interpolate(); + * // CellDataStorage::initialize() + * data_transfer.interpolate(); * @endcode * This approach can be extended to quadrature point data with Tensors of * arbitrary order, although with a little bit more work in packing and diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index bf2d314c90..918b64328e 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -109,7 +109,10 @@ struct constraint_and_return_value; * particular call. Example: * @code * template - * typename T::type foo(T) {...}; + * typename T::type foo(T) + * { + * ... + * }; * ... * foo(1); * @endcode @@ -122,25 +125,40 @@ struct constraint_and_return_value; * The idea is then to make the return type un-instantiatable if certain * constraints on the template types are not satisfied: * @code - * template struct constraint_and_return_value; - * template struct constraint_and_return_value { + * template + * struct constraint_and_return_value; + * + * template + * struct constraint_and_return_value + * { * using type = T; * }; * @endcode * constraint_and_return_value is not defined. Given something like * @code * template - * struct int_or_double { static const bool value = false;}; + * struct int_or_double + * { + * static const bool value = false; + * }; + * * template <> - * struct int_or_double { static const bool value = true; }; + * struct int_or_double + * { + * static const bool value = true; + * }; + * * template <> - * struct int_or_double { static const bool value = true; }; + * struct int_or_double + * { + * static const bool value = true; + * }; * @endcode * we can write a template * @code * template * typename constraint_and_return_value::value,void>::type - * f (T); + * f (T); * @endcode * which can only be instantiated if T=int or T=double. A call to f('c') will * just fail with a compiler error: "no instance of f(char) found". On the @@ -165,14 +183,16 @@ struct DEAL_II_DEPRECATED constraint_and_return_value * alias. This class, while at first appearing useless, makes sense in the * following context: if you have a function template as follows: * @code - * template void f(T, T); + * template + * void f(T, T); * @endcode * then it can't be called in an expression like f(1, 3.141) * because the type T of the template can not be deduced in a * unique way from the types of the arguments. However, if the template is * written as * @code - * template void f(T, typename identity::type); + * template + * void f(T, typename identity::type); * @endcode * then the call becomes valid: the type T is not deducible from * the second argument to the function, so only the first argument @@ -181,7 +201,10 @@ struct DEAL_II_DEPRECATED constraint_and_return_value * The context for this feature is as follows: consider * @code * template - * void forward_call(RT (*p) (A), A a) { p(a); } + * void forward_call(RT (*p) (A), A a) + * { + * p(a); + * } * * void h (double); * @@ -199,7 +222,10 @@ struct DEAL_II_DEPRECATED constraint_and_return_value * this by writing the code as follows: * @code * template - * void forward_call(RT (*p) (A), typename identity::type a) { p(a); } + * void forward_call(RT (*p) (A), typename identity::type a) + * { + * p(a); + * } * * void h (double); * @@ -275,7 +301,8 @@ namespace internal * * @code * template - * class X { + * class X + * { * // do something on subdim-dimensional sub-objects of the big * // dim-dimensional thing (for example on vertices/lines/quads of * // cells): @@ -284,9 +311,13 @@ namespace internal * * template * template <> - * void X::f<0> () { ...operate on the vertices of a cell... } + * void X::f<0> () + * { + * ...operate on the vertices of a cell... + * } * - * template void g(X &x) { + * template void g(X &x) + * { * x.f (); * } * @endcode @@ -296,10 +327,13 @@ namespace internal * the common tricks is therefore to use something like this: * * @code - * template struct int2type {}; + * template + * struct int2type + * {}; * * template - * class X { + * class X + * { * // do something on subdim-dimensional sub-objects of the big * // dim-dimensional thing (for example on vertices/lines/quads of * // cells): @@ -310,12 +344,20 @@ namespace internal * }; * * template - * void X::f (int2type<0>) { ...operate on the vertices of a cell... } + * void X::f (int2type<0>) + * { + * ...operate on the vertices of a cell... + * } * * template - * void X::f (int2type<1>) { ...operate on the lines of a cell... } + * void X::f (int2type<1>) + * { + * ...operate on the lines of a cell... + * } * - * template void g(X &x) { + * template + * void g(X &x) + * { * x.f (int2type()); * } * @endcode @@ -353,7 +395,8 @@ namespace internal * to write code like * @code * template - * void Vector::some_operation () { + * void Vector::some_operation () + * { * if (std::is_same::value == true) * call_some_blas_function_for_doubles; * else @@ -513,7 +556,10 @@ namespace internal * consider the following function: * @code * template - * T multiply (const T t1, const T t2) { return t1*t2; } + * T multiply (const T t1, const T t2) + * { + * return t1*t2; + * } * @endcode * This function can be called with any two arguments of the same type @p T. * This includes arguments for which this clearly makes no sense. @@ -522,7 +568,10 @@ namespace internal * @code * template * typename EnableIfScalar::type - * multiply (const T t1, const T t2) { return t1*t2; } + * multiply (const T t1, const T t2) + * { + * return t1*t2; + * } * @endcode * At a place where you call the function, the compiler will deduce the type * @p T from the arguments. For example, in diff --git a/include/deal.II/base/tensor_accessors.h b/include/deal.II/base/tensor_accessors.h index f8efb0e1f2..3055798b4d 100644 --- a/include/deal.II/base/tensor_accessors.h +++ b/include/deal.II/base/tensor_accessors.h @@ -201,7 +201,8 @@ namespace TensorAccessors /** * Return a reference (const or non-const) to a subobject of a tensorial * object @p t of type @p T, as described by an array type @p ArrayType - * object @p indices. For example: @code + * object @p indices. For example: + * @code * Tensor<5, dim> tensor; * TableIndices<5> indices (0, 1, 2, 3, 4); * TensorAccessors::extract(tensor, indices) = 42; @@ -256,7 +257,8 @@ namespace TensorAccessors * ... * for(unsigned int k_ = 0; k_ < dim; ++k_) * result[i_0]..[i_][j_0]..[j_] += - * left[i_0]..[i_][k_0]..[k_] * right[j_0]..[j_][k_0]..[k_]; + * left[i_0]..[i_][k_0]..[k_] + * * right[j_0]..[j_][k_0]..[k_]; * } * @endcode * with r = rank_1 + rank_2 - 2 * no_contr, l = rank_1 - no_contr, l1 = @@ -312,8 +314,9 @@ namespace TensorAccessors * for(unsigned int j_0 = 0; j_0 < dim; ++j_0) * ... * for(unsigned int j_ = 0; j_ < dim; ++j_) - * result += left[i_0]..[i_] * middle[i_0]..[i_][j_0]..[j_] * - * right[j_0]..[j_]; + * result += left[i_0]..[i_] + * * middle[i_0]..[i_][j_0]..[j_] + * * right[j_0]..[j_]; * @endcode * * @note The Types @p T2, @p T3, and @p T4 must have rank rank_1, rank_1 + diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 21cb8cd747..597bc5cdfe 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1086,15 +1086,19 @@ namespace Threads * the returned object, instead of the returned object. This * allows writing code such as * @code - * Threads::Thread t = Threads::new_thread (...function returning an - * int...); t.return_value() = 42; // overwrite returned value int i = - * t.return_value(); // i is now 42 + * Threads::Thread t = Threads::new_thread ( + * ...function returning an int...); + * t.return_value() = 42; // overwrite returned value + * int i = t.return_value(); // i is now 42 * @endcode * You will rarely have a need to write such code. On the other hand, * the function needs to return a writable (non-@p const) reference to * support code such as this: * @code - * std::unique_ptr create_int (const std::string &s) { ... } + * std::unique_ptr create_int (const std::string &s) + * { + * ... + * } * * void f() * { diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index ca25b4dad6..298ea3f42d 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -584,12 +584,24 @@ namespace Utilities * * An example of how this function works is as follows: * @code - * class B { ... }; // A base class. Assume that it has virtual - * // functions so that dynamic_cast can work. - * class D : public B { ... }; // A derived class + * // A base class. Assume that it has virtual + * // functions so that dynamic_cast can work. + * class B + * { + * ... + * }; * + * // A derived class + * class D : public B + * { + * ... + * }; * - * std::unique_ptr create_object (...) {...} // A factory function + * // A factory function + * std::unique_ptr create_object (...) + * { + * ... + * } * * void foo (...) * {