]> git.lyx.org Git - lyx.git/blob - src/insets/insetcommandparams.h
Make it compile when USE_BOOST_FORMAT is unset
[lyx.git] / src / insets / insetcommandparams.h
1 // -*- C++ -*-
2 /**
3  * \file insetcommandparams.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSETCOMMANDPARAMS_H
13 #define INSETCOMMANDPARAMS_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include <config.h>
20
21 #include "LString.h"
22
23 #include <iosfwd>
24
25 class LyXLex;
26
27 class InsetCommandParams {
28 public:
29         ///
30         InsetCommandParams();
31         ///
32         explicit
33         InsetCommandParams(string const & n,
34                             string const & c = string(),
35                             string const & o = string());
36         ///
37         void read(LyXLex &);
38         /// Parse the command
39         void scanCommand(string const &);
40         ///
41         void write(std::ostream &) const;
42         /// Build the complete LaTeX command
43         string const getCommand() const;
44         ///
45         string const & getCmdName() const { return cmdname; }
46         ///
47         string const & getOptions() const { return options; }
48         ///
49         string const & getContents() const { return contents; }
50         ///
51         void setCmdName(string const & n) { cmdname = n; }
52         ///
53         void setOptions(string const & o) { options = o; }
54         ///
55         void setContents(string const & c) { contents = c; }
56         ///
57         string const getAsString() const;
58         ///
59         void setFromString(string const &);
60         ///
61         bool preview() const { return preview_; }
62         ///
63         void preview(bool p) { preview_ = p; }
64
65 private:
66         ///
67         string cmdname;
68         ///
69         string contents;
70         ///
71         string options;
72         ///
73         bool preview_;
74 };
75
76
77 ///
78 bool operator==(InsetCommandParams const &,
79                 InsetCommandParams const &);
80
81 ///
82 bool operator!=(InsetCommandParams const &,
83                 InsetCommandParams const &);
84
85 #endif