Re: [Gems-users] MessageBuffer enqueue method


Date: Tue, 07 Aug 2007 10:20:22 -0500
From: Mike Marty <mikem@xxxxxxxxxxx>
Subject: Re: [Gems-users] MessageBuffer enqueue method
I think this is just C++ magic where calling enqueue() with a sub-class of class Message will just invoke the RefCnt(TYPE) constructor.

Other C++ experts can correct me or elaborate.

--Mike


selcuk koyuncu wrote:
hi everybody,
  i ve got  a question about MessageBuffers enqueue method and how it is called from Sequencers.
  "MessageBuffer::enqueue(const MsgPtr &msg, ....)"   this method needs an address of MsgPtr type as the first parameter from where we call it,
but in Sequencer.C file its been called with "msg" variable which is a "CacheMsg" object, instead of a "MsgPtr" object. (CacheMsg msg; ......... >> m_L1Cache_mandatoryQueue_vec[version].enqueue(msg,...)); CacheMsg is derived from "class Message" and MsgPtr ("typedef RefCnt<Message> MsgPtr" ) uses "Message" as a template,
how this could be possiable to call enqueue method with a CacheMsg object, what do i miss, i think, even a key word can help for figure it out.
  garcias,


--------------------------------- Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. ------------------------------------------------------------------------

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.


[← Prev in Thread] Current Thread [Next in Thread→]