Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/19/07 16:52
Read: times


 
#141037 - Make it ugly. :)
Responding to: ???'s previous message
With this setup, a typical method call looks like GetChar(PUMP_UART), rather than pumpUart.GetChar() like you might see in a language with direct OOP support.

If you put some function pointers in your CUartInfo structure, you might even be able to use a call like
uart01.GetChar();


in regular C. Since this pointer can also point to other functions, you might even be able to emulate inheritance. ;)

List of 10 messages in thread
TopicAuthorDate
Object Oriented Programming in C            01/01/70 00:00      
   Make it ugly. :)            01/01/70 00:00      
      Ugly and scary!!!            01/01/70 00:00      
   Logical approach            01/01/70 00:00      
      Wasn\\\'t Natural For Me            01/01/70 00:00      
         Nice post Russ.            01/01/70 00:00      
         Agree 100%            01/01/70 00:00      
         OOP in C            01/01/70 00:00      
   more OO in C            01/01/70 00:00      
      All good hints, for sure            01/01/70 00:00      

Back to Subject List