- 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 command \p name.
- /// Returns 0 if the command is not known.
- static CommandInfo const * findInfo(std::string const & name);
+ /// Get information for inset type \p code.
+ /// Returns 0 if the inset is not known.
+ static CommandInfo const * findInfo(InsetCode code);
+ /// Get information for \p code and command \p cmdName.
+ /// Returns 0 if the combination is not known.
+ /// Don't call this without first making sure the command name is
+ /// acceptable to the inset.
+ static CommandInfo const * findInfo(InsetCode code,
+ std::string const & cmdName);
+ ///
+ static bool isCompatibleCommand(InsetCode code, std::string const & s);
+ ///
+ std::string getDefaultCmd(InsetCode);