]> git.lyx.org Git - lyx.git/blob - src/sgml.h
Fixed some lines that were too long. It compiled afterwards.
[lyx.git] / src / sgml.h
1 // -*- C++ -*-
2 /**
3  * \file sgml.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author José Matos
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef SGML_H
14 #define SGML_H
15
16 #include "support/types.h"
17 #include "support/docstream.h"
18
19 #include <iosfwd>
20 #include <string>
21 #include <utility>
22
23
24 namespace lyx {
25
26 class Buffer;
27 class Paragraph;
28 class OutputParams;
29
30 namespace sgml {
31
32 /**
33  * Escape the given character, if necessary,
34  * to an SGML entity.
35  */
36 docstring escapeChar(char_type c);
37
38 /// Escape a word instead of a single character
39 docstring escapeString(docstring const & raw);
40
41 /// replaces illegal characters from SGML/XML ID attributes
42 docstring cleanID(Buffer const & buf, OutputParams const & runparams,
43                     docstring const & orig);
44
45 /// returns a unique numeric id
46 docstring const uniqueID(docstring const label);
47
48 /// Opens tag
49 void openTag(odocstream & os, std::string const & name,
50             std::string const & attribute = std::string());
51
52 /// Open tag
53 void openTag(Buffer const & buf, odocstream & os,
54              OutputParams const & runparams, Paragraph const & par);
55
56 /// Close tag
57 void closeTag(odocstream & os, std::string const & name);
58
59 /// Close tag
60 void closeTag(odocstream & os, Paragraph const & par);
61
62 } // namespace sgml
63 } // namespace lyx
64
65 #endif // SGML_H