|
@@ -239,13 +239,45 @@ private:
|
|
|
template<typename Context, typename Action = BasicAction>
|
|
|
class NotCreator : public Loader<Context, Action>::CheckCreator {
|
|
|
public:
|
|
|
- NotCreator(const std::string& name);
|
|
|
- virtual std::vector<std::string> names() const;
|
|
|
+ /**
|
|
|
+ * \brief Constructor
|
|
|
+ *
|
|
|
+ * \param name The name of the NOT operator to be loaded as.
|
|
|
+ */
|
|
|
+ NotCreator(const std::string& name) :
|
|
|
+ name_(name)
|
|
|
+ { }
|
|
|
+ /**
|
|
|
+ * \brief List of the names this loads
|
|
|
+ *
|
|
|
+ * \return Single-value vector containing the name passed to the
|
|
|
+ * constructor.
|
|
|
+ */
|
|
|
+ virtual std::vector<std::string> names() const {
|
|
|
+ std::vector<std::string> result;
|
|
|
+ result.push_back(name_);
|
|
|
+ return (result);
|
|
|
+ }
|
|
|
+ /// \brief Create the check.
|
|
|
virtual boost::shared_ptr<Check<Context> > create(const std::string&,
|
|
|
data::ConstElementPtr
|
|
|
definition,
|
|
|
const Loader<Context,
|
|
|
- Action>& loader);
|
|
|
+ Action>& loader)
|
|
|
+ {
|
|
|
+ return (boost::shared_ptr<Check<Context> >(new NotCheck<Context>(
|
|
|
+ loader.loadCheck(definition))));
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * \brief Or-abbreviated form.
|
|
|
+ *
|
|
|
+ * This returns false. In theory, the NOT operator could be used with
|
|
|
+ * the abbreviated form, but it would be confusing. Such syntax is
|
|
|
+ * therefore explicitly forbidden.
|
|
|
+ */
|
|
|
+ virtual bool allowListAbbreviation() const { return (false); }
|
|
|
+public:
|
|
|
+ const std::string name_;
|
|
|
};
|
|
|
|
|
|
}
|