<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
DIV.FoxDiv20130217122156531947 {
        WORD-WRAP: break-word; COLOR: #000000; -WEBKIT-NBSP-MODE: SPACE; -WEBKIT-LINE-BREAK: AFTER-WHITE-SPACE
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: 微软雅黑; COLOR: #000080; FONT-SIZE: 10.5pt
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.7601.17874"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Hi, Alex</DIV>
<DIV>You are right, I didn't extend the helper (ndn::StackHelper) and use a new 
instance of ObjectFactory to create an instance of CA class by name. Thanks a 
lot!!!</DIV>
<DIV> </DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>

<DIV><SPAN>aaronishere</SPAN></DIV>
<DIV> </DIV>
<DIV 
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<DIV 
style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; COLOR: #000000; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV><B>发件人:</B> <A href="mailto:alexander.afanasyev@ucla.edu">Alex 
Afanasyev</A></DIV>
<DIV><B>发送时间:</B> 2013-02-17 11:41</DIV>
<DIV><B>收件人:</B> <A href="mailto:aaronishere@qq.com">aaronishere</A></DIV>
<DIV><B>抄送:</B> <A href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim</A></DIV>
<DIV><B>主题:</B> Re: [ndnSIM] question for the function 
Lookup</DIV></DIV></DIV>
<DIV>
<DIV class=FoxDiv20130217122156531947><BASE href="x-msg://2295/">
<DIV>Hi Aaron,</DIV>
<DIV><BR></DIV>
<DIV>How do you create your CA class?  Did you extend the helper 
(ndn::StackHelper) and use a new instance of ObjectFactory to create an instance 
of CA class by name?  And related question, did you assign a unique name in 
GetTypeId () function of your CA class?   Did you call AggregateObject 
method in Install method of ndn::StackHelper class?</DIV>
<DIV><BR></DIV>
<DIV>I'm assuming that you're getting a segfault while calling Lookup.  If 
so, most likely your m_ca is simply not initialized.  And most likely, this 
could happen if you created an object, but didn't call AggregateObject 
method (this way GetObject<CA> () would return 0).</DIV>
<DIV><BR></DIV>
<DIV>---</DIV>
<DIV>Alex</DIV><BR>
<DIV>
<DIV>On Feb 16, 2013, at 6:54 PM, aaronishere <<A 
href="mailto:aaronishere@qq.com">aaronishere@qq.com</A>> wrote:</DIV><BR 
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
  <DIV 
  style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; MARGIN: 10px; FONT: medium/1.5 微软雅黑; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,128); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">
  <DIV>Hi, Alex</DIV>
  <DIV>In pit/fib.h, the function Lookup() is a pure virtual funtion and the 
  concrete one is defined in the fib-impl/pit-impl. I'm not sure how the Lookup 
  in the fib/pit jumps to the one in the fib-impl/pit-impl?  I defined a 
  pointer m_ca in the forwardingstrategy like m_pit,  but when executes 
  Ptr<ca::Entry>m_ca->Lookup(), it doesn't jump to the function Lookup 
  in the ca-impl.  Thanks a lot!</DIV>
  <DIV> </DIV>
  <HR style="WIDTH: 210px; HEIGHT: 1px" align=left SIZE=1>

  <DIV><SPAN>Aaron</SPAN></DIV></DIV></BLOCKQUOTE></DIV></DIV></DIV></BODY></HTML>