]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/ocamldoc/odoc_name.mli
Inital import
[l4.git] / l4 / pkg / ocaml / contrib / ocamldoc / odoc_name.mli
1 (***********************************************************************)
2 (*                             OCamldoc                                *)
3 (*                                                                     *)
4 (*            Maxence Guesdon, projet Cristal, INRIA Rocquencourt      *)
5 (*                                                                     *)
6 (*  Copyright 2001 Institut National de Recherche en Informatique et   *)
7 (*  en Automatique.  All rights reserved.  This file is distributed    *)
8 (*  under the terms of the Q Public License version 1.0.               *)
9 (*                                                                     *)
10 (***********************************************************************)
11
12 (* $Id: odoc_name.mli 6173 2004-03-26 09:09:50Z guesdon $ *)
13
14 (** Representation of element names. *)
15
16 type t = string
17
18 (** Add parenthesis to the given simple name if needed. *)
19 val parens_if_infix : t -> t
20
21 (** Return a simple name from a name.*)
22 val simple : t -> t
23
24 (** Return the name of the 'father' (like dirname for a file name).*)
25 val father : t -> t
26
27 (** Concatenates two names. *)
28 val concat : t -> t -> t
29
30 (** Returns the head of a name. *)
31 val head : t -> t
32
33 (** Returns the depth of the name, i.e. the numer of levels to the root.
34    Example : [Toto.Tutu.name] has depth 3. *)
35 val depth : t -> int
36
37 (** Returns true if the first name is a prefix of the second name.
38    If the two names are equals, then if is false (strict prefix).*)
39 val prefix : t -> t -> bool
40
41 (** Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 or else n2. *)
42 val get_relative : t -> t -> t
43
44 (** Take two names n1=n3.n4 and n2 = n5.n6 and return n6 if n3=n5 or else n2. *)
45 val get_relative_raw : t -> t -> t
46
47 (** Take a list of module names to hide and a name,
48    and return the name when the module name (or part of it)
49    was removed, according to the list of module names to hide.*)
50 val hide_given_modules : t list -> t -> t
51
52 (** Indicate if a name if qualified or not. *)
53 val qualified : t -> bool
54
55 (** Get a name from an [Ident.t]. *)
56 val from_ident : Ident.t -> t
57
58 (** Get a name from a [Path.t]. *)
59 val from_path : Path.t -> t
60
61 (** Get a [Path.t] from a name.*)
62 val to_path : t -> Path.t
63
64 (** Get a name from a [Longident.t].*)
65 val from_longident : Longident.t -> t
66