using support::ExceptionMessage;
using support::WarningException;
-ICPInfo::ICPInfo(std::string const & s, bool b)
- : paramName(s), optional(b)
-{}
-
-
-void ICPList::addParam(std::string const & s, bool b) {
- plist_.push_back(ICPInfo(s, b));
-}
-
-
-bool ICPList::hasParam(std::string const & s) {
- PList::const_iterator it = begin();
- PList::const_iterator et = end();
- for (; it != et; ++it) {
- if (it->paramName == s)
- return true;
- }
- return false;
-}
-
-
InsetCommandParams::InsetCommandParams(InsetCode code)
: insetCode_(code), preview_(false)
{
bool const * optional;
};
-///
-struct ICPInfo {
- ///
- ICPInfo(std::string const & s, bool b);
- /// Parameter name.
- std::string paramName;
- /// Whether it is optional.
- bool optional;
-};
-///
-typedef std::list<ICPInfo> PList;
-///
-class ICPList {
- public:
- ///
- PList::const_iterator begin() { return plist_.begin(); }
- ///
- PList::const_iterator end() { return plist_.end(); }
- ///
- void clear() { plist_.clear(); }
- ///
- void addParam(std::string const & s, bool b = false);
- ///
- bool hasParam(std::string const & s);
- private:
- ///
- PList plist_;
-
-};
-
class InsetCommandParams {
public: