]> git.lyx.org Git - lyx.git/blob - src/insets/insetcommandparams.h
separate insetcommand.[Ch] into two files
[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         bool operator==(InsetCommandParams const &) const;
37         ///
38         bool operator!=(InsetCommandParams const &) const;
39         ///
40         void read(LyXLex &);
41         /// Parse the command
42         void scanCommand(string const &);
43         ///
44         void write(std::ostream &) const;
45         /// Build the complete LaTeX command
46         string const getCommand() const;
47         ///
48         string const & getCmdName() const { return cmdname; }
49         ///
50         string const & getOptions() const { return options; }
51         ///
52         string const & getContents() const { return contents; }
53         ///
54         void setCmdName(string const & n) { cmdname = n; }
55         ///
56         void setOptions(string const & o) { options = o; }
57         ///
58         void setContents(string const & c) { contents = c; }
59         ///
60         string const getAsString() const;
61         ///
62         void setFromString(string const &);
63 private:
64         ///
65         string cmdname;
66         ///
67         string contents;
68         ///
69         string options;
70 };
71
72
73 #endif