policy-based-design Questions
5
Solved
I have a class whose behavior I am trying to configure.
template<int ModeT, bool IsAsync, bool IsReentrant> ServerTraits;
Then later on I have my server object itself:
template<typename T...
Hypercorrect asked 5/2, 2013 at 22:16
1
Solved
At Meeting C++ 2019, Jon Kalb gave a talk about template techniques and mentioned policy classes. See here for the source: https://youtu.be/MLV4IVc4SwI?t=1815
The interesting code snippet in quest...
Backlog asked 27/12, 2019 at 15:40
1
Description
I wonder if the code I am showing can be considered as an example of policy-based design in Python. Also, I would like to know if have you seen python modules using something like this...
Classmate asked 5/8, 2019 at 19:46
1
This is a narrower version of the question put on hold due to being too broad.
On pages 6-7 of Modern C++ Design, Andrei Alexandrescu lists three ways in which the multiple inheritance is weaker ...
Nitrification asked 16/9, 2015 at 7:26
0
UPDATE: I have asked a narrower question here.
On pages 6-7 of Modern C++ Design, Andrei Alexandrescu gives a very fundamental discussion of the strengths and weaknesses of two C++ language ...
Kaki asked 13/9, 2015 at 12:18
1
Solved
I was very impressed by the policy based design described in Modern C++ Design by Andrei Alexandrescu and tried it successfully in some light weight programs. Now I have to write a real world...
Recount asked 23/10, 2014 at 16:41
2
Solved
Consider a policy-based smart pointer class Ptr with only one policy that will prevent dereferencing it in a NULL state (somehow). Let's consider 2 policies of this kind:
NotNull
NoChecking
Sin...
Amends asked 27/8, 2014 at 10:36
2
Solved
and Merry Christmas everybody!
I am learning about static polymorphism and I'm reading Andrei Alexandrescu's excellent book on policy-based design. I came across the following, in my code: I have ...
Ramsey asked 25/12, 2013 at 9:25
2
Solved
I spend some time with redesigning a logger class I did once into a policy based approach after reading an article about policy based design and wanting to try something myself.
Some code:
...
Isooctane asked 29/11, 2013 at 0:29
4
struct InkPen
{
void Write()
{
this->WriteImplementation();
}
void WriteImplementation()
{
std::cout << "Writing using a inkpen" << std::endl;
}
};
struct BoldPen
{
void ...
Nagpur asked 16/5, 2009 at 15:52
1
Solved
I have a set of homogeneous policy classes that I want to pass as policies to a template class, PolicyDrivenClass, which takes some unknown number of policy template parameters.
Each policy implem...
Bourse asked 7/6, 2012 at 12:59
5
Solved
I am building a matrix library and I am trying to use the policy-based design.
So my base classes are classes that provide a storage method and some
access functions.
I also have a function matrix ...
Barrybarrymore asked 26/5, 2011 at 21:21
2
Solved
I read about typelists in 'Modern C++ Design' and I understood it as some kind of union for types. By putting diffrent, non-related types in a typelist, one can use it to represent more than one ty...
Lightman asked 23/5, 2009 at 16:50
1
© 2022 - 2024 — McMap. All rights reserved.