]> git.lyx.org Git - lyx.git/blob - src/sgml.h
65eda14a1f9d170c88b9a108e073c1295d18ced6
[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
18 #include <iosfwd>
19 #include <utility>
20
21 class Buffer;
22
23 namespace sgml {
24
25 /**
26  * Escape the given character, if necessary,
27  * to an SGML entity. Returns true
28  * if it was a whitespace character.
29  */
30 std::pair<bool, std::string> escapeChar(char c);
31
32 /// Escape a word instead of a single character
33 std::string escapeString(std::string const & raw);
34
35 /// Opens tag
36 int openTag(Buffer const & buf, std::ostream & os, lyx::depth_type depth,
37             bool mixcont, std::string const & name,
38             std::string const & param = std::string());
39
40 /// Close tag
41 int closeTag(std::ostream & os, lyx::depth_type depth,
42             bool mixcont, std::string const & name);
43
44 }
45 #endif // SGML_H