issue #171, add annotate for protected member variable

This commit is contained in:
Walzer 2010-09-29 04:03:21 +00:00
parent c8439ca79e
commit d93aae9133
16 changed files with 85 additions and 96 deletions

View File

@ -78,7 +78,7 @@ void* NSData::bytes(void)
return m_pData; return m_pData;
} }
///@todo implement //@todo implement
NSData* NSData::dataWithBytes(unsigned char *pBytes, int size) NSData* NSData::dataWithBytes(unsigned char *pBytes, int size)
{ {
return NULL; return NULL;

View File

@ -45,19 +45,19 @@ class CCX_DLL CCAtlasNode : public CCNode, public CCRGBAProtocol, public CCTextu
{ {
protected: protected:
// chars per row //! chars per row
int m_nItemsPerRow; int m_nItemsPerRow;
// chars per column //! chars per column
int m_nItemsPerColumn; int m_nItemsPerColumn;
// texture coordinate x increment //! texture coordinate x increment
float m_fTexStepX; float m_fTexStepX;
// texture coordinate y increment //! texture coordinate y increment
float m_fTexStepY; float m_fTexStepY;
// width of each char //! width of each char
int m_nItemWidth; int m_nItemWidth;
// height of each char //! height of each char
int m_nItemHeight; int m_nItemHeight;
ccColor3B m_tColorUnmodified; ccColor3B m_tColorUnmodified;
@ -91,10 +91,10 @@ public:
// CC Texture protocol // CC Texture protocol
// returns the used texture /** returns the used texture*/
virtual CCTexture2D* getTexture(void); virtual CCTexture2D* getTexture(void);
// sets a new texture. it will be retained /** sets a new texture. it will be retained*/
virtual void setTexture(CCTexture2D *texture); virtual void setTexture(CCTexture2D *texture);
private : private :

View File

@ -71,15 +71,15 @@ namespace cocos2d{
{ {
// XXX: Creating a public interface so that the bitmapFontArray[] is accesible // XXX: Creating a public interface so that the bitmapFontArray[] is accesible
public://@public public://@public
// The characters building up the font //! The characters building up the font
ccBitmapFontDef m_pBitmapFontArray[kCCBitmapFontAtlasMaxChars]; ccBitmapFontDef m_pBitmapFontArray[kCCBitmapFontAtlasMaxChars];
// FNTConfig: Common Height //! FNTConfig: Common Height
unsigned int m_uCommonHeight; unsigned int m_uCommonHeight;
// Padding //! Padding
ccBitmapFontPadding m_tPadding; ccBitmapFontPadding m_tPadding;
// atlas name //! atlas name
std::string m_sAtlasName; std::string m_sAtlasName;
// values for kerning //! values for kerning
struct _KerningHashElement *m_pKerningDictionary; struct _KerningHashElement *m_pKerningDictionary;
public: public:
CCBitmapFontConfiguration() CCBitmapFontConfiguration()

View File

@ -39,7 +39,7 @@ namespace cocos2d {
public: public:
CCInstantAction(); CCInstantAction();
virtual ~CCInstantAction(){} virtual ~CCInstantAction(){}
// CCAction method // CCAction methods
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
virtual bool isDone(void); virtual bool isDone(void);
virtual void step(ccTime dt); virtual void step(ccTime dt);
@ -55,7 +55,7 @@ namespace cocos2d {
public: public:
CCShow(){} CCShow(){}
virtual ~CCShow(){} virtual ~CCShow(){}
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void); virtual CCFiniteTimeAction * reverse(void);
public: public:
@ -71,7 +71,7 @@ namespace cocos2d {
public: public:
CCHide(){} CCHide(){}
virtual ~CCHide(){} virtual ~CCHide(){}
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void); virtual CCFiniteTimeAction * reverse(void);
public: public:
@ -105,7 +105,7 @@ namespace cocos2d {
static CCFlipX * actionWithFlipX(bool x); static CCFlipX * actionWithFlipX(bool x);
bool initWithFlipX(bool x); bool initWithFlipX(bool x);
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void); virtual CCFiniteTimeAction * reverse(void);
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
@ -126,7 +126,7 @@ namespace cocos2d {
static CCFlipY * actionWithFlipY(bool y); static CCFlipY * actionWithFlipY(bool y);
bool initWithFlipY(bool y); bool initWithFlipY(bool y);
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void); virtual CCFiniteTimeAction * reverse(void);
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
@ -146,7 +146,7 @@ namespace cocos2d {
static CCPlace * actionWithPosition(CGPoint pos); static CCPlace * actionWithPosition(CGPoint pos);
/** Initializes a Place action with a position */ /** Initializes a Place action with a position */
bool initWithPosition(CGPoint pos); bool initWithPosition(CGPoint pos);
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
protected: protected:
@ -172,7 +172,7 @@ namespace cocos2d {
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget); virtual bool initWithTarget(SelectorProtocol* pSelectorTarget);
/** exeuctes the callback */ /** exeuctes the callback */
virtual void execute(); virtual void execute();
//super method //super methods
virtual void startWithTarget(CCNode *pTarget); virtual void startWithTarget(CCNode *pTarget);
NSObject * copyWithZone(cocos2d::NSZone *pZone); NSObject * copyWithZone(cocos2d::NSZone *pZone);
@ -197,7 +197,7 @@ namespace cocos2d {
virtual ~CCCallFuncN(){} virtual ~CCCallFuncN(){}
static CCCallFuncN * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector); static CCCallFuncN * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector);
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector); virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector);
// super method // super methods
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
virtual void execute(); virtual void execute();
}; };
@ -215,7 +215,7 @@ namespace cocos2d {
static CCCallFuncND * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d); static CCCallFuncND * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d);
/** initializes the action with the callback and the data to pass as an argument */ /** initializes the action with the callback and the data to pass as an argument */
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d); virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d);
// super method // super methods
virtual NSObject* copyWithZone(NSZone *pZone); virtual NSObject* copyWithZone(NSZone *pZone);
virtual void execute(); virtual void execute();

View File

@ -209,13 +209,13 @@ protected:
private: private:
// lazy allocs //! lazy allocs
void childrenAlloc(void); void childrenAlloc(void);
// helper that reorder a child //! helper that reorder a child
void insertChild(CCNode* child, int z); void insertChild(CCNode* child, int z);
// used internally to alter the zOrder variable. DON'T call this method manually //! used internally to alter the zOrder variable. DON'T call this method manually
void setZOrder(int z); void setZOrder(int z);
void detachChild(CCNode *child, bool doCleanup); void detachChild(CCNode *child, bool doCleanup);

View File

@ -48,9 +48,9 @@ public:
virtual ~CCPVRTexture(); virtual ~CCPVRTexture();
CCPVRTexture * initWithContentsOfFile(const char* path); CCPVRTexture * initWithContentsOfFile(const char* path);
/// @todo CCPVRTexture * initWithContentsOfURL(NSURL *url); // @todo CCPVRTexture * initWithContentsOfURL(NSURL *url);
static CCPVRTexture * pvrTextureWithContentsOfFile(const char* path); static CCPVRTexture * pvrTextureWithContentsOfFile(const char* path);
/// @todo static CCPVRTexture * pvrTextureWithContentsOfURL(NSURL *url); // @todo static CCPVRTexture * pvrTextureWithContentsOfURL(NSURL *url);
CCX_PROPERTY_READONLY(GLuint, m_uName, Name) CCX_PROPERTY_READONLY(GLuint, m_uName, Name)
CCX_PROPERTY_READONLY(unsigned int, m_uWidth, Width) CCX_PROPERTY_READONLY(unsigned int, m_uWidth, Width)

View File

@ -95,14 +95,14 @@ namespace cocos2d {
ccTime timeToLive; ccTime timeToLive;
// Mode A: gravity, direction, radial accel, tangential accel //! Mode A: gravity, direction, radial accel, tangential accel
struct { struct {
CGPoint dir; CGPoint dir;
float radialAccel; float radialAccel;
float tangentialAccel; float tangentialAccel;
} modeA; } modeA;
// Mode B: radius mode //! Mode B: radius mode
struct { struct {
float angle; float angle;
float degreesPerSecond; float degreesPerSecond;
@ -163,54 +163,54 @@ namespace cocos2d {
{ {
protected: protected:
std::string m_sPlistFile; std::string m_sPlistFile;
// time elapsed since the start of the system (in seconds) //! time elapsed since the start of the system (in seconds)
float m_fElapsed; float m_fElapsed;
// Different modes // Different modes
// Mode A:Gravity + Tangential Accel + Radial Accel //! Mode A:Gravity + Tangential Accel + Radial Accel
struct { struct {
// gravity of the particles /** Gravity value. Only available in 'Gravity' mode. */
CGPoint gravity; CGPoint gravity;
// The speed the particles will have. /** speed of each particle. Only available in 'Gravity' mode. */
float speed; float speed;
// The speed variance /** speed variance of each particle. Only available in 'Gravity' mode. */
float speedVar; float speedVar;
// Tangential acceleration /** tangential acceleration of each particle. Only available in 'Gravity' mode. */
float tangentialAccel; float tangentialAccel;
// Tangential acceleration variance /** tangential acceleration variance of each particle. Only available in 'Gravity' mode. */
float tangentialAccelVar; float tangentialAccelVar;
// Radial acceleration /** radial acceleration of each particle. Only available in 'Gravity' mode. */
float radialAccel; float radialAccel;
// Radial acceleration variance /** radial acceleration variance of each particle. Only available in 'Gravity' mode. */
float radialAccelVar; float radialAccelVar;
} modeA; } modeA;
// Mode B: circular movement (gravity, radial accel and tangential accel don't are not used in this mode) //! Mode B: circular movement (gravity, radial accel and tangential accel don't are not used in this mode)
struct { struct {
// The starting radius of the particles /** The starting radius of the particles. Only available in 'Radius' mode. */
float startRadius; float startRadius;
// The starting radius variance of the particles /** The starting radius variance of the particles. Only available in 'Radius' mode. */
float startRadiusVar; float startRadiusVar;
// The ending radius of the particles /** The ending radius of the particles. Only available in 'Radius' mode. */
float endRadius; float endRadius;
// The ending radius variance of the particles /** The ending radius variance of the particles. Only available in 'Radius' mode. */
float endRadiusVar; float endRadiusVar;
// Number of degress to rotate a particle around the source pos per second /** Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode. */
float rotatePerSecond; float rotatePerSecond;
// Variance in degrees for rotatePerSecond /** Variance in degrees for rotatePerSecond. Only available in 'Radius' mode. */
float rotatePerSecondVar; float rotatePerSecondVar;
} modeB; } modeB;
// Array of particles //! Array of particles
tCCParticle *m_pParticles; tCCParticle *m_pParticles;
// color modulate // color modulate
// BOOL colorModulate; // BOOL colorModulate;
// How many particles can be emitted per second //! How many particles can be emitted per second
float m_fEmitCounter; float m_fEmitCounter;
// particle idx //! particle idx
int m_nParticleIdx; int m_nParticleIdx;
// Optimization // Optimization
@ -244,44 +244,31 @@ namespace cocos2d {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
public: public:
// mode A // mode A
/** Gravity value. Only available in 'Gravity' mode. */
virtual CGPoint getGravity(); virtual CGPoint getGravity();
virtual void setGravity(CGPoint g); virtual void setGravity(CGPoint g);
/** speed of each particle. Only available in 'Gravity' mode. */
virtual float getSpeed(); virtual float getSpeed();
virtual void setSpeed(float speed); virtual void setSpeed(float speed);
/** speed variance of each particle. Only available in 'Gravity' mode. */
virtual float getSpeedVar(); virtual float getSpeedVar();
virtual void setSpeedVar(float speed); virtual void setSpeedVar(float speed);
/** tangential acceleration of each particle. Only available in 'Gravity' mode. */
virtual float getTangentialAccel(); virtual float getTangentialAccel();
virtual void setTangentialAccel(float t); virtual void setTangentialAccel(float t);
/** tangential acceleration variance of each particle. Only available in 'Gravity' mode. */
virtual float getTangentialAccelVar(); virtual float getTangentialAccelVar();
virtual void setTangentialAccelVar(float t); virtual void setTangentialAccelVar(float t);
/** radial acceleration of each particle. Only available in 'Gravity' mode. */
virtual float getRadialAccel(); virtual float getRadialAccel();
virtual void setRadialAccel(float t); virtual void setRadialAccel(float t);
/** radial acceleration variance of each particle. Only available in 'Gravity' mode. */
virtual float getRadialAccelVar(); virtual float getRadialAccelVar();
virtual void setRadialAccelVar(float t); virtual void setRadialAccelVar(float t);
// mode B // mode B
/** The starting radius of the particles. Only available in 'Radius' mode. */
virtual float getStartRadius(); virtual float getStartRadius();
virtual void setStartRadius(float startRadius); virtual void setStartRadius(float startRadius);
/** The starting radius variance of the particles. Only available in 'Radius' mode. */
virtual float getStartRadiusVar(); virtual float getStartRadiusVar();
virtual void setStartRadiusVar(float startRadiusVar); virtual void setStartRadiusVar(float startRadiusVar);
/** The ending radius of the particles. Only available in 'Radius' mode. */
virtual float getEndRadius(); virtual float getEndRadius();
virtual void setEndRadius(float endRadius); virtual void setEndRadius(float endRadius);
/** The ending radius variance of the particles. Only available in 'Radius' mode. */
virtual float getEndRadiusVar(); virtual float getEndRadiusVar();
virtual void setEndRadiusVar(float endRadiusVar); virtual void setEndRadiusVar(float endRadiusVar);
/** Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode. */
virtual float getRotatePerSecond(); virtual float getRotatePerSecond();
virtual void setRotatePerSecond(float degrees); virtual void setRotatePerSecond(float degrees);
/** Variance in degrees for rotatePerSecond. Only available in 'Radius' mode. */
virtual float getRotatePerSecondVar(); virtual float getRotatePerSecondVar();
virtual void setRotatePerSecondVar(float degrees); virtual void setRotatePerSecondVar(float degrees);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View File

@ -61,9 +61,9 @@ namespace cocos2d {
virtual void setStartSize(float var); virtual void setStartSize(float var);
virtual void setEndSize(float var); virtual void setEndSize(float var);
protected: protected:
// Array of (x,y,size) //! Array of (x,y,size)
ccPointSprite *m_pVertices; ccPointSprite *m_pVertices;
// vertices buffer id //! vertices buffer id
GLuint m_uVerticesID; GLuint m_uVerticesID;
}; };

View File

@ -55,10 +55,10 @@ namespace cocos2d {
,m_pIndices(NULL) ,m_pIndices(NULL)
{} {}
virtual ~CCQuadParticleSystem(); virtual ~CCQuadParticleSystem();
// initialices the indices for the vertices /** initialices the indices for the vertices*/
void initIndices(); void initIndices();
// initilizes the text coords /** initilizes the text coords*/
void initTexCoordsWithRect(CGRect rect); void initTexCoordsWithRect(CGRect rect);
/** Sets a new CCSpriteFrame as particle. /** Sets a new CCSpriteFrame as particle.

View File

@ -29,9 +29,9 @@ THE SOFTWARE.
namespace cocos2d { namespace cocos2d {
/// /**
// @brief A counter colock-wise radial transition to the next scene @brief A counter colock-wise radial transition to the next scene
/// */
class CCX_DLL CCRadialCCWTransition : public CCTransitionScene class CCX_DLL CCRadialCCWTransition : public CCTransitionScene
{ {
public: public:
@ -48,9 +48,9 @@ protected:
virtual CCProgressTimerType radialType(); virtual CCProgressTimerType radialType();
}; };
/// /**
// @brief A counter colock-wise radial transition to the next scene @brief A counter colock-wise radial transition to the next scene
/// */
class CCX_DLL CCRadialCWTransition : public CCRadialCCWTransition class CCX_DLL CCRadialCWTransition : public CCRadialCCWTransition
{ {
public: public:

View File

@ -149,20 +149,20 @@ namespace cocos2d {
unsigned int atlasIndexForExistantZ(unsigned int z); unsigned int atlasIndexForExistantZ(unsigned int z);
unsigned int atlasIndexForNewZ(int z); unsigned int atlasIndexForNewZ(int z);
protected: protected:
// name of the layer //! name of the layer
std::string m_sLayerName; std::string m_sLayerName;
// TMX Layer supports opacity //! TMX Layer supports opacity
unsigned char m_cOpacity; unsigned char m_cOpacity;
unsigned int m_uMinGID; unsigned int m_uMinGID;
unsigned int m_uMaxGID; unsigned int m_uMaxGID;
// Only used when vertexZ is used //! Only used when vertexZ is used
int m_nVertexZvalue; int m_nVertexZvalue;
bool m_bUseAutomaticVertexZ; bool m_bUseAutomaticVertexZ;
float m_fAlphaFuncValue; float m_fAlphaFuncValue;
// used for optimization //! used for optimization
CCSprite *m_pReusedTile; CCSprite *m_pReusedTile;
_ccCArray *m_pAtlasIndexArray; _ccCArray *m_pAtlasIndexArray;
}; };

View File

@ -143,7 +143,7 @@ namespace cocos2d {
CCTMXTilesetInfo * tilesetForLayer(CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); CCTMXTilesetInfo * tilesetForLayer(CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
protected: protected:
// tile properties //! tile properties
NSDictionary<int, CCXStringToStringDictionary*> *m_pTileProperties; NSDictionary<int, CCXStringToStringDictionary*> *m_pTileProperties;
}; };

View File

@ -96,9 +96,9 @@ namespace cocos2d {
CGSize m_tTileSize; CGSize m_tTileSize;
unsigned int m_uSpacing; unsigned int m_uSpacing;
unsigned int m_uMargin; unsigned int m_uMargin;
// filename containing the tiles (should be spritesheet / texture atlas) //! filename containing the tiles (should be spritesheet / texture atlas)
std::string m_sSourceImage; std::string m_sSourceImage;
// size in pixels of the image //! size in pixels of the image
CGSize m_tImageSize; CGSize m_tImageSize;
public: public:
CCTMXTilesetInfo(); CCTMXTilesetInfo();
@ -163,11 +163,11 @@ namespace cocos2d {
inline void setTMXFileName(const char *fileName){ m_sTMXFileName = fileName; } inline void setTMXFileName(const char *fileName){ m_sTMXFileName = fileName; }
protected: protected:
// tmx filename //! tmx filename
std::string m_sTMXFileName; std::string m_sTMXFileName;
// current string //! current string
std::string m_sCurrentString; std::string m_sCurrentString;
// tile properties //! tile properties
NSDictionary<int, CCXStringToStringDictionary*>* m_pTileProperties; NSDictionary<int, CCXStringToStringDictionary*>* m_pTileProperties;
}; };

View File

@ -78,9 +78,9 @@ namespace cocos2d {
void updateAtlasValues(); void updateAtlasValues();
protected: protected:
// x,y to altas dicctionary //! x,y to altas dicctionary
StringToIntegerDictionary *m_pPosToAtlasIndex; StringToIntegerDictionary *m_pPosToAtlasIndex;
// numbers of tiles to render //! numbers of tiles to render
int m_nItemsToRender; int m_nItemsToRender;
}; };

View File

@ -47,9 +47,9 @@ protected:
public: public:
inline ccTouchDelegateFlag getTouchDelegateType(void) { return m_eTouchDelegateType; } inline ccTouchDelegateFlag getTouchDelegateType(void) { return m_eTouchDelegateType; }
// call the release() in child(layer or menu) //! call the release() in child(layer or menu)
virtual void destroy(void) {} virtual void destroy(void) {}
// call the retain() in child (layer or menu) //! call the retain() in child (layer or menu)
virtual void keep(void) {} virtual void keep(void) {}
virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;}; virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;};
@ -70,8 +70,9 @@ class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate
{ {
public: public:
CCTargetedTouchDelegate() { m_eTouchDelegateType = ccTouchDelegateTargetedBit; } CCTargetedTouchDelegate() { m_eTouchDelegateType = ccTouchDelegateTargetedBit; }
// Return YES to claim the touch. /** Return YES to claim the touch.
// @since v0 @since v0
*/
virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;}; virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;};
// optional // optional
@ -80,9 +81,10 @@ class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate
virtual void ccTouchCancelled(CCTouch *pTouch, UIEvent *pEvent) {} virtual void ccTouchCancelled(CCTouch *pTouch, UIEvent *pEvent) {}
}; };
// @brief CCStandardTouchDelegate. /** @brief CCStandardTouchDelegate.
// This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Cancelled). This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Cancelled).
// @since v0.8 @since v0.8
*/
class CCX_DLL CCStandardTouchDelegate : public CCTouchDelegate class CCX_DLL CCStandardTouchDelegate : public CCTouchDelegate
{ {
public: public:

View File

@ -52,7 +52,7 @@ public:
/** /**
@brief Generate a NSDictionary pointer by file @brief Generate a NSDictionary pointer by file
@param pFileName The file name @param pFileName The file name of *.plist file
@return The NSDictionary pointer generated from the file @return The NSDictionary pointer generated from the file
*/ */
static NSDictionary<std::string, NSObject*> *dictionaryWithContentsOfFile(const char *pFileName); static NSDictionary<std::string, NSObject*> *dictionaryWithContentsOfFile(const char *pFileName);