Add copyright notices and new function String.chomp
[ocaml.git] / ocamldoc / odoc_name.mli
blob33b661f937bd2adffcdb31ed39aa3d24beaa8dde
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 (***********************************************************************)
12 (* $Id$ *)
14 (** Representation of element names. *)
16 type t = string
18 (** Add parenthesis to the given simple name if needed. *)
19 val parens_if_infix : t -> t
21 (** Return a simple name from a name.*)
22 val simple : t -> t
24 (** Return the name of the 'father' (like dirname for a file name).*)
25 val father : t -> t
27 (** Concatenates two names. *)
28 val concat : t -> t -> t
30 (** Returns the head of a name. *)
31 val head : t -> t
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
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
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
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
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
52 (** Indicate if a name if qualified or not. *)
53 val qualified : t -> bool
55 (** Get a name from an [Ident.t]. *)
56 val from_ident : Ident.t -> t
58 (** Get a name from a [Path.t]. *)
59 val from_path : Path.t -> t
61 (** Get a [Path.t] from a name.*)
62 val to_path : t -> Path.t
64 (** Get a name from a [Longident.t].*)
65 val from_longident : Longident.t -> t