pub fn generate_c_function_def(&self, replace_first: FirstArgType) -> String {
        let mut function_args = String::with_capacity(128);
        let len = self.function_args.len();

        // write arguments
        for (i, arg) in self.function_args.iter().enumerate() {
            if i == 0 {
                match replace_first {
                    FirstArgType::Keep => function_args.push_str(&arg.get_c_type(IsReturnType::No)),
                    //FirstArgType::Remove => continue,
                    //FirstArgType::Event(ref arg) => function_args.push_str(&arg),
                }
            } else {
                function_args.push_str(&arg.get_c_type(IsReturnType::No));
            }

            function_args.push_str(" ");
            function_args.push_str(&arg.name);

            if i != len - 1 {
                function_args.push_str(", ");
            }
        }

        function_args
    }
///
/// Takes a function definition and generates a C function def from it
///
/// For example: "float test, uint32_t bar"
///
Takes a function definition and generates a C function def from it
For example: "float test, uint32_t bar"
Takes a function definition and generates a C function def from it For example : " float test uint32_t bar "
pub fn generate_c_function_def(&self, replace_first: FirstArgType) -> String {
        let mut function_args = String::with_capacity(128);
        let len = self.function_args.len();
        // write arguments
        for (i, arg) in self.function_args.iter().enumerate() {
            if i == 0 {
                match replace_first {
                    FirstArgType::Keep => function_args.push_str(&arg.get_c_type(IsReturnType::No)),
                    //FirstArgType::Remove => continue,
                    //FirstArgType::Event(ref arg) => function_args.push_str(&arg),
                }
            } else {
                function_args.push_str(&arg.get_c_type(IsReturnType::No));
            }
            function_args.push_str(" ");
            function_args.push_str(&arg.name);
            if i != len - 1 {
                function_args.push_str(", ");
            }
        }
        function_args
    }
pub fn generate_c_function_def ( & self , replace_first : FirstArgType ) -> String { let mut function_args = String :: with_capacity ( 128 ) ; let len = self . function_args . len ( ) ; // write arguments for ( i , arg ) in self . function_args . iter ( ) . enumerate ( ) { if i == 0 { match replace_first { FirstArgType :: Keep => function_args . push_str ( & arg . get_c_type ( IsReturnType :: No ) ) , //FirstArgType::Remove => continue, //FirstArgType::Event(ref arg) => function_args.push_str(&arg), } } else { function_args . push_str ( & arg . get_c_type ( IsReturnType :: No ) ) ; } function_args . push_str ( " " ) ; function_args . push_str ( & arg . name ) ; if i != len - 1 { function_args . push_str ( " " ) ; } } function_args }
Takes a function definition and generates a C function def from it
For example: "float test, uint32_t bar"
Takes a function definition and generates a C function def from it For example : " float test uint32_t bar "
&self
replace_first
FirstArgType
&self
replace_first
FirstArgType