24 Jan
2008
24 Jan
'08
8:22 p.m.
Hi, I have a singleton class called InputRegistry. Before the class is used, the user must call: InputRegistry::Initialize(); I would like this function to take a parameter that defines the type of a critical section object, which is unknown at compile time (template). I need to store this type in my InputRegistry class so that the unknown critical section type can be constructed later. How can I do this without making InputRegistry a template class? If I make InputRegistry a template, that basically means I need to redesign the class, as the singleton pattern would not apply if it were a template class. I'm hoping boost can help here. Thanks in advance.