6 Topics

Member Avatar for
Member Avatar for Elixir42

Hi, The problem I am having is that the returned object, from a dll factory, is not lasting for more than the function scope that recieves it. Despite reading [How to prevent the static initialisation order fiasco](http://www.parashift.com/c++-faq/static-init-order-on-first-use.html) I fail to see how it even applies to my code. `g_spEngineLog` is …

Member Avatar for Banfa
0
279
Member Avatar for Labdabeta

Hello, I am working on an event driven library and am having one minor problem. Basically I have two ways to get what I want done. Method 1: Smart pointers and factory functions #include <iostream> #include <vector> #include <memory> using namespace std; class Object { public: virtual int getInt(){return 0;} …

Member Avatar for Labdabeta
0
257
Member Avatar for ktsangop

Hello everyone, I would like to use HP's system recovery (F11 on boot menu, not the windows application) to revert my laptop to its factory state. The thing is that i have created a disk partition to keep my data which wasn't present by default. Will the recovery delete my …

Member Avatar for TAMILSELVANBABU
0
1K
Member Avatar for solomon_13000

I found some reading materials about factory design pattern (parallel hierarchy) whereby a class in a hierarchy has a corresponding class in the another hierarchy. So I wrote the code as below: package com.factory3; public abstract class Subject { abstract SubjectPlanner createPlanner(); } package com.factory3; public class English extends Subject{ …

0
154
Member Avatar for solomon_13000

I wrote a code to represent the factory design pattern as below: package com.factory2; public interface CreditCheck { Double creditLimit(int id); } package com.factory2; public class CreditCheckFactory { public boolean isAgencyUp(){ return true; } public CreditCheck createCreditCheck(){ if(isAgencyUp()){ return new CreditCheckOnline(); }else{ return new CreditCheckOffline(); } } } package com.factory2; …

Member Avatar for JamesCherrill
0
280
Member Avatar for anish.anick

Hi All, I have a factory which has some concrete sub classes for generating reports (.txt, .csv,.xls) I want to make the interface of the concrete classes to be generic so that i can pass in diff types of parameters (Instead of DataTable i need to use DataSet or some …

Member Avatar for Momerath
0
214

The End.