codespawn 0.3.3

C++ and Rust code generator. Supports XML and JSON for API definitions.
Documentation
// !!! Autogenerated with codespawn (0.3.0) - do not modify. !!!
pub extern void_ptr: *mut c_void;
pub const some_number: c_int = 1;

#[repr(C)]
#[derive(Debug)]
pub enum GenericEnum {
	EnumVal1,
	EnumVal2,
	Count = 2 as c_int,
}

bitflags! {
	#[repr(C)]
	#[derive(Debug)]
	flags SampleBitflags: c_int {
		const FIELD1 = 1 as c_int,
		const FIELD2 = 2 as c_int,
	}
}

bitflags! {
	#[repr(C)]
	flags AltBitflags: c_int {
		const C_FIELD1 = 1 as c_int,
	}
}

pub get_ascii: fn(letter: char&, callback: extern fn(code: c_int) -> bool) -> c_int;
pub get_ascii_alt: fn(letter: char&, callback: extern fn(code: c_int) -> bool) -> c_int;
pub process_func: static fn() -> c_void;
pub func_ellipsis: fn(str: *const c_char) -> c_void;
pub func_ptr: extern fn() -> c_int;
pub f_ptr: extern fn(fmt: const int*, fptr_arg: extern fn(char&) -> c_void) -> c_void;

#[repr(C)]
#[derive(Debug)]
pub struct RustStruct {
	pub x: c_int,
	pub y: c_int,
	pub opt_var: Option<c_int>;
	pub return_int: fn(arg: c_float, opt_func: Option<extern fn() -> c_float>) -> c_int,
	pub internal_ptr: extern fn(arg: *const c_char) -> c_void,
	pub opt_fptr: Option<extern fn(arg: *const c_char) -> c_void>,

	#[repr(C)]
	pub struct SubStruct {

		#[derive(Debug)]
		pub enum SubEnum {
			SubElement1,
			SubElement2,
		}

		pub do_magic: static fn(magic_number: c_int) -> c_char,
	}

}

// !!! End of autogenerated data. !!!