473,388 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

policy based design, and traits

please be so kind and direct me to as many sources as you can regarding the
*subject* matter. i'm new to the topic and would like to learn as much as
possible.

thank you in advance

martin
Oct 14 '05 #1
4 2021
Martin Vorbrodt wrote:
please be so kind and direct me to as many sources as you can
regarding the *subject* matter. i'm new to the topic and would like
to learn as much as possible.


Andrei Alexandrescu, "Modern C++ Design", get a copy. When you have
gone through it, ask more questions.

V
Oct 14 '05 #2
Victor Bazarov wrote:
Martin Vorbrodt wrote:
please be so kind and direct me to as many sources as you can
regarding the *subject* matter. i'm new to the topic and would like
to learn as much as possible.


Andrei Alexandrescu, "Modern C++ Design", get a copy. When you have
gone through it, ask more questions.


_MC++D_ is indeed the primary resource for policy-based design. You
could also read Alexandrescu's columns in the _C/C++ Users Journal_ in
which he not infrequently touches on the subject: cuj.com. As for
traits and such, you could look into Boost's documentation: boost.org.
Then there's always comp.lang.c++.moderated, comp.lang.c++, and
comp.std.c++ where Alexandrescu and other knowledgeable folk lurk.

Cheers! --M

Oct 14 '05 #3
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:Nd********************@comcast.com...
Martin Vorbrodt wrote:
please be so kind and direct me to as many sources as you can
regarding the *subject* matter. i'm new to the topic and would like
to learn as much as possible.


Andrei Alexandrescu, "Modern C++ Design", get a copy. When you have
gone through it, ask more questions.

V


started reading it today (for the second time i must add, last time got to
chapter six and, well, got a little confused. but that was a while ago).
i'll get back with more questions in few days, of that you can be cartain:)

Martin V
Oct 14 '05 #4
Martin Vorbrodt wrote:
"Victor Bazarov" <v.********@comAcast.net> wrote in message
Andrei Alexandrescu, "Modern C++ Design", get a copy. When you have
gone through it, ask more questions.


started reading it today (for the second time i must add, last time got to
chapter six and, well, got a little confused. but that was a while ago).
i'll get back with more questions in few days, of that you can be cartain:)


The first four chapters of MC++D are the tools used throughout the
book, and when I read the book, I went through the first two chapters
and skimmed the next two. Then I jumped to the chapters on factories (8
and 9) and then smart pointers (7), which were the parts that I was
interested in at the time. I referred back to chapter 3 on typelists
when they became important in chapter 9 and to chapter 4 on small
object allocation when it came up in chapter 7, but not before.

I'd suggest doing something similar: read part of the "Techniques" in
the first four chapters, then jump to the application of them that is
most relevant for you. If none of the applications stand out, go to
chapter 8, which presents a very useful and simple design pattern, the
object factory. (Smart pointers are more universally relevant, but that
chapter is a bit more complex and requires chapter 4 also.) Once you
have an idea of how things work, you'll be better able to get your mind
around the more complex material presented in the other chapters.

It's also handy to have _Design Patterns_ handy, since MC++D references
it a lot.

BTW, Alexandrescu with David Held wrote a series four articles fixing a
bug in the exception safety of the smart pointer from chapter 7
starting in October 2003 in the CUJ Online Experts Forum and continuing
in the magazine in the December 2003 issue
(http://www.cuj.com/documents/s=8890/.../alexandr.htm).

Cheers! --M

Oct 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mjm | last post by:
Folks, I am encountering the following problem when using templates in writing a library: since template functions are only instantiated at the point of use classes don't have to follow well...
0
by: rjoshi | last post by:
There is a nice article about practicle usage of Policy Base Design at http://www.codeproject.com/library/Generic_Pool_Design.asp
8
by: Jon Slaughter | last post by:
I'm reading Alexandrescu's Modern C++ design about the concept of policies. What I'm wondering is if policies are a common design pattern in C++(OOP) nowdays? It seems like a good idea but I'm...
5
by: Martin Vorbrodt | last post by:
I'm designing a Matrix class of 4x4 matrices used in computer graphics. Both OpenGL and Direct3D can take a pointer to array of 16 floats which represent the values in the matrix. OGL takes it in...
4
by: Jon Slaughter | last post by:
At the bottom of the page on http://ootips.org/yonat/4dev/smart-pointers.html It is noted that one would use different types of pointers based on different "locations" in the code. What I'm...
4
by: Erik Wikström | last post by:
In school (no I will not ask you to do my schoolwork for me) we talked about policy-based design and got an assignment where we got the a code- fragment from a stack-implementation. The idea with...
1
by: feng | last post by:
Hi, I know this might not be a question for this group but I would give it a try anyway as I couldn't find a better group for my question. I have noticed that there are a lot of articles out...
0
by: aaragon | last post by:
Hi everyond. I'm trying to write a library usign policy based design so I can implement different behaviors. One of the behaviors was to define a StoragePolicy. The following code gives the...
3
by: DerrickH | last post by:
I have a template class with three policies: PolicyA, PolicyB, and PolicyC. The design dilemma I am having is that B and C depend upon A, but I would like my Host class to derive from all three. In...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.