Boost logo

Boost :

From: remi.chateauneu_at_[hidden]
Date: 2007-05-15 05:42:37


>>> - The possibility to consider as a plain data member, any method
>>> (getter/setter ...) of a class, even if there is no underlying member,
>>> or if they are private, and also base classes.
>>>
> OOPS. I didn't read the last two about dynamic sttributes and
> the "consider as plain data member". I don't have any idea how
> fusion could be adapted to handle these needs, especially since
> I'm unclear about what is the "consider as plain data member" need.
> Could you explain more or provide examples?
>

Please let me give you a silly example:

struct Person {
  std::string _name ;
  int _age ;
  bool is_retired(void) const { return _age >= 65 ; };
};

When serializing such an object, many users would like to have
'IsRetired' saved like the other members.
 This may sound silly, but sometimes users are always right :):):) . So,
CRD allows to have in a definition list, not only class members, but
also methods of a given signature.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk