fn generate_event_remove_set<W: Write>(
        &self,
        dest: &mut W,
        sdef: &Struct,
        func: &Function,
    ) -> io::Result<()> {
        let mut object = Object::new();

        object.insert("type_name".into(), Value::scalar(sdef.name.to_snake_case()));
        object.insert("event_type_snake".into(), Value::scalar(&func.name));
        object.insert("event_type".into(), Value::scalar(&sdef.name));
        object.insert(
            "event_name".into(),
            Value::scalar(func.name.to_snake_case()),
        );
        object.insert(
            "event_args".into(),
            Value::scalar(&func.gen_c_def_filter(Some(Some("void*, void*".into())), |_, _| None)),
        );

        let res = self.set_event_template.render(&object).unwrap();
        dest.write_all(res.as_bytes())
    }
///
/// Generate the set/remove functions for events
///
Generate the set/remove functions for events
Generate the set / remove functions for events
fn generate_event_remove_set<W: Write>(
        &self,
        dest: &mut W,
        sdef: &Struct,
        func: &Function,
    ) -> io::Result<()> {
        let mut object = Object::new();
        object.insert("type_name".into(), Value::scalar(sdef.name.to_snake_case()));
        object.insert("event_type_snake".into(), Value::scalar(&func.name));
        object.insert("event_type".into(), Value::scalar(&sdef.name));
        object.insert(
            "event_name".into(),
            Value::scalar(func.name.to_snake_case()),
        );
        object.insert(
            "event_args".into(),
            Value::scalar(&func.gen_c_def_filter(Some(Some("void*, void*".into())), |_, _| None)),
        );
        let res = self.set_event_template.render(&object).unwrap();
        dest.write_all(res.as_bytes())
    }
fn generate_event_remove_set < W : Write > ( & self , dest : & mut W , sdef : & Struct , func : & Function , ) -> io :: Result < ( ) > { let mut object = Object :: new ( ) ; object . insert ( " " . into ( ) , Value :: scalar ( sdef . name . to_snake_case ( ) ) ) ; object . insert ( " " . into ( ) , Value :: scalar ( & func . name ) ) ; object . insert ( " " . into ( ) , Value :: scalar ( & sdef . name ) ) ; object . insert ( " " . into ( ) , Value :: scalar ( func . name . to_snake_case ( ) ) , ) ; object . insert ( " " . into ( ) , Value :: scalar ( & func . gen_c_def_filter ( Some ( Some ( " " . into ( ) ) ) , | _ , _ | None ) ) , ) ; let res = self . set_event_template . render ( & object ) . unwrap ( ) ; dest . write_all ( res . as_bytes ( ) ) }
Generate the set/remove functions for events
Generate the set / remove functions for events
&self
dest
&mut W
sdef
&Struct
func
&Function
&self
dest
&mut W
sdef
&Struct
func
&Function