PageRenderTime 43ms CodeModel.GetById 33ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Lib/ocaml/swig.mli

#
OCaml | 61 lines | 51 code | 9 blank | 1 comment | 0 complexity | ac2eef6b939395da62906e1f4699b0a6 MD5 | raw file
 1(* -*- tuareg -*- *)
 2
 3type enum = [ `Int of int ]
 4
 5type 'a c_obj_t = 
 6    C_void
 7  | C_bool of bool
 8  | C_char of char
 9  | C_uchar of char
10  | C_short of int
11  | C_ushort of int
12  | C_int of int
13  | C_uint of int32
14  | C_int32 of int32
15  | C_int64 of int64
16  | C_float of float
17  | C_double of float
18  | C_ptr of int64 * int64
19  | C_array of 'a c_obj_t array
20  | C_list of 'a c_obj_t list
21  | C_obj of (string -> 'a c_obj_t -> 'a c_obj_t)
22  | C_string of string
23  | C_enum of 'a
24  | C_director_core of 'a c_obj_t * 'a c_obj_t option ref
25
26type c_obj = enum c_obj_t
27
28exception InvalidDirectorCall of c_obj
29exception NoSuchClass of string
30
31val invoke : ('a c_obj_t) -> (string -> 'a c_obj_t -> 'a c_obj_t)
32val fnhelper : 'a c_obj_t -> 'a c_obj_t list
33
34val get_int : 'a c_obj_t -> int
35val get_float : 'a c_obj_t -> float
36val get_string : 'a c_obj_t -> string
37val get_char : 'a c_obj_t -> char
38val get_bool : 'a c_obj_t -> bool
39
40val make_float : float -> 'a c_obj_t
41val make_double : float -> 'a c_obj_t
42val make_string : string -> 'a c_obj_t
43val make_bool : bool -> 'a c_obj_t
44val make_char : char -> 'a c_obj_t
45val make_char_i : int -> 'a c_obj_t
46val make_uchar : char -> 'a c_obj_t
47val make_uchar_i : int -> 'a c_obj_t
48val make_short : int -> 'a c_obj_t
49val make_ushort : int -> 'a c_obj_t
50val make_int : int -> 'a c_obj_t
51val make_uint : int -> 'a c_obj_t
52val make_int32 : int -> 'a c_obj_t
53val make_int64 : int -> 'a c_obj_t
54
55val new_derived_object: 
56  ('a c_obj_t -> 'a c_obj_t) ->
57  ('a c_obj_t -> string -> 'a c_obj_t -> 'a c_obj_t) ->
58  'a c_obj_t -> 'a c_obj_t
59  
60val register_class_byname : string -> ('a c_obj_t -> 'a c_obj_t) -> unit
61val create_class : string -> 'a c_obj_t -> 'a c_obj_t