*
* \author Angus Leeming
* \author Georg Baum
+ * \author Richard Heck
*
* Full author contact details are available in file CREDITS.
*/
#include "support/docstring.h"
#include <iosfwd>
+#include <string>
#include <vector>
class Lexer;
+// No parameter may be named "preview", because that is a required
+// flag for all commands.
+struct CommandInfo {
+ /// Number of parameters
+ size_t n;
+ /// Parameter names. paramnames[n] must be "".
+ char const * const * paramnames;
+ /// Tells whether a parameter is optional
+ bool const * optional;
+};
+
+
class InsetCommandParams {
public:
/// Construct parameters for inset of type \p code.
private:
///
- struct CommandInfo {
- /// Number of parameters
- size_t n;
- /// Parameter names. paramnames[n] must be "".
- char const * const * paramnames;
- /// Tells whether a parameter is optional
- bool const * optional;
- };
/// Get information for inset type \p code.
/// Returns 0 if the inset is not known.
static CommandInfo const * findInfo(InsetCode code);
static CommandInfo const * findInfo(InsetCode code,
std::string const & cmdName);
///
+ static bool isCompatibleCommand(InsetCode code, std::string const & s);
+ ///
std::string getDefaultCmd(InsetCode);
/// Description of all command properties
CommandInfo const * info_;