class TextContext : public BaseContext
{
......
template<class Range>
void set_text(Range const & text);
}
I also added specialized factory (In my case text elements are always
children of a group node):
template<>
struct ChildContextFactories::apply<GroupContext,
svgpp::tag::element::text>
//struct ChildContextFactories::apply<BaseContext,
svgpp::tag::element::text>
{
typedef
svgpp::factory::context::on_stack_with_mutable_xml_element<TextContext> type;
};
and added adapted to processed_elements:
struct processed_elements_t
.....
svgpp::tag::element::text>
Unfortunately when compiling the compiler complains:
Severity
Code Description Project File Line Suppression
State
Error C2039 'set_text': is not a member of
'LayoutContext::BaseContext' NetLister
d:\_proj\netlister\external\svgpp\include\svgpp\policy\text_events.hpp
19
Hi Oleg,
thanks for taking your time.
I commented out/disabled all factories except this one:
struct ChildContextFactories
{
template<class ParentContext, class ElementTag, class
Enable = void>
struct apply
{
// Default definition handles "svg" and "g" elements
typedef
svgpp::factory::context::on_stack_with_mutable_xml_element<BaseContext>
type;
void foo() {
static_assert(!std::is_same<ElementTag,
svgpp::tag::element::text>::value); }
};
};
Unfortunately this didn't help (set_text still missing in BaseContext) and the static_assert also doesn't fire.
Any other suggestions how I can track this down?
I've attached a link to the header containing the factories... just in case you want to take a look at it?
https://www.dropbox.com/s/5gtskc4rjsx9h4z/ChipLayoutContext.h?dl=0
Thanks,