namespace lyx {
class Lexer;
+class Buffer;
class ParamInfo {
public:
+ ///
+ ParamInfo() {}
/// Types of parameters
enum ParamType {
LATEX_OPTIONAL, /// normal optional argument
std::string insetType() const;
///
InsetCode code() const { return insetCode_; }
- ///
- void read(Lexer &);
/// Parse the command
+ void read(Lexer &);
+ ///
+ void Read(Lexer &, Buffer const *);
///
void write(std::ostream &) const;
+ ///
+ void Write(std::ostream & os, Buffer const * buf) const;
/// Build the complete LaTeX command
docstring getCommand(OutputParams const &) const;
/// Return the command name
void clear();
///
static bool isCompatibleCommand(InsetCode code, std::string const & s);
-
+ ///
+ ParamInfo const & info() const { return info_; }
+ ///
+ docstring prepareCommand(OutputParams const & runparams,
+ docstring const & command, ParamInfo::ParamHandling handling) const;
private:
std::string getDefaultCmd(InsetCode code);
/// checks whether we need to write an empty optional parameter
/// \return true if a non-empty optional parameter follows ci
bool writeEmptyOptional(ParamInfo::const_iterator ci) const;
- ///
- docstring prepareCommand(OutputParams const & runparams,
- docstring const & command,
- ParamInfo::ParamHandling handling) const;
/// Description of all command properties
ParamInfo info_;