www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - Tutorials on using STLSoft

reply "Default User" <anonymous discussions.microsoft.com> writes:
I've seen a lot of cool sounding features in STLSoft but I was wondering if 
there are any good examples or detailed discussions in the use of the 
STLSoft libraries.

I picked up Imperfect C++ but feel that the book only briefly touches some 
issues but does not really go into big enough detail to show where one 
particular idea would best fit.

Is there a place where I can find detailed examples of ideal situations 
where I might want to incorporate these libraries? 
Jan 10 2006
parent reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
 I've seen a lot of cool sounding features in STLSoft but I was wondering

 there are any good examples

Well, each distro comes with quite a lot of test programs, which aren't that illuminating, and a few samples, which hopefully are a little more so. Also the recls (http://recls.org) and Open-RJ (http://openrj.org) libraries use STLSoft a fair bit.
 or detailed discussions in the use of the
 STLSoft libraries.

Other than in my book(s) and articles (http://www.synesis.com.au/articles.html), this newsgroup's largely where most discussion is happening. But, overall, it's fair to say that the quantity and quality of tutorials is low. Since STLSoft is largely just l'il ole me plugging away, some things fall by the wayside, and thus far it's been the documentation and tutorials that've had to take the back seat
 I picked up Imperfect C++ but feel that the book only briefly touches some
 issues but does not really go into big enough detail to show where one
 particular idea would best fit.

Sure.
 Is there a place where I can find detailed examples of ideal situations
 where I might want to incorporate these libraries?

All I can suggest is to ask questions here, and I, or some of the other users, can answer them. Maybe if you get enough good answers, you might be able to form your own tutorial. (Bob knows I could do with the help <g>) Cheers -- Matthew Wilson Author: "Extended STL", Addison-Wesley, 2006 http://www.extendedstl.com Author: "Imperfect C++", Addison-Wesley, 2004 http://www.imperfectcplusplus.com Contributing editor, C/C++ Users Journal http://www.synesis.com.au/articles.html#columns Director, Synesis Software www.synesis.com.au STLSoft moderator http://www.stlsoft.org news://news.digitalmars.com/c++.stlsoft "I can't sleep nights till I found out who hurled what ball through what apparatus" -- Dr Niles Crane
Jan 10 2006
parent reply "Raindog" <raindog macrohmasheen.com> writes:
Matthew,

I just got to a point in my project where I required use of some simple 
scoped locking objects.

Now I've come to the problem of this: I can't even figure out what namespace 
they are in so that I can use them.....

The 8000 different #defines and conditional compilations make it 
exceptionally difficult to wade through the code, it was not but by 
happenstance that I caught this on the front page:

 Note: in fact, each of the sub-projects is defined in a nested namespace 
that is aliased to the given one, e.g. WinSTL components are defined within 
stlsoft::winstl_project, to which winstl is aliased. However, you need not 
concern yourself about that, and can simply use the notional namespace. (See 
the white-papers for details of a C/C++ User's Journal article describing 
this technique.)

Visual Studio was unable to find the winstl alias, or even the projectstl 
alias that I was attempting to use thread_mutex from.

After about 20 minutes and a short break I was finally able to come up with 
the correct solution.

typedef stlsoft::winstl_project::thread_mutex mutex_t;

mutex_t Mtx;

{

::stlsoft::lock_scope<mutex_t> Scope(Mtx);

}


But it was far too much time spent on such 3 simple lines of code =\

"Matthew" <matthew hat.stlsoft.dot.org> wrote in message 
news:dq24u4$l1b$1 digitaldaemon.com...
 I've seen a lot of cool sounding features in STLSoft but I was wondering

 there are any good examples

Well, each distro comes with quite a lot of test programs, which aren't that illuminating, and a few samples, which hopefully are a little more so. Also the recls (http://recls.org) and Open-RJ (http://openrj.org) libraries use STLSoft a fair bit.
 or detailed discussions in the use of the
 STLSoft libraries.

Other than in my book(s) and articles (http://www.synesis.com.au/articles.html), this newsgroup's largely where most discussion is happening. But, overall, it's fair to say that the quantity and quality of tutorials is low. Since STLSoft is largely just l'il ole me plugging away, some things fall by the wayside, and thus far it's been the documentation and tutorials that've had to take the back seat
 I picked up Imperfect C++ but feel that the book only briefly touches 
 some
 issues but does not really go into big enough detail to show where one
 particular idea would best fit.

Sure.
 Is there a place where I can find detailed examples of ideal situations
 where I might want to incorporate these libraries?

All I can suggest is to ask questions here, and I, or some of the other users, can answer them. Maybe if you get enough good answers, you might be able to form your own tutorial. (Bob knows I could do with the help <g>) Cheers -- Matthew Wilson Author: "Extended STL", Addison-Wesley, 2006 http://www.extendedstl.com Author: "Imperfect C++", Addison-Wesley, 2004 http://www.imperfectcplusplus.com Contributing editor, C/C++ Users Journal http://www.synesis.com.au/articles.html#columns Director, Synesis Software www.synesis.com.au STLSoft moderator http://www.stlsoft.org news://news.digitalmars.com/c++.stlsoft "I can't sleep nights till I found out who hurled what ball through what apparatus" -- Dr Niles Crane

Feb 13 2006
parent reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
In the specific case, you would just need to write

typedef winstl::thread_mutex mutex_t;

mutex_t Mtx;

{

::stlsoft::lock_scope<mutex_t> Scope(Mtx);

}


But overall, I cannot argue that the documentation is terrible. I'd love to
have even a hint/pointer from someone such as yourself as to how to improve
it. Each time I get such, I will make a change. Please feel free to make any
suggestions you think appropriate.

Once my book is out of the way - 3 more chapters to go .... - I plan to do
some serious work on the documentation, so that 1.9, which comes with masses
of improvements and new components/librraies, gets seen in an appropriate
light.

Cheers

Matthew

P.S. Thanks for taking the time to post. It's appreciated. :-)

"Raindog" <raindog macrohmasheen.com> wrote in message
news:dspg6h$1cn4$1 digitaldaemon.com...
 Matthew,

 I just got to a point in my project where I required use of some simple
 scoped locking objects.

 Now I've come to the problem of this: I can't even figure out what

 they are in so that I can use them.....

 The 8000 different #defines and conditional compilations make it
 exceptionally difficult to wade through the code, it was not but by
 happenstance that I caught this on the front page:

  Note: in fact, each of the sub-projects is defined in a nested namespace
 that is aliased to the given one, e.g. WinSTL components are defined

 stlsoft::winstl_project, to which winstl is aliased. However, you need not
 concern yourself about that, and can simply use the notional namespace.

 the white-papers for details of a C/C++ User's Journal article describing
 this technique.)

 Visual Studio was unable to find the winstl alias, or even the projectstl
 alias that I was attempting to use thread_mutex from.

 After about 20 minutes and a short break I was finally able to come up

 the correct solution.

 typedef stlsoft::winstl_project::thread_mutex mutex_t;

 mutex_t Mtx;

 {

 ::stlsoft::lock_scope<mutex_t> Scope(Mtx);

 }


 But it was far too much time spent on such 3 simple lines of code =\

 "Matthew" <matthew hat.stlsoft.dot.org> wrote in message
 news:dq24u4$l1b$1 digitaldaemon.com...
 I've seen a lot of cool sounding features in STLSoft but I was



 if
 there are any good examples

Well, each distro comes with quite a lot of test programs, which aren't that illuminating, and a few samples, which hopefully are a little more so. Also the recls (http://recls.org) and Open-RJ (http://openrj.org) libraries use STLSoft a fair bit.
 or detailed discussions in the use of the
 STLSoft libraries.

Other than in my book(s) and articles (http://www.synesis.com.au/articles.html), this newsgroup's largely


 most discussion is happening.


 But, overall, it's fair to say that the quantity and quality of


 is
 low. Since STLSoft is largely just l'il ole me plugging away, some


 fall by the wayside, and thus far it's been the documentation and
 tutorials
 that've had to take the back seat

 I picked up Imperfect C++ but feel that the book only briefly touches
 some
 issues but does not really go into big enough detail to show where one
 particular idea would best fit.

Sure.
 Is there a place where I can find detailed examples of ideal situations
 where I might want to incorporate these libraries?

All I can suggest is to ask questions here, and I, or some of the other users, can answer them. Maybe if you get enough good answers, you might


 able to form your own tutorial. (Bob knows I could do with the help <g>)

 Cheers


 -- 
 Matthew Wilson

 Author: "Extended STL", Addison-Wesley, 2006
    http://www.extendedstl.com
 Author: "Imperfect C++", Addison-Wesley, 2004
    http://www.imperfectcplusplus.com
 Contributing editor, C/C++ Users Journal
    http://www.synesis.com.au/articles.html#columns
 Director, Synesis Software
    www.synesis.com.au
 STLSoft moderator
    http://www.stlsoft.org
    news://news.digitalmars.com/c++.stlsoft

 "I can't sleep nights till I found out who hurled what ball through
 what apparatus" -- Dr Niles Crane


Feb 13 2006
parent reply Pablo Aguilar <pablo.aguilar gmail.com> writes:
Do you encourage use or otherwise of the winstl_ns_using or 
winstl_ns_qual macros?

'cuz that's what I use all the time...

And they work fine even with VC6's crappy support.


Pablo

Matthew wrote:
 In the specific case, you would just need to write
 
 typedef winstl::thread_mutex mutex_t;
 
 mutex_t Mtx;
 
 {
 
 ::stlsoft::lock_scope<mutex_t> Scope(Mtx);
 
 }
 
 
 But overall, I cannot argue that the documentation is terrible. I'd love to
 have even a hint/pointer from someone such as yourself as to how to improve
 it. Each time I get such, I will make a change. Please feel free to make any
 suggestions you think appropriate.
 
 Once my book is out of the way - 3 more chapters to go .... - I plan to do
 some serious work on the documentation, so that 1.9, which comes with masses
 of improvements and new components/librraies, gets seen in an appropriate
 light.
 
 Cheers
 
 Matthew

Feb 14 2006
next sibling parent "Matthew" <nowhere noaddress.co.us> writes:
"Pablo Aguilar" <pablo.aguilar gmail.com> wrote in message 
news:dss6ji$14ok$1 digitaldaemon.com...
 Do you encourage use or otherwise of the winstl_ns_using or winstl_ns_qual 
 macros?

I use them in the libs, and in test code, but I don't like to use them in application code, and I wouldn't recommend there use as such. However, if people want to do so, there's no technical reason why they shouldn't: they'll always be supported.
 'cuz that's what I use all the time...

 And they work fine even with VC6's crappy support.

Indeed. That's the point. If you're writing code to work with really old compilers, then you might do so.
Feb 23 2006
prev sibling parent "Matt Wilson" <matthewwilson acm.org> writes:
"Pablo Aguilar" <pablo.aguilar gmail.com> wrote in message 
news:dss6ji$14ok$1 digitaldaemon.com...
 Do you encourage use or otherwise of the winstl_ns_using or winstl_ns_qual 
 macros?

 'cuz that's what I use all the time...

 And they work fine even with VC6's crappy support.

Well, that's what they're there for, but I don't encourage it in application code. They're more for internal use, and an emergency thing for anyone that finds they need them (usually because they're having to work with VC6!)
Jun 17 2010