Commit beb08417 authored by Akim Demaille's avatar Akim Demaille
Browse files

WIP: even more visibility.

* vcsn/algos/make-context.hh: .
* vcsn/alphabets/char.hh: .
* vcsn/alphabets/setalpha.hh: .
* vcsn/core/rat/info.hh: .
* vcsn/core/rat/less-than.hh: .
* vcsn/core/rat/printer.hh: .
* vcsn/core/rat/ratexp.hh: .
* vcsn/core/rat/transpose.hh: .
* vcsn/core/rat/visitor.hh: .
* vcsn/ctx/context.hh: .
* vcsn/dyn/polynomial.hh: .
* vcsn/dyn/polynomialset.hh: .
* vcsn/dyn/ratexp.hh: .
* vcsn/dyn/ratexpset.hh: .
* vcsn/dyn/weight.hh: .
* vcsn/empty.hh: .
* vcsn/labelset/genset-labelset.hh: .
* vcsn/labelset/letterset.hh: .
* vcsn/labelset/nullableset.hh: .
* vcsn/labelset/oneset.hh: .
* vcsn/labelset/wordset.hh: .
parent 9725ba97
......@@ -60,7 +60,10 @@ namespace vcsn
make_ratexpset(const context& ctx)
{
const auto& c = ctx->as<Ctx>();
return std::make_shared<concrete_abstract_ratexpset<Ctx>>(c);
auto res = std::make_shared<concrete_abstract_ratexpset<Ctx>>(c);
std::cerr << "makers: typeinfo: " << &typeid(*res) << std::endl;
std::cerr << "makers: typeinfo: " << &typeid(concrete_abstract_ratexpset<Ctx>) << std::endl;
return res;
}
REGISTER_DECLARE(make_ratexpset,
......
......@@ -6,10 +6,11 @@
# include <iostream>
# include <vcsn/misc/escape.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
class char_letters
class LIBVCSN_API char_letters
{
public:
using letter_t = char;
......
......@@ -6,11 +6,13 @@
# include <vcsn/misc/set.hh>
# include <vcsn/misc/stream.hh> // eat.
# include <vcsn/misc/export.hh>
namespace vcsn
{
template <typename L>
class set_alphabet: public L
class LIBVCSN_API set_alphabet
: public L
{
public:
using letter_t = typename L::letter_t;
......
......@@ -11,7 +11,7 @@ namespace vcsn
{
template <typename RatExpSet>
class info
class LIBVCSN_API info
: public RatExpSet::const_visitor
{
public:
......
......@@ -12,7 +12,7 @@ namespace vcsn
{
template <class RatExpSet>
class less_than
class LIBVCSN_API less_than
: public RatExpSet::const_visitor
{
public:
......
......@@ -11,7 +11,7 @@ namespace vcsn
{
template <typename RatExpSet>
class printer
class LIBVCSN_API printer
: public RatExpSet::const_visitor
{
public:
......
......@@ -9,6 +9,7 @@
# include <vcsn/core/kind.hh>
# include <vcsn/core/rat/fwd.hh>
# include <vcsn/core/rat/visitor.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -17,7 +18,7 @@ namespace vcsn
/// The abstract, non-parameterized, root for all rational
/// expression node types.
class exp
class LIBVCSN_API exp
{
public:
virtual ~exp() = 0;
......@@ -54,7 +55,7 @@ namespace vcsn
///
/// All the nodes have a left weight, implemented here.
template <typename Label, typename Weight>
class node : public exp
class LIBVCSN_API node : public exp
{
public:
using label_t = Label;
......@@ -94,7 +95,7 @@ namespace vcsn
///
/// Adds a right weight.
template <typename Label, typename Weight>
class inner : public node<Label, Weight>
class LIBVCSN_API inner : public node<Label, Weight>
{
public:
using label_t = Label;
......@@ -130,7 +131,7 @@ namespace vcsn
///
/// Implements the Composite Design Pattern.
template <typename Label, typename Weight>
class nary: public inner<Label, Weight>
class LIBVCSN_API nary: public inner<Label, Weight>
{
public:
using label_t = Label;
......@@ -187,7 +188,7 @@ namespace vcsn
`-------*/
template <typename Label, typename Weight>
class prod : public nary<Label, Weight>
class LIBVCSN_API prod : public nary<Label, Weight>
{
public:
using label_t = Label;
......@@ -225,7 +226,7 @@ namespace vcsn
`------*/
template <typename Label, typename Weight>
class sum : public nary<Label, Weight>
class LIBVCSN_API sum : public nary<Label, Weight>
{
public:
using label_t = Label;
......@@ -262,7 +263,7 @@ namespace vcsn
`-------*/
template <typename Label, typename Weight>
class star : public inner<Label, Weight>
class LIBVCSN_API star : public inner<Label, Weight>
{
public:
using label_t = Label;
......@@ -299,7 +300,7 @@ namespace vcsn
/// The root from which derive the final node types.
template <typename Label, typename Weight>
class leaf : public node<Label, Weight>
class LIBVCSN_API leaf : public node<Label, Weight>
{
public:
using label_t = Label;
......@@ -318,7 +319,7 @@ namespace vcsn
template <typename Label, typename Weight>
class one : public leaf<Label, Weight>
class LIBVCSN_API one : public leaf<Label, Weight>
{
public:
using label_t = Label;
......@@ -344,7 +345,7 @@ namespace vcsn
};
template <typename Label, typename Weight>
class zero : public leaf<Label, Weight>
class LIBVCSN_API zero : public leaf<Label, Weight>
{
public:
using label_t = Label;
......@@ -371,7 +372,7 @@ namespace vcsn
template <typename Label, typename Weight>
class atom : public leaf<Label, Weight>
class LIBVCSN_API atom : public leaf<Label, Weight>
{
public:
using label_t = Label;
......
......@@ -15,7 +15,7 @@ namespace vcsn
/// \param Context relative to the RatExp.
template <class RatExpSet>
class transposer
class LIBVCSN_API transposer
: public RatExpSet::const_visitor
{
public:
......
......@@ -2,6 +2,7 @@
# define VCSN_CORE_RAT_VISITOR_HH
# include <vcsn/core/rat/fwd.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -9,7 +10,7 @@ namespace vcsn
{
template <typename Label, typename Weight>
class const_visitor
class LIBVCSN_API const_visitor
{
public:
using label_t = Label;
......
......@@ -5,10 +5,11 @@
# include <memory>
# include <string>
# include <vcsn/core/rat/fwd.hh>
# include <vcsn/core/kind.hh>
# include <vcsn/core/rat/fwd.hh>
# include <vcsn/ctx/fwd.hh>
# include <vcsn/dyn/context.hh>
# include <vcsn/misc/export.hh>
# include <vcsn/misc/stream.hh>
namespace vcsn
......@@ -17,7 +18,8 @@ namespace vcsn
namespace ctx
{
template <typename LabelSet, typename WeightSet>
class context: public dyn::detail::abstract_context
class LIBVCSN_API context
: public dyn::detail::abstract_context
{
public:
using labelset_t = LabelSet;
......
......@@ -4,6 +4,7 @@
# include <memory>
# include <vcsn/ctx/fwd.hh>
# include <vcsn/dyn/polynomialset.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -16,7 +17,7 @@ namespace vcsn
///
/// FIXME: Improperly named, it is not a base class for
/// static polynomials.
class abstract_polynomial
class LIBVCSN_API abstract_polynomial
{
public:
/// A description of the polynomial.
......@@ -45,7 +46,7 @@ namespace vcsn
/// FIXME: Improperly named, it is not a base class for
/// static polynomials.
template <typename PolynomialSet>
class concrete_abstract_polynomial: public abstract_polynomial
class LIBVCSN_API concrete_abstract_polynomial: public abstract_polynomial
{
public:
using polynomialset_t = PolynomialSet;
......
......@@ -5,6 +5,7 @@
# include <string>
# include <vcsn/ctx/fwd.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -12,7 +13,7 @@ namespace vcsn
{
namespace detail
{
class abstract_polynomialset
class LIBVCSN_API abstract_polynomialset
{
public:
/// A description of the polynomialset, sufficient to build it.
......
......@@ -30,6 +30,10 @@ namespace vcsn
template <typename RatExpSet>
concrete_abstract_ratexp<RatExpSet>& as()
{
std::cerr << "asre: typeinfo: " << &typeid(*this) << std::endl;
std::cerr << "asre: typeinfo: " << &typeid(concrete_abstract_ratexp<RatExpSet>&) << std::endl;
std::cerr << "asre: typeinfo: " << typeid(*this).name() << std::endl;
std::cerr << "asre: typeinfo: " << typeid(concrete_abstract_ratexp<RatExpSet>&).name() << std::endl;
return dynamic_cast<concrete_abstract_ratexp<RatExpSet>&>(*this);
}
......@@ -46,7 +50,7 @@ namespace vcsn
/// FIXME: Improperly named, it is not a base class for
/// static ratexps.
template <typename RatExpSet>
class concrete_abstract_ratexp: public abstract_ratexp
class LIBVCSN_API concrete_abstract_ratexp: public abstract_ratexp
{
public:
using ratexpset_t = RatExpSet;
......@@ -91,8 +95,11 @@ namespace vcsn
const typename vcsn::ratexpset<Context>::ratexp_t& ratexp)
{
using ratexpset_t = vcsn::ratexpset<Context>;
return std::make_shared<detail::concrete_abstract_ratexp<ratexpset_t>>
auto res = std::make_shared<detail::concrete_abstract_ratexp<ratexpset_t>>
(ratexp, rs);
std::cerr << "makere: typeinfo: " << &typeid(*res) << std::endl;
std::cerr << "makere: typeinfo: " << &typeid(detail::concrete_abstract_ratexp<ratexpset_t>) << std::endl;
return res;
}
} // namespace dyn
......
......@@ -7,6 +7,7 @@
# include <vcsn/core/rat/fwd.hh>
# include <vcsn/dyn/ratexp.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -21,7 +22,7 @@ namespace detail
/// parameters (e.g., from a parser). To use it, actually create a
/// derived class (concrete_abstract_ratexpset) with the given
/// parameters, but handle as a reference to an abstract_ratexpset.
class abstract_ratexpset
class LIBVCSN_API abstract_ratexpset
{
public:
using context_t = dyn::detail::abstract_context;
......@@ -52,7 +53,7 @@ namespace detail
/// Wrapper around a ratexpset.
template <typename Context>
class concrete_abstract_ratexpset : public abstract_ratexpset
class LIBVCSN_API concrete_abstract_ratexpset : public abstract_ratexpset
{
public:
using context_t = Context;
......
#ifndef VCSN_DYN_WEIGHT_HH
# define VCSN_DYN_WEIGHT_HH
# include <iostream>
# include <memory>
# include <typeinfo>
# include <vcsn/ctx/fwd.hh>
# include <vcsn/dyn/weightset.hh>
......@@ -33,9 +35,10 @@ namespace vcsn
}
template <typename WeightSet>
LIBVCSN_API
const concrete_abstract_weight<WeightSet>& as() const
{
std::cerr << "as: typeinfo: " << &typeid(*this) << std::endl;
std::cerr << "as: typeinfo: " << &typeid(const concrete_abstract_weight<WeightSet>&) << std::endl;
return dynamic_cast<const concrete_abstract_weight<WeightSet>&>(*this);
}
};
......@@ -90,8 +93,11 @@ namespace vcsn
make_weight(const WeightSet& ws,
const typename WeightSet::value_t& weight)
{
return std::make_shared<detail::concrete_abstract_weight<WeightSet>>
auto res = std::make_shared<detail::concrete_abstract_weight<WeightSet>>
(weight, ws);
std::cerr << "makere: typeinfo: " << &typeid(*res) << std::endl;
std::cerr << "makere: typeinfo: " << &typeid(detail::concrete_abstract_weight<WeightSet>) << std::endl;
return res;
}
} // namespace dyn
} // namespace vcsn
......
......@@ -3,10 +3,12 @@
# include <functional> // std::hash
# include <vcsn/misc/export.hh>
namespace vcsn
{
/// Empty labels, for LAO.
struct empty_t
struct LIBVCSN_API empty_t
{};
// So that we can make a map with empty_t as key, for
......
......@@ -5,6 +5,7 @@
# include <set>
# include <vcsn/core/kind.hh>
# include <vcsn/misc/export.hh>
namespace vcsn
{
......@@ -13,7 +14,7 @@ namespace vcsn
/// This class has no modeling purpose, it only serves to factor
/// code common to letterset, nullableset and wordset.
template <typename GenSet>
struct genset_labelset
struct LIBVCSN_API genset_labelset
{
using genset_t = GenSet;
using genset_ptr = std::shared_ptr<const genset_t>;
......
......@@ -6,6 +6,7 @@
# include <vcsn/alphabets/setalpha.hh> // intersection
# include <vcsn/core/kind.hh>
# include <vcsn/misc/escape.hh>
# include <vcsn/misc/export.hh>
# include <vcsn/misc/set.hh> // intersection
# include <vcsn/misc/stream.hh> // conv.
# include <vcsn/labelset/genset-labelset.hh>
......@@ -16,7 +17,8 @@ namespace vcsn
{
/// Implementation of labels are letters.
template <typename GenSet>
struct letterset: genset_labelset<GenSet>
struct LIBVCSN_API letterset
: genset_labelset<GenSet>
{
using genset_t = GenSet;
using super_type = genset_labelset<genset_t>;
......
......@@ -8,6 +8,7 @@
# include <vcsn/alphabets/setalpha.hh> // intersect
# include <vcsn/core/kind.hh>
# include <vcsn/misc/escape.hh>
# include <vcsn/misc/export.hh>
# include <vcsn/misc/stream.hh> // conv.
# include <vcsn/labelset/genset-labelset.hh>
......@@ -17,7 +18,7 @@ namespace vcsn
{
/// Implementation of labels are nullables (letter or empty).
template <typename GenSet>
struct nullableset: genset_labelset<GenSet>
struct LIBVCSN_API nullableset: genset_labelset<GenSet>
{
using genset_t = GenSet;
using super_type = genset_labelset<genset_t>;
......
......@@ -8,6 +8,7 @@
# include <vcsn/empty.hh>
# include <vcsn/core/kind.hh>
# include <vcsn/misc/export.hh>
# include <vcsn/misc/stream.hh> // conv.
namespace vcsn
......@@ -16,7 +17,7 @@ namespace vcsn
{
/// Implementation of labels are ones: there is a single instance
/// of label.
struct oneset
struct LIBVCSN_API oneset
{
using value_t = vcsn::empty_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