Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1) Type casting is to tell the compiler that the object to the right side of <code>=</code> is a type of object which is on the left side of <code>=</code>. So there is no initialization taking place here. We are not creating a new object, simply <strong>type casting</strong> it by which compiler assumes that the object belong to that class.</p> <p>2)Following is the definition of <code>CCPointObject</code> class</p> <pre><code>class CCPointObject : CCObject { CC_SYNTHESIZE(CCPoint, m_tRatio, Ratio) CC_SYNTHESIZE(CCPoint, m_tOffset, Offset) CC_SYNTHESIZE(CCNode *,m_pChild, Child) // weak ref static CCPointObject * pointWithCCPoint(CCPoint ratio, CCPoint offset) { CCPointObject *pRet = new CCPointObject(); pRet-&gt;initWithCCPoint(ratio, offset); pRet-&gt;autorelease(); return pRet; } bool initWithCCPoint(CCPoint ratio, CCPoint offset) { m_tRatio = ratio; m_tOffset = offset; m_pChild = NULL; return true; } }; </code></pre> <p>Dont know exactly where did you put the log but. <code>setOffset</code> and <code>getOffset</code> are defined implicitly inside the macro <code>CC_SYNTHESIZE</code>. No doubt these will be called, otherwise the complier raises an error or the app will crash during runtime. </p> <p>3)<code>CC_SYNTHESIZE(struct _ccArray *, m_pParallaxArray, ParallaxArray)</code> Here <code>m_pParallaxArray</code> is used to store <code>CCPointObject</code>, where each <code>CCPointObject</code> holds information of exactly one child of parallax node, i.e reference to the child itself <code>m_pChild</code> and <code>m_pChild</code> <code>m_tRatio</code></p> <p>You can see definition of <code>CCPointObject</code> class in <code>CCParallaxNodeExtras.cpp</code> and <code>CCParallaxNode.cpp</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload