List Info

Thread: about dynamic_cast!




about dynamic_cast!
user name
2006-08-16 08:14:45
zhx.eric£¬ÄúºÃ£¡
 
¡¡¡¡Process() needs return a value???
 
======== 2006-08-16 12:20:45 ÄúÔÚÀ´ÐÅÖÐдµÀ£º ========
 

Hi,

         In TransactionState::process, every sip message will be done dynamic_cast, I think this would affect performance. Could we do this way, maybe not good, just for discussion.

         Class TransactionMessage¡¯

         {

         Public:

virtual void Process() = 0;

}

 

Class SipMessage

{

Public:

         Void Process() { TransactionState::process(*this);}

}

 

 

class TransactionState

{

Public:

         Static Void process(SipMessage &msg);

         Static Void Process(KeepAliveMessage &msg);

Static Void Process(ConnectionTerminated&; msg)

}

 

 

 

 

= = = = = = = = = = = = = = = = = = = = = =

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡

 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡fancy_xiao
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡astrocom.cn">fancy_xiaoastrocom.cn
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2006-08-16
 
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )