| This is a smart pointer, in which operators (), -> are overloaded. Here is an article on smart pointers: "Smart Pointers - What, Why, Which?"
 http://ootips.org/yonat/4dev/smart-pointers.html
 
 Liqun
 
 
 On 8/7/07, Mike Marty <mikem@xxxxxxxxxxx> wrote:
I think this is just C++ magic where calling enqueue() with a sub-classof 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.
 >
 >
 
 _______________________________________________
 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.
 
 
 
 |