C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: C++ properties Library Created (was Binding together Pro

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Victor Porton
Guest





PostPosted: Sat Aug 28, 2004 7:14 pm    Post subject: Re: C++ properties Library Created (was Binding together Pro Reply with quote



Wavemaker <jabberdabber (AT) BiteMeHotmail (DOT) com> wrote:
Quote:
Wavemaker <jabberdabber (AT) BiteMeHotmail (DOT) com> wrote:

someObject.SomeProperty = someValue;

OK, I implemented this in a good way - http://ex-code.com/propcpp/

#include <propc++/property.h>

class Widget
{
...
Color get_color();
void set_color(Color value);
prop::Property<Widget, Color, &Widget::set_color, &Widget::get_color>
color;
...
};

....

widget.color = "red";

Binding properties together
(http://ex-code.com/articles/binding-properties.html) is not yet
implemented in 0.1 (subscribe to news at
[url]http://ex-code.com/xml-files.html)[/url].

You are welcomed to send patches! You are welcome to search for the most
efficient impl of binding properties.

Quote:
Last evening, I decided to take a stab at implementing
binding properties in C++. I came up with the following:

No, not the best way. Instead extend libpropc++, the C++ properties library.
Some parts of new library libpropc++ use libsigc++
([url]http://libbsigc.sf.net)[/url], the C++ signalling library (an implementation of
OO "Observer pattern").

P.S. I added Followup-To: comp.lang.c++ as this is a C++ specific topic now.

--
== Victor Porton (porton (AT) ex-code (DOT) com) ==
# http://ex-code.com - software company, custom software for low price #
# http://ex-code.com/~porton/ - Christian revelations, math discoveries #
# http://ex-code.com/articles/ - original programming/XML articles #

Back to top
Steven T. Hatton
Guest





PostPosted: Sun Aug 29, 2004 8:02 pm    Post subject: Re: C++ properties Library Created (was Binding together Pro Reply with quote



Victor Porton wrote:

Quote:
Wavemaker <jabberdabber (AT) BiteMeHotmail (DOT) com> wrote:
Wavemaker <jabberdabber (AT) BiteMeHotmail (DOT) com> wrote:

someObject.SomeProperty = someValue;

OK, I implemented this in a good way - http://ex-code.com/propcpp/

#include
class Widget
{
...
Color get_color();
void set_color(Color value);
prop::Property color;
...
};

...

widget.color = "red";

Binding properties together
(http://ex-code.com/articles/binding-properties.html) is not yet
implemented in 0.1 (subscribe to news at
[url]http://ex-code.com/xml-files.html)[/url].

You are welcomed to send patches! You are welcome to search for the most
efficient impl of binding properties.

Last evening, I decided to take a stab at implementing
binding properties in C++. I came up with the following:

No, not the best way. Instead extend libpropc++, the C++ properties
library. Some parts of new library libpropc++ use libsigc++
([url]http://libbsigc.sf.net)[/url], the C++ signalling library (an implementation of
OO "Observer pattern").

P.S. I added Followup-To: comp.lang.c++ as this is a C++ specific topic
now.

This looks kind of interesting to me. I've been trying to reimplement the

wheel for the sake of experience. I believe what your properties code
(template?) will do for me is make it easy for me to create a "property
sheet" for any kind of object that can use such a collection. The downside
of all this is that none of the links work.

Oh wait! Now I got something. Oh well, I guess I don't have a legitimate
excuse to post this. Other than to say, I think this is a good idea.
--
"[M]y dislike for the preprocessor is well known. Cpp is essential in C
programming, and still important in conventional C++ implementations, but
it is a hack, and so are most of the techniques that rely on it. ...I think
the time has come to be serious about macro-free C++ programming." - B. S.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.