Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralModeless Propertysheet Pin
lisoft21-Dec-04 18:01
lisoft21-Dec-04 18:01 
GeneralCrystal reports 8.5 and 10.0 Pin
Rahim Rattani21-Dec-04 17:47
Rahim Rattani21-Dec-04 17:47 
GeneralRe: Crystal reports 8.5 and 10.0 Pin
naren-vc22-Dec-04 0:07
naren-vc22-Dec-04 0:07 
Generalneed help with custom drawn ListCtrl Pin
vijayaramaraju21-Dec-04 16:47
vijayaramaraju21-Dec-04 16:47 
Questioncan anybody provide a solution! Pin
LiYS21-Dec-04 16:29
LiYS21-Dec-04 16:29 
AnswerRe: can anybody provide a solution! Pin
David Crow22-Dec-04 3:35
David Crow22-Dec-04 3:35 
QuestionHow can save a drawing? Pin
phanduchuynh21-Dec-04 16:14
phanduchuynh21-Dec-04 16:14 
Generalapply not1 to predicates Pin
RickyO21-Dec-04 14:10
RickyO21-Dec-04 14:10 
Hi there,

It's been years since I done serious C++ programming and I am rusty on STL and templates and I need a quick solution for the following issue:

I need to define some kind of policies based on user input, for instance:
- some processes should handle requests that start with letter 'A' - say
this is policy_1 (and is derived from unary_function<string, bool=""> ?!)
- the reminder of the processes should handle all the other requests -say
this is policy_2, which is the negation of policy_1-

The processes are stored in a vector, each process object has a reference
to its policy

References/pointers to policies are stored in a vector (so policy_1 and policy_2 have to be siblings from a common base class: unary_function<string, bool=""> ?!)

When a request is fired I need to:
- find appropriate policy in the policies vector
- in the processes vector find the least loaded process among those
which have a reference to the policy found in the previous step

So the question is how do I create a stand alone policy object that is the negation of policy_1 ?

Thanks,
Rick.
GeneralKernel mode programming W2k Pin
AhmedOsamaMoh21-Dec-04 11:24
AhmedOsamaMoh21-Dec-04 11:24 
GeneralRe: Kernel mode programming W2k Pin
naren-vc21-Dec-04 21:27
naren-vc21-Dec-04 21:27 
GeneralRe: Kernel mode programming W2k Pin
Henry miller22-Dec-04 3:29
Henry miller22-Dec-04 3:29 
GeneralID_FILE_OPEN message Pin
bitpusher21-Dec-04 10:52
bitpusher21-Dec-04 10:52 
GeneralCrashes on Windows 98... Pin
herbert_chow21-Dec-04 10:44
herbert_chow21-Dec-04 10:44 
GeneralRe: Crashes on Windows 98... Pin
Michael Dunn21-Dec-04 14:37
sitebuilderMichael Dunn21-Dec-04 14:37 
GeneralRe: Crashes on Windows 98... Pin
herbert_chow21-Dec-04 15:35
herbert_chow21-Dec-04 15:35 
GeneralCut &amp; paste in FormView - pls help Pin
h.lee21-Dec-04 9:19
h.lee21-Dec-04 9:19 
GeneralRe: Cut &amp; paste in FormView - pls help Pin
BlackDice21-Dec-04 11:05
BlackDice21-Dec-04 11:05 
GeneralRe: Cut &amp; paste in FormView - pls help Pin
h.lee21-Dec-04 13:51
h.lee21-Dec-04 13:51 
GeneralRe: Cut &amp; paste in FormView - pls help Pin
BlackDice22-Dec-04 2:47
BlackDice22-Dec-04 2:47 
GeneralRe: Cut &amp; paste in FormView - pls help Pin
h.lee22-Dec-04 5:08
h.lee22-Dec-04 5:08 
QuestionDrawDragRect color inverse? Pin
Anonymous21-Dec-04 9:12
Anonymous21-Dec-04 9:12 
GeneralCompiler does not update changed parameters Pin
21-Dec-04 6:38
suss21-Dec-04 6:38 
GeneralZoom Excel Sheet with C++ and MFC application Pin
Anonymous21-Dec-04 6:16
Anonymous21-Dec-04 6:16 
GeneralProving that CPU is &quot;overloaded&quot; Pin
Brad Bruce21-Dec-04 4:46
Brad Bruce21-Dec-04 4:46 
GeneralRe: Proving that CPU is &quot;overloaded&quot; Pin
David Crow21-Dec-04 8:14
David Crow21-Dec-04 8:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.