Commit d9b2016b authored by Michaël Cadilhac's avatar Michaël Cadilhac
Browse files

Change `new_*' functions to `make_*'.

Reindendation made on modified files.

- include/vaucanson/xml/tools.hxx,
- include/vaucanson/contexts/automaton_functions.thh,
- include/vaucanson/contexts/transducer_functions.thh,
- include/vaucanson/contexts/fmp_transducer_functions.thh,
- include/vaucanson/contexts/automaton_functions.thxx,
- include/vaucanson/contexts/transducer_functions.thxx,
- include/vaucanson/contexts/fmp_transducer_functions.thxx,
- src/benchs/minimization_stroppa/minimization_bench_fsm.cc,
- src/benchs/minimization_stroppa/usual.hxx,
- src/benchs/minimization_stroppa/minimization_bench_moore.cc,
- src/benchs/minimization_stroppa/minimization_bench_hopcroft.cc,
- src/benchs/composition/realtime_composition_bench.hh,
- src/benchs/composition/normalized_composition_bench.hh,
- src/benchs/determinization/determinization_bench.hh,
- src/benchs/minimization_2n/minimization_2n_moore_bench.hh,
- src/benchs/minimization_2n/minimization_2n_brzozowski_bench.hh,
- src/benchs/minimization_2n/minimization_2n_hopcroft_bench.hh,
- src/benchs/common/bench_automaton.hh,
- src/benchs/quotient/quotient_bool_bench.hh,
- src/benchs/quotient/quotient_z_bench.hh,
- src/benchs/minimization_debruijn/minimization_debruijn_moore_bench.hh,
- src/benchs/minimization_debruijn/minimization_debruijn_brzozowski_bench.hh,
- src/benchs/minimization_debruijn/minimization_debruijn_hopcroft_bench.hh,
- src/benchs/derived_terms/derived_terms_bench.hh,
- src/tests/context_headers/fmp_transducers/global_consistency_test.hh,
- src/tests/context_headers/automata/global_consistency_test.hh,
- src/tests/context_headers/transducers/global_consistency_test.hh,
- src/tests/xml/xml_trans_tester.cc,
- src/tests/xml/xml_geometry_tester.cc,
- src/tests/xml/xml_automaton_tester.cc,
- src/tests/xml/xml_fmp_tester.cc,
- src/tests/xml/xml_session_tester.cc,
- src/tests/automata/algos/fmp_transducers/normalized_composition_test.hh,
- src/tests/automata/algos/fmp_transducers/evaluation_fmp_test.hh,
- src/demos/algorithms/classics.cc,
- src/demos/algorithms/equivalent_functions.cc,
- src/demos/algorithms/universal.cc,
- src/demos/function_library/tdc_algorithms.cc,
- src/demos/function_library/rt_tdc_algorithms.cc,
- src/demos/function_library/algorithms.cc,
- src/demos/automaton_library/a1.cc,
- src/demos/automaton_library/b1.cc,
- src/demos/automaton_library/c1.cc,
- src/demos/automaton_library/double_ring.cc,
- src/demos/automaton_library/divkbaseb.cc,
- src/demos/automaton_library/ladybird.cc,
- src/demos/utilities/vgrep/vgrep.cc,
- src/demos/transducers/one_rule_rewriting/fibonacci_rt_gen.cc,
- src/demos/transducers/one_rule_rewriting/ORR_rt_gen.cc,
- src/demos/transducers/one_rule_rewriting/fibonacci_tdc_gen.cc,
- src/demos/transducers/one_rule_rewriting/fibonacci_demo.cc,
- src/demos/transducers/one_rule_rewriting/ORR_tdc_gen.cc,
- src/demos/transducers/one_rule_rewriting/ORR_demo.cc,
- src/demos/transducers/t1.cc,
- src/demos/transducers/u1.cc: s/new_/make_/.

