Commit 38837ca6 authored by Jerome Galtier's avatar Jerome Galtier
Browse files

Fix contexts handling w.r.t. pipe_writers.hh.

	* taf-kit/src/Makefile.am: Define macro NO_SECOND_OPERATOR for
	  char-char and int-int instances to prevent `operator()'
	  redefinition in pipe_writers.
	* taf-kit/src/pipe_writers.hh,
	* taf-kit/src/pipe_writers.hxx: Add conditional function definition.
parent 3763f21f
2008-10-09 Jerome Galtier <jerome.galtier@lrde.epita.fr>
Fix contexts handling w.r.t. pipe_writers.hh.
* taf-kit/src/Makefile.am: Define macro NO_SECOND_OPERATOR for
char-char and int-int instances to prevent `operator()'
redefinition in pipe_writers.
* taf-kit/src/pipe_writers.hh,
* taf-kit/src/pipe_writers.hxx: Add conditional function definition.
2008-10-09 Jerome Galtier <jerome.galtier@lrde.epita.fr>
 
Cleanup the identity algorithm.
......
......@@ -144,7 +144,8 @@ vcsn_char_char_b_SOURCES = $(COMMON_SOURCES) \
vcsn_char_char_b_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=char_char_boolean_automaton \
-DVCSN_USE_LIB \
-DFIRST_PROJECTION_CONTEXT=boolean_automaton \
-DSECOND_PROJECTION_CONTEXT=boolean_automaton
-DSECOND_PROJECTION_CONTEXT=boolean_automaton \
-DNO_SECOND_OPERATOR
vcsn_char_char_b_LDADD = $(LDADD) \
$(top_builddir)/lib/libkrat_exp.la \
$(top_builddir)/lib/libvcsn-char-char-b.la
......@@ -168,7 +169,8 @@ vcsn_int_int_b_SOURCES = $(COMMON_SOURCES) \
vcsn_int_int_b_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=int_int_boolean_automaton \
-DVCSN_USE_LIB \
-DFIRST_PROJECTION_CONTEXT=int_boolean_automaton \
-DSECOND_PROJECTION_CONTEXT=int_boolean_automaton
-DSECOND_PROJECTION_CONTEXT=int_boolean_automaton \
-DNO_SECOND_OPERATOR
vcsn_int_int_b_LDADD = $(LDADD) \
$(top_builddir)/lib/libkrat_exp.la \
$(top_builddir)/lib/libvcsn-int-int-b.la
......
......@@ -66,8 +66,10 @@ public:
# ifdef FIRST_PROJECTION_CONTEXT
void operator() (FIRST_PROJECTION_CONTEXT::automaton_t& a) const;
# endif
# if defined SECOND_PROJECTION_CONTEXT and SECOND_PROJECTION_CONTEXT != FIRST_PROJECTION_CONTEXT
void operator() (SECOND_PROJECTION_CONTEXT::automaton_t& a) const;
# ifdef SECOND_PROJECTION_CONTEXT
# ifndef NO_SECOND_OPERATOR
void operator() (SECOND_PROJECTION_CONTEXT::automaton_t& a) const;
# endif
# endif
template<typename T>
......
......@@ -177,7 +177,8 @@ pipe_stream_writer::operator()
}
# endif // ! FIRST_PROJECTION_CONTEXT
# if defined SECOND_PROJECTION_CONTEXT and SECOND_PROJECTION_CONTEXT != FIRST_PROJECTION_CONTEXT
# ifdef SECOND_PROJECTION_CONTEXT
# ifndef NO_SECOND_OPERATOR
void
pipe_stream_writer::operator()
(SECOND_PROJECTION_CONTEXT::automaton_t& a) const
......@@ -197,6 +198,7 @@ pipe_stream_writer::operator()
std::cerr << "Could not save automaton: unkown output type." << std::endl;
}
}
# endif // ! NO_SECOND_OPERATOR
# endif // ! SECOND_PROJECTION_CONTEXT
template<typename T>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment