> I'm under the impression that case statements could be viewed as poor design from a C++ context. That said, how would i get around the 'case' statements in the C code?

You may not be able to, and you probably shouldn't try without understanding where the bad design rap comes from.

The only switch statement design guideline I know is that you might be able to have simpler, cleaner code by using virtual functions.

For example, instead of:

switch (animal.type)
{
case CANARY:
animal.sing();
break;

case DOG:
animal.bark();
break;

case CAT:
animal.meow();
break;
}

you could have a base class animal with a virtual function speak(). Then you could have derived classes canary, dog, and cat that implement the speak function appropriately for their species, so instead of the switch statement, you can just code:

animal.speak();

and get appropriate behavior.

This transformation is not necessarily helpful in every situation where one might use a switch statement. From the information you have provided, it's not clear whether a design with inheritance and virtual functions would be an improvement in your application.

The template implementation has memcopy and into 'local' the contents received from a buffer and handled in a separate 'Store' function.

So now.. I have two asynchronous processes inside FOO. Lets suppose DoSomething is being run at 900Hz and DoSomeOtherThing is being interrupt driven. The question is there a potential problem with both accessing the same object and 'local' variable?

> The question is there a potential problem with both accessing the same object and 'local' variable?

Probably. But your question is not quite well-defined enough to give a definitive answer.

FOO is not defined in this question and it's not clear what you mean by "asynchronous processes inside FOO." Usually, an operating system can run multiple processes, and each process can have multiple threads. In your case, you might have multiple processes or threads sharing an object of class FOO. The techniques for sharing an object across processes are different from the techniques for sharing an object across threads. Either way, the functions to use are platform-dependent.