- doc/NEWS.txt: Not concerned by the renamming, so revert it.
parent 2650c607
2006-04-13 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
Change `new_*' functions to `make_*'.
Reindendation made on modified files.
* include/vaucanson/xml/tools.hxx,
* include/vaucanson/contexts/automaton_functions.thh,
* include/vaucanson/contexts/transducer_functions.thh,
* include/vaucanson/contexts/fmp_transducer_functions.thh,
* include/vaucanson/contexts/automaton_functions.thxx,
* include/vaucanson/contexts/transducer_functions.thxx,
* include/vaucanson/contexts/fmp_transducer_functions.thxx,
* src/benchs/minimization_stroppa/minimization_bench_fsm.cc,
* src/benchs/minimization_stroppa/usual.hxx,
* src/benchs/minimization_stroppa/minimization_bench_moore.cc,
* src/benchs/minimization_stroppa/minimization_bench_hopcroft.cc,
* src/benchs/composition/realtime_composition_bench.hh,
* src/benchs/composition/normalized_composition_bench.hh,
* src/benchs/determinization/determinization_bench.hh,
* src/benchs/minimization_2n/minimization_2n_moore_bench.hh,
* src/benchs/minimization_2n/minimization_2n_brzozowski_bench.hh,
* src/benchs/minimization_2n/minimization_2n_hopcroft_bench.hh,
* src/benchs/common/bench_automaton.hh,
* src/benchs/quotient/quotient_bool_bench.hh,
* src/benchs/quotient/quotient_z_bench.hh,
* src/benchs/minimization_debruijn/minimization_debruijn_moore_bench.hh,
* src/benchs/minimization_debruijn/minimization_debruijn_brzozowski_bench.hh,
* src/benchs/minimization_debruijn/minimization_debruijn_hopcroft_bench.hh,
* src/benchs/derived_terms/derived_terms_bench.hh,
* src/tests/context_headers/fmp_transducers/global_consistency_test.hh,
* src/tests/context_headers/automata/global_consistency_test.hh,
* src/tests/context_headers/transducers/global_consistency_test.hh,
* src/tests/xml/xml_trans_tester.cc,
* src/tests/xml/xml_geometry_tester.cc,
* src/tests/xml/xml_automaton_tester.cc,
* src/tests/xml/xml_fmp_tester.cc,
* src/tests/xml/xml_session_tester.cc,
* src/tests/automata/algos/fmp_transducers/normalized_composition_test.hh,
* src/tests/automata/algos/fmp_transducers/evaluation_fmp_test.hh,
* src/demos/algorithms/classics.cc,
* src/demos/algorithms/equivalent_functions.cc,
* src/demos/algorithms/universal.cc,
* src/demos/function_library/tdc_algorithms.cc,
* src/demos/function_library/rt_tdc_algorithms.cc,
* src/demos/function_library/algorithms.cc,
* src/demos/automaton_library/a1.cc,
* src/demos/automaton_library/b1.cc,
* src/demos/automaton_library/c1.cc,
* src/demos/automaton_library/double_ring.cc,
* src/demos/automaton_library/divkbaseb.cc,
* src/demos/automaton_library/ladybird.cc,
* src/demos/utilities/vgrep/vgrep.cc,
* src/demos/transducers/one_rule_rewriting/fibonacci_rt_gen.cc,
* src/demos/transducers/one_rule_rewriting/ORR_rt_gen.cc,
* src/demos/transducers/one_rule_rewriting/fibonacci_tdc_gen.cc,
* src/demos/transducers/one_rule_rewriting/fibonacci_demo.cc,
* src/demos/transducers/one_rule_rewriting/ORR_tdc_gen.cc,
* src/demos/transducers/one_rule_rewriting/ORR_demo.cc,
* src/demos/transducers/t1.cc,
* src/demos/transducers/u1.cc: s/new_/make_/.
* doc/NEWS.txt: Not concerned by the renamming, so revert it.
2006-04-13 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
 
