+void ParamInfo::add(std::string const & name, ParamType type,
+ ParamHandling handling)
+{
+ info_.push_back(ParamData(name, type, handling));
+}
+
+
+bool ParamInfo::operator==(ParamInfo const & rhs) const
+{
+ if (size() != rhs.size())
+ return false;
+ return equal(begin(), end(), rhs.begin());
+}
+
+
+ParamInfo::ParamData const &
+ ParamInfo::operator[](std::string const & name) const
+{
+ const_iterator it = begin();
+ const_iterator last = end();
+ for (; it != last; ++it) {
+ if (it->name() == name)
+ return *it;
+ }
+ LATTEST(false);
+ // we will try to continue in release mode
+ static const ParamData pd("asdfghjkl", LYX_INTERNAL);
+ return pd;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// InsetCommandParams
+//
+/////////////////////////////////////////////////////////////////////
+
+
+InsetCommandParams::InsetCommandParams(InsetCode code)
+ : insetCode_(code), preview_(false)
+{
+ cmdName_ = getDefaultCmd(code);
+ info_ = findInfo(code, cmdName_);
+}
+
+
+InsetCommandParams::InsetCommandParams(InsetCode code,
+ string const & cmdName)
+ : insetCode_(code), cmdName_(cmdName), preview_(false)
+{
+ info_ = findInfo(code, cmdName);
+}
+
+
+std::string InsetCommandParams::insetType() const
+{
+ return insetName(insetCode_);
+}
+
+
+string InsetCommandParams::getDefaultCmd(InsetCode code)
+{