Boost logo

Boost :

From: Stefan Strasser (sstrasser_at_[hidden])
Date: 2005-04-10 03:39:28

Jonathan Turkanis schrieb:
> Stefan Strasser wrote:
>>I'd like to know if there is interest in developing a small library
>>for inclusion in boost to emulate properties, something like:
>>struct A{
>> void SetVar(int a){ cerr << "set " << a << endl; }
>> int GetVar() const{ cerr << "get" << endl; return 0; }
>> BOOST_PROPERTY(A,int,Var,SetVar,GetVar);
>>A a;
>>a.Var=3; //calls SetVar
> You might like to look at this thread:

though I think an implementation like the one described in N1615 is
impractical to use, because, besides the overhead of the implementation
pointer, you need to explicitly construct each property.
which isn't required, with the drawback of using a macro to declare

however, where can you find it? it isn't in the sandbox anymore.

Stefan Strasser

Boost list run by bdawes at, gregod at, cpdaniel at, john at