Change `edge' to `transition'.
......
......@@ -130,7 +130,7 @@ Vaucanson 0.7 May 17, 2005
automaton_t new_automaton(first_alphabet_t, second_alphabet_t);
// Create a couple of words that can directly be given to
// add_series_transition() for instance.
// add_series_edge() for instance.
series_set_elt_t make_couple(first_alphabet_t, second_alphabet_t,
std::string, std::string);
......@@ -141,8 +141,8 @@ Vaucanson 0.7 May 17, 2005
- ``normalized_composition``: Enables the composition of
normalized and sub-normalized transducers seen as automata over
a free monoid product. (transitions with labels of types (a,b),
(1,a) and (a,1)).
a free monoid product. (edges with labels of types (a,b), (1,a)
and (a,1)).
- New XML I/O system.
......
// -*- C++ -*-
// -*- C++ -*-
// automaton_functions.thh: this file is part of the Vaucanson project.
//
// Vaucanson, a generic library for finite state machines.
......@@ -57,28 +57,28 @@ namespace vcsn
template <class T>
automaton_t new_automaton(const T& alphabet);
automaton_t make_automaton(const T& alphabet);
template <class InputIterator>
automaton_t new_automaton(InputIterator begin,
InputIterator end);
automaton_t make_automaton(InputIterator begin,
InputIterator end);
template <class T>
gen_automaton_t new_gen_automaton(const T& alphabet);
gen_automaton_t make_gen_automaton(const T& alphabet);
template <class InputIterator>
gen_automaton_t new_gen_automaton(InputIterator begin,
InputIterator end);
gen_automaton_t make_gen_automaton(InputIterator begin,
InputIterator end);
template <class Iterator>
rat_exp_t
new_rat_exp(const Iterator& begin,
const Iterator& end,
const std::string& exp = "0");
make_rat_exp(const Iterator& begin,
const Iterator& end,
const std::string& exp = "0");
template <class T>
rat_exp_t
new_rat_exp(const T& alphabet, const std::string& exp = "0");
make_rat_exp(const T& alphabet, const std::string& exp = "0");
template <class SeriesSet, class SeriesImpl>
automaton_t
......
......@@ -21,7 +21,7 @@ namespace vcsn
{
/*----------------.
| new_automaton() |
| make_automaton() |
`----------------*/
template <class InputIterator>
......@@ -38,38 +38,38 @@ namespace vcsn
}
template <class InputIterator>
automaton_t new_automaton(InputIterator begin,
automaton_t make_automaton(InputIterator begin,
InputIterator end)
{
return automaton_t (new_automata_set(begin, end));
}
template <class T>
automaton_t new_automaton(const T& alphabet)
automaton_t make_automaton(const T& alphabet)
{
return new_automaton(alphabet.begin(), alphabet.end());
return make_automaton(alphabet.begin(), alphabet.end());
}
template <class InputIterator>
gen_automaton_t new_gen_automaton(InputIterator begin,
gen_automaton_t make_gen_automaton(InputIterator begin,
InputIterator end)
{
return gen_automaton_t (new_automata_set(begin, end));
}
template <class T>
gen_automaton_t new_gen_automaton(const T& alphabet)
gen_automaton_t make_gen_automaton(const T& alphabet)
{
return new_gen_automaton(alphabet.begin(), alphabet.end());
return make_gen_automaton(alphabet.begin(), alphabet.end());
}
/*--------------.
| new_rat_exp() |
| make_rat_exp() |
`--------------*/
template <class Iterator>
rat_exp_t new_rat_exp(const Iterator& begin,
rat_exp_t make_rat_exp(const Iterator& begin,
const Iterator& end,
const std::string& exp)
{
......@@ -89,9 +89,9 @@ namespace vcsn
}
template <class T>
rat_exp_t new_rat_exp(const T& alphabet, const std::string& exp)
rat_exp_t make_rat_exp(const T& alphabet, const std::string& exp)
{
return new_rat_exp(alphabet.begin(), alphabet.end(), exp);
return make_rat_exp(alphabet.begin(), alphabet.end(), exp);
}
/*--------------.
......@@ -102,7 +102,7 @@ namespace vcsn
automaton_t
do_standard_of(const series_set_t& structure, const SeriesImpl& impl)
{
automaton_t r = new_automaton(structure.monoid().alphabet());
automaton_t r = make_automaton(structure.monoid().alphabet());
standard_of(r, impl);
return r;
}
......@@ -122,7 +122,7 @@ namespace vcsn
automaton_t
do_thompson_of(const series_set_t& structure, const SeriesImpl& impl)
{
automaton_t r = new_automaton(structure.monoid().alphabet());
automaton_t r = make_automaton(structure.monoid().alphabet());
thompson_of(r, impl);
return r;
}
......
// -*- C++ -*-
// -*- C++ -*-
// fmp_transducer_functions.thh: this file is part of the Vaucanson project.
//
// Vaucanson, a generic library for finite state machines.
......@@ -36,14 +36,14 @@ namespace vcsn
{
template <class T1, class T2>
automaton_t new_automaton(const T1& first_alphabet,
const T2& second_alphabet);
automaton_t make_automaton(const T1& first_alphabet,
const T2& second_alphabet);
template <class FirstInputIterator, class SecondInputIterator>
automaton_t new_automaton(const FirstInputIterator first_begin,
const FirstInputIterator first_end,
const SecondInputIterator second_begin,
const SecondInputIterator second_end);
automaton_t make_automaton(const FirstInputIterator first_begin,
const FirstInputIterator first_end,
const SecondInputIterator second_begin,
const SecondInputIterator second_end);
template <class T1, class T2>
monoid_elt_t make_couple(const T1& first_alphabet,
......
......@@ -47,7 +47,7 @@ namespace vcsn
template <class FirstInputIterator, class SecondInputIterator>
automaton_t new_automaton(const FirstInputIterator first_begin,
automaton_t make_automaton(const FirstInputIterator first_begin,
const FirstInputIterator first_end,
const SecondInputIterator second_begin,
const SecondInputIterator second_end)
......@@ -57,10 +57,10 @@ namespace vcsn
}
template <class T1, class T2>
automaton_t new_automaton(const T1& first_alphabet,
automaton_t make_automaton(const T1& first_alphabet,
const T2& second_alphabet)
{
return new_automaton(first_alphabet.begin(), first_alphabet.end(),
return make_automaton(first_alphabet.begin(), first_alphabet.end(),
second_alphabet.begin(), second_alphabet.end());
}
......@@ -113,10 +113,10 @@ namespace vcsn
const Element<SeriesStruct, SeriesImpl>&)
{
AUTOMATON_CONTEXT::automaton_t w = AUTOMATON_CONTEXT::
new_automaton(t.structure().series()
make_automaton(t.structure().series()
.monoid().first_monoid().alphabet());
AUTOMATON_CONTEXT::automaton_t result = AUTOMATON_CONTEXT::
new_automaton(t.structure().series()
make_automaton(t.structure().series()
.monoid().second_monoid().alphabet());
standard_of(w, input);
evaluation_fmp(t, quotient(w), result);
......
// -*- C++ -*-
// -*- C++ -*-
// transducer_functions.thh: this file is part of the Vaucanson project.
//
// Vaucanson, a generic library for finite state machines.
......@@ -34,14 +34,14 @@ namespace vcsn
{
template <class T>
automaton_t new_automaton(const T& input_alphabet,
const T& output_alphabet);
automaton_t make_automaton(const T& input_alphabet,
const T& output_alphabet);
template <class InputIterator>
automaton_t new_automaton(InputIterator input_alphabet_begin,
InputIterator input_alphabet_end,
InputIterator output_alphabet_begin,
InputIterator output_alphabet_end);
automaton_t make_automaton(InputIterator input_alphabet_begin,
InputIterator input_alphabet_end,
InputIterator output_alphabet_begin,
InputIterator output_alphabet_end);
template <typename TransStruct,
typename TransImpl,
......
......@@ -32,7 +32,7 @@ namespace vcsn
template <class InputIterator>
automaton_t
new_automaton(InputIterator input_alphabet_begin,
make_automaton(InputIterator input_alphabet_begin,
InputIterator input_alphabet_end,
InputIterator output_alphabet_begin,
InputIterator output_alphabet_end)
......@@ -60,10 +60,10 @@ namespace vcsn
template <class T>
automaton_t new_automaton(const T& input_alphabet,
automaton_t make_automaton(const T& input_alphabet,
const T& output_alphabet)
{
return new_automaton(input_alphabet.begin(),
return make_automaton(input_alphabet.begin(),
input_alphabet.end(),
output_alphabet.begin(),
output_alphabet.end());
......@@ -101,7 +101,7 @@ namespace vcsn
const Element<SeriesStruct, SeriesImpl>&)
{
AUTOMATON_CONTEXT::automaton_t w = AUTOMATON_CONTEXT::
new_automaton(t.structure().series().monoid().alphabet());
make_automaton(t.structure().series().monoid().alphabet());
AUTOMATON_CONTEXT::gen_automaton_t result (w.structure());
standard_of(w, input);
evaluation(quotient(w), t, result);
......
......@@ -55,34 +55,34 @@ namespace vcsn
{
std::string out;
if (series.supp().size() > 1)
{
out = get_label(series);
if (out.size())
elt->setAttribute(STR2XML("label"),
STR2XML(out.c_str()));
}
{
out = get_label(series);
if (out.size())
elt->setAttribute(STR2XML("label"),
STR2XML(out.c_str()));
}
else
{
std::string in_word =
get_label((*(series.supp().begin())).first);
std::string out_word =
get_label((*(series.supp().begin())).second);
std::string mult =
get_label(series.get(*(series.supp().begin())));
if (mult.size())
out = mult;
if (out != "" && out_word.size())
out += " ";
if (out_word.size())
out += out_word;
if (in_word.size())
elt->setAttribute(STR2XML("in"),
STR2XML(in_word.c_str()));
if (out.size())
elt->setAttribute(STR2XML("out"),
STR2XML(out.c_str()));
}
{
std::string in_word =
get_label((*(series.supp().begin())).first);
std::string out_word =
get_label((*(series.supp().begin())).second);
std::string mult =
get_label(series.get(*(series.supp().begin())));
if (mult.size())
out = mult;
if (out != "" && out_word.size())
out += " ";
if (out_word.size())
out += out_word;
if (in_word.size())
elt->setAttribute(STR2XML("in"),
STR2XML(in_word.c_str()));
if (out.size())
elt->setAttribute(STR2XML("out"),
STR2XML(out.c_str()));
}
}
template <class S, class T, class U>
......@@ -132,7 +132,7 @@ namespace vcsn
os << l;
if (os.str() == "1")
return "";
return os.str().c_str();
return os.str().c_str();
}
......@@ -142,14 +142,14 @@ namespace vcsn
{
typedef typename A::const_iterator alphabet_iterator;
for_each_letter(l, alphabet)
{
std::ostringstream letter;
xercesc::DOMElement* gen =
doc->createElement(STR2XML("generator"));
letter << *l;
gen->setAttribute(STR2XML("value"), STR2XML(letter.str().c_str()));
root->appendChild(gen);
}
{
std::ostringstream letter;
xercesc::DOMElement* gen =
doc->createElement(STR2XML("generator"));
letter << *l;
gen->setAttribute(STR2XML("value"), STR2XML(letter.str().c_str()));
root->appendChild(gen);
}
}
template <class M>
......@@ -176,8 +176,8 @@ namespace vcsn
xercesc::DOMElement* s = doc->createElement(STR2XML("semiring"));
if (get_semiring_set(semiring, value_t()) != "ratSeries")
s->setAttribute(STR2XML("operations"),
STR2XML(get_semiring_operations(semiring)));
s->setAttribute(STR2XML("operations"),
STR2XML(get_semiring_operations(semiring)));
s->setAttribute(STR2XML("set"),
STR2XML(get_semiring_set(semiring, value_t())));
elt->appendChild(s);
......@@ -205,15 +205,15 @@ namespace vcsn
}
/**
* Tools to generate automaton labels from string, and to ensure type
* compatibility.
*
*/
/**
* Tools to generate automaton labels from string, and to ensure type
* compatibility.
*
*/
# define GET_SEMIRING_SET(T, Value) \
template <class S> \
const char* get_semiring_set(const S&, const T&) \
{ return Value; }
template <class S> \
const char* get_semiring_set(const S&, const T&) \
{ return Value; }
// Default.
template <class S, class T>
......@@ -226,24 +226,24 @@ namespace vcsn
const vcsn::rat::exp<U, V>&)
{ return "ratSeries"; }
GET_SEMIRING_SET(bool, "B")
GET_SEMIRING_SET(double, "R")
GET_SEMIRING_SET(float, "R")
GET_SEMIRING_SET(int, "Z")
GET_SEMIRING_SET(bool, "B")
GET_SEMIRING_SET(double, "R")
GET_SEMIRING_SET(float, "R")
GET_SEMIRING_SET(int, "Z")
// Deals with the "operation" attribute of <semiring> tag.
// Deals with the "operation" attribute of <semiring> tag.
# define GET_SEMIRING_OPERATIONS(S, Value) \
const char* get_semiring_operations(const S&) \
{ return Value; }
const char* get_semiring_operations(const S&) \
{ return Value; }
// Default.
template <class S>
const char* get_semiring_operations(const S&)
{ return "undefined"; }
GET_SEMIRING_OPERATIONS(vcsn::algebra::NumericalSemiring, "numerical")
GET_SEMIRING_OPERATIONS(vcsn::z_max_plus_automaton::semiring_t, "tropicalMax")
GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
GET_SEMIRING_OPERATIONS(vcsn::algebra::NumericalSemiring, "numerical")
GET_SEMIRING_OPERATIONS(vcsn::z_max_plus_automaton::semiring_t, "tropicalMax")
GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
// Deal with the "type" attribute of <monoid> tag.
......@@ -297,7 +297,7 @@ GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
typename FMPtype::series_set_elt_t
get_series(xercesc::DOMElement* node, FMPtype& a)
{
typename FMPtype::series_set_elt_t res(a.structure().series());
typename FMPtype::series_set_elt_t res(a.structure().series());
parse_label(node, a,
a.structure().series().monoid().first_monoid().alphabet(),
......@@ -313,7 +313,7 @@ GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
get_series(xercesc::DOMElement* node,
TRANStype& a)
{
typename TRANStype::series_set_elt_t res(a.structure().series());
typename TRANStype::series_set_elt_t res(a.structure().series());
parse_label(node, a,
a.structure().series().monoid().alphabet(),
......@@ -333,7 +333,7 @@ GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
typename TRANStype::monoid_elt_t m(a.structure().series().monoid());
if (! i_res && i_exp.supp().size())
m = *(i_exp.supp().begin());
m = *(i_exp.supp().begin());
else
m = vcsn::algebra::identity_as<md_value_t>
::of(a.structure().series().monoid());
......@@ -367,19 +367,19 @@ GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
::of(a.structure().series().monoid().first_monoid()).value();
if (! o_res && o_exp.supp().size())
{
m2 = *(o_exp.supp().begin());
sem = o_exp.get(m2);
}
{
m2 = *(o_exp.supp().begin());
sem = o_exp.get(m2);
}
else
{
m2 = vcsn::algebra::identity_as<md_value_t>
::of(a.structure().series().monoid().second_monoid()).value();
sem = vcsn::algebra::identity_as<sg_value_t>
::of(a.structure().series().semiring()).value();
}
{
m2 = vcsn::algebra::identity_as<md_value_t>
::of(a.structure().series().monoid().second_monoid()).value();
sem = vcsn::algebra::identity_as<sg_value_t>
::of(a.structure().series().semiring()).value();
}
m = std::make_pair(m1, m2);
res.assoc(m, sem);
res.assoc(m, sem);
}
......@@ -388,41 +388,41 @@ GET_SEMIRING_OPERATIONS(vcsn::z_min_plus_automaton::semiring_t, "tropicalMin")
const A1& alphabet1, const A2& alphabet2, S& res)
{
using namespace vcsn::r_automaton;
automaton_t bin = new_automaton(alphabet1);
automaton_t bout = new_automaton(alphabet2);
rat_exp_t i_exp(bin.structure().series());
rat_exp_t o_exp(bout.structure().series());
automaton_t bin = make_automaton(alphabet1);
automaton_t bout = make_automaton(alphabet2);
rat_exp_t i_exp(bin.structure().series());
rat_exp_t o_exp(bout.structure().series());
std::pair<bool, std::string> i_res;
std::pair<bool, std::string> o_res;
if (node->hasAttribute(STR2XML("label")))
{
std::string label = xml2str(node->getAttribute(STR2XML("label")));
std::string in, out;
unsigned int pos = label.find("|");
if (pos != std::string::npos)
{
std::string label = xml2str(node->getAttribute(STR2XML("label")));
std::string in, out;
unsigned int pos = label.find("|");
if (pos != std::string::npos)
{
in = label.substr(0, pos);
out = label.substr(pos + 1);
i_res = parse(in, i_exp);
o_res = parse(out, o_exp);
}
else
i_res = parse(label, i_exp);
if (node->hasAttribute(STR2XML("weight")))
o_res = parse(xml2str(node->getAttribute(STR2XML("weight"))),
o_exp);
in = label.substr(0, pos);
out = label.substr(pos + 1);
i_res = parse(in, i_exp);
o_res = parse(out, o_exp);
}
else
i_res = parse(label, i_exp);
if (node->hasAttribute(STR2XML("weight")))
o_res = parse(xml2str(node->getAttribute(STR2XML("weight"))),
o_exp);
}
else
{
if (node->hasAttribute(STR2XML("in")))
i_res = parse(xml2str(node->getAttribute(STR2XML("in"))),
i_exp);
if (node->hasAttribute(STR2XML("out")))
o_res = parse(xml2str(node->getAttribute(STR2XML("out"))),
o_exp);
}
{
if (node->hasAttribute(STR2XML("in")))
i_res = parse(xml2str(node->getAttribute(STR2XML("in"))),
i_exp);