]> git.lyx.org Git - lyx.git/blob - src/insets/insetcommandparams.h
Changes to make RH-7.3 be able to run lyx.
[lyx.git] / src / insets / insetcommandparams.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2002-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #ifndef INSETCOMMANDPARAMS_H
12 #define INSETCOMMANDPARAMS_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include <config.h>
19
20 #include "LString.h"
21
22 #include <iosfwd>
23
24 class LyXLex;
25
26 class InsetCommandParams {
27 public:
28         ///
29         InsetCommandParams();
30         ///
31         explicit
32         InsetCommandParams(string const & n,
33                             string const & c = string(),
34                             string const & o = string());
35         ///
36         void read(LyXLex &);
37         /// Parse the command
38         void scanCommand(string const &);
39         ///
40         void write(std::ostream &) const;
41         /// Build the complete LaTeX command
42         string const getCommand() const;
43         ///
44         string const & getCmdName() const { return cmdname; }
45         ///
46         string const & getOptions() const { return options; }
47         ///
48         string const & getContents() const { return contents; }
49         ///
50         void setCmdName(string const & n) { cmdname = n; }
51         ///
52         void setOptions(string const & o) { options = o; }
53         ///
54         void setContents(string const & c) { contents = c; }
55         ///
56         string const getAsString() const;
57         ///
58         void setFromString(string const &);
59 private:
60         ///
61         string cmdname;
62         ///
63         string contents;
64         ///
65         string options;
66 };
67
68
69 ///
70 bool operator==(InsetCommandParams const &,
71                 InsetCommandParams const &);
72
73 ///
74 bool operator!=(InsetCommandParams const &,
75                 InsetCommandParams const &);
76
77 #endif