Add additional constructor for common use case.

This commit is contained in:
Hermann Kraus 2012-02-12 01:48:25 +01:00
parent 7ef1c3544e
commit 3b2767f167

View file

@ -127,6 +127,7 @@ private:
class text_node: public node {
public:
text_node(expression_ptr text): node(), text_(text) {}
text_node(std::string text): node(), text_(parse_expression(text)) {}
void to_xml(boost::property_tree::ptree &xml) const;
static node_ptr from_xml(boost::property_tree::ptree const& xml);
virtual void apply(char_properties const& p, Feature const& feature, processed_text &output) const;