Remove the example code from the interpreter namespace docs again

I can't seem to convince sphinx/breathe/doxygen to include them like
they work in the class docs.

I tried the markdown quotes, spaces, \code/\endcode, \rst/\endrst but no luck yet.
This commit is contained in:
Simon Hausmann 2021-04-27 14:11:46 +02:00
parent 140de87351
commit 1e089389e5

View file

@ -38,44 +38,6 @@ struct ErasedComponentBox : vtable::Dyn
/// The entry point for this namespace is the \ref ComponentCompiler, which you can /// The entry point for this namespace is the \ref ComponentCompiler, which you can
/// use to create \ref ComponentDefinition instances with the ComponentCompiler::build_from_source() /// use to create \ref ComponentDefinition instances with the ComponentCompiler::build_from_source()
/// or ComponentCompiler::build_from_path() functions. /// or ComponentCompiler::build_from_path() functions.
///
/// Example:
///
/// This example loads a `.60` dynamically from a path:
///
/// ```
/// #include <sixtyfps_interpreter.h>
///
/// sixtyfps::interpreter::ComponentCompiler compiler;
/// auto definition =
/// compiler.build_from_path("hello.60");
/// if (definition) {
/// auto instance = definition->create();
/// instance->run();
/// }
/// ```
///
/// This example loads a `.60` from a string and set some properties:
///
/// ```
/// #include <sixtyfps_interpreter.h>
///
/// std::string code = R"(
/// MyWin := Window {
/// property <string> my_name;
/// Text {
/// text: "Hello, " + my_name;
/// }
/// }
/// )";
///
/// sixtyfps::interpreter::ComponentCompiler compiler;
/// auto definition =
/// compiler.build_from_source(code, "");
/// auto instance = definition->create();
/// instance->set_property("my_name",
/// sixtyfps::interpreter::Value(sixtyfps::SharedString("World"))); instance->run();
/// ```
namespace sixtyfps::interpreter { namespace sixtyfps::interpreter {
class Value; class Value;