extensions/journal/chronicler.cc
void
pyre::journal::py::
chronicler(py::module & m) {

    // the chronicler interface
    py::class_<chronicler_t>(m, "Chronicler")
        // accessors
        // verbosity
        .def_property_static("verbosity",
                             // the getter
                             [](py::object) {
                                 return chronicler_t::verbosity();
                             },
                             // the setter
                             [](py::object, chronicler_t::verbosity_type verbosity) {
                                 chronicler_t::verbosity(verbosity);
                             },
                             // the docstring
                             "access the maximum verbosity level"
                             )

        // device
        .def_property_static("device",
                             // the getter
                             [](py::object) {
                                 return chronicler_t::device();
                             },
                             // the setter
                             [](py::object, chronicler_t::device_type device) {
                                 chronicler_t::device(device);
                             },
                             // the docstring
                             "access the default device"
                             )

        // global metadata
        .def_property_readonly_static("notes",
                                      // the getter
                                      [] (py::object) -> chronicler_t::notes_type & {
                                          return chronicler_t::notes();
                                      },
                                      // the docstring
                                      "access the global metadata"
                                      )
        // send output to a trash can
        .def_static("quiet",
                    // the implementation
                    &chronicler_t::quiet,
                    // the docstring
                    "suppress all output from all channels"
                    )

         // all done
        ;

    // all done
    return;
}
// add bindings for the chronicler, the object that holds the journal global state
add bindings for the chronicler, the object that holds the journal global state
add bindings for the chronicler the object that holds the journal global state
void
pyre::journal::py::
chronicler(py::module & m) {
    py::class_<chronicler_t>(m, "Chronicler")
        .def_property_static("verbosity",
                             [](py::object) {
                                 return chronicler_t::verbosity();
                             },
                             [](py::object, chronicler_t::verbosity_type verbosity) {
                                 chronicler_t::verbosity(verbosity);
                             },
                             "access the maximum verbosity level"
                             )
        .def_property_static("device",
                             [](py::object) {
                                 return chronicler_t::device();
                             },
                             [](py::object, chronicler_t::device_type device) {
                                 chronicler_t::device(device);
                             },
                             "access the default device"
                             )
        .def_property_readonly_static("notes",
                                      [] (py::object) -> chronicler_t::notes_type & {
                                          return chronicler_t::notes();
                                      },
                                      "access the global metadata"
                                      )
        .def_static("quiet",
                    &chronicler_t::quiet,
                    "suppress all output from all channels"
                    )
        ;
    return;
}
void pyre :: journal :: py :: chronicler ( py :: module & m ) { py :: class_ < chronicler_t > ( m , " " ) . def_property_static ( " " , [ ] ( py :: object ) { return chronicler_t :: verbosity ( ) ; } , [ ] ( py :: object , chronicler_t :: verbosity_type verbosity ) { chronicler_t :: verbosity ( verbosity ) ; } , " " ) . def_property_static ( " " , [ ] ( py :: object ) { return chronicler_t :: device ( ) ; } , [ ] ( py :: object , chronicler_t :: device_type device ) { chronicler_t :: device ( device ) ; } , " " ) . def_property_readonly_static ( " " , [ ] ( py :: object ) -> chronicler_t :: notes_type & { return chronicler_t :: notes ( ) ; } , " " ) . def_static ( " " , & chronicler_t :: quiet , " " ) ; return ; }
add bindings for the chronicler, the object that holds the journal global state
add bindings for the chronicler the object that holds the journal global state
// the chronicler interface // accessors // verbosity // the getter // the setter // the docstring // device // the getter // the setter // the docstring // global metadata // the getter // the docstring // send output to a trash can // the implementation // the docstring // all done // all done