|
Boost : |
Subject: Re: [boost] [mixin] Introducing a new library.
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2013-02-05 09:51:28
Hi again,
On Sat, Feb 2, 2013 at 5:02 PM, Matus Chochlik <chochlik_at_[hidden]> wrote:
> On Fri, Feb 1, 2013 at 10:56 PM, Borislav Stanimirov
> <b.stanimirov_at_[hidden]> wrote:
[...]
I've been playing with the library and I would like to ask a couple of
questions:
1) Is it (/will it be) possible to check is a specific message can be sent
to an object, instead of checking for mixin type.
2) Will it be possible through mutate::add<Mixin>() to add an existing instance
of the Mixin, that could be shared among several objects ?
For example, in a game that supports item modification, default unmodified items
could share some common mixin that would manage the default properties,
and when the item is modified this shared mixin would be replaced by an unique
instance of the mixin specific to the particular modified item.
3) Will some kind of "message overloading" be supported? For example:
class named
{
private:
string _name
public:
void name(const string& new_name){ _name = new_name; }
const std::string& name(void) const { return _name; }
};
BOOST_DECLARE_MIXIN(named);
BOOST_MIXIN_CONST_MESSAGE_0(const string&, name);
BOOST_MIXIN_MESSAGE_1(void, name, const string&, new_name);
...
TIA,
Matus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk