FlashSprite Class Reference

Contains the necessary data to generate a sprite object within a Flash file. More...

#include <swfsprit.h>

Inheritance diagram for FlashSprite:

CCObject SimpleCCObject List of all members.

Public Member Functions

 FlashSprite ()
 Default constructor. Ensure that all the variables are set to values that won't cause problems.
 ~FlashSprite ()
 Default destructor.
FlashSpriteGetNext (void)
 Gets a pointer to the next item in the list.
void SetNext (FlashSprite *pNext)
 Sets mpNext (the pointer to the next item in the list) to the FlashSprite pointed to by pNext.
FlashSpriteAddNext (void)
 Creates a new item, adds it to the list after this node, and returns a pointer to this item.
void SetID (WORD ID)
 Sets mID.
WORD GetID (void)
 Returns the ID of the object to be placed.
void SetName (const TCHAR *pName)
 Sets mName.
TCHARGetName (void)
 Returns the name of the button.
void SetLayer (LayerState Layer)
 Sets mLayer.
LayerState GetLayer (void)
 Returns the LayerState of the button.
BOOL IsAMatch (const TCHAR *pName, LayerState State)
 If the state and name values match, then the object data which these were related to forms part of this button record, and thus should be incorporated into it.
void SetPlace (FlashPlaceObject *pPlace)
 Sets mpPlace, which is the head of a linked list of FlashPlaceObject records.
void SetTail (FlashPlaceObject *pPlace)
 Sets the value of PlaceTail to be pPlace, so that the list of objects can be extended.
FlashPlaceObjectGetPlace (void)
 Gets a pointer to the head of a FlashPlaceObject list.

Private Attributes

WORD mID
String_256 mName
LayerState mLayer
FlashSpritempNext
FlashPlaceObjectmpPlace
FlashPlaceObjectmpPlaceTail

Detailed Description

Contains the necessary data to generate a sprite object within a Flash file.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99

Definition at line 115 of file swfsprit.h.


Constructor & Destructor Documentation

FlashSprite::FlashSprite void   ) 
 

Default constructor. Ensure that all the variables are set to values that won't cause problems.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 116 of file swfsprit.cpp.

00117 {
00118     // Generate initial settings.
00119     mpNext = NULL;
00120     mpPlace = NULL;
00121     mpPlaceTail = NULL;
00122     mID = 0;
00123     mLayer = NO_BUTTON;
00124     mName.Empty ();
00125 }

FlashSprite::~FlashSprite  ) 
 

Default destructor.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 139 of file swfsprit.cpp.

00140 {
00141     // Delete the list of FlashPlaceObject records.
00142     while ( mpPlace != NULL )
00143     {
00144         FlashPlaceObject *pLast = mpPlace;
00145         mpPlace = mpPlace->GetNext ();
00146         delete pLast;
00147     }
00148 
00149     // Reset the other pointers.
00150     mpPlaceTail = NULL;
00151     mpNext = NULL;
00152 }


Member Function Documentation

FlashSprite * FlashSprite::AddNext void   ) 
 

Creates a new item, adds it to the list after this node, and returns a pointer to this item.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
A pointer to the next item in the list.

Definition at line 202 of file swfsprit.cpp.

00203 {
00204     // Do a recursive call: If there is a next object, call the AddNext function within this,
00205     // and attempt to create the new object there.
00206     if ( mpNext != NULL )
00207     {
00208         return mpNext->AddNext ();
00209     }
00210     else
00211     {
00212         mpNext = new FlashSprite;
00213         return mpNext;
00214     }
00215 }

WORD FlashSprite::GetID void   ) 
 

Returns the ID of the object to be placed.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
The ID number of the current record.

Definition at line 246 of file swfsprit.cpp.

00247 {
00248     return mID;
00249 }

LayerState FlashSprite::GetLayer void   ) 
 

Returns the LayerState of the button.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
- [INPUTS]
Returns:
mLayer - The named layer on which the button is placed.

Definition at line 314 of file swfsprit.cpp.

00315 {
00316     return mLayer;
00317 }

TCHAR * FlashSprite::GetName void   ) 
 

Returns the name of the button.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
- [INPUTS]
Returns:
A pointer to the contents of the record's name.

Definition at line 280 of file swfsprit.cpp.

00281 {
00282     return ( TCHAR* ) mName;
00283 }

FlashSprite * FlashSprite::GetNext void   ) 
 

Gets a pointer to the next item in the list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
A pointer to the next item in the list.

Definition at line 166 of file swfsprit.cpp.

00167 {
00168     return mpNext;
00169 }

FlashPlaceObject * FlashSprite::GetPlace void   ) 
 

Gets a pointer to the head of a FlashPlaceObject list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
mpPlace - A pointer to a FlashPlaceObject.

Definition at line 355 of file swfsprit.cpp.

00356 {
00357     return mpPlace;
00358 }

BOOL FlashSprite::IsAMatch const TCHAR pName,
LayerState  State
 

If the state and name values match, then the object data which these were related to forms part of this button record, and thus should be incorporated into it.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
- [INPUTS]
Returns:
TRUE if a match, FALSE otherwise.

Definition at line 334 of file swfsprit.cpp.

00336 {
00337     if ( mName.IsIdentical ( pName ) && State == mLayer )
00338         return TRUE;
00339     else
00340         return FALSE;
00341 }

void FlashSprite::SetID WORD  ID  ) 
 

Sets mID.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
WORD ID - The ID value shape to be displayed. [INPUTS]
Returns:
-

Definition at line 229 of file swfsprit.cpp.

00230 {
00231     mID = ID;
00232 }

void FlashSprite::SetLayer LayerState  Layer  ) 
 

Sets mLayer.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
LayerState Layer - An enumerated type containing the state of the layer. [INPUTS]
Returns:
-

Definition at line 297 of file swfsprit.cpp.

00298 {
00299     mLayer = Layer;
00300 }

void FlashSprite::SetName const TCHAR pName  ) 
 

Sets mName.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
TCHAR *pName - A pointer to a string containing a button's name. [INPUTS]
Returns:
-

Definition at line 263 of file swfsprit.cpp.

00264 {
00265     mName = pName;
00266 }

void FlashSprite::SetNext FlashSprite pNext  ) 
 

Sets mpNext (the pointer to the next item in the list) to the FlashSprite pointed to by pNext.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
pNext - A pointer to a FlashSprite. [INPUTS]
Returns:
void

Definition at line 184 of file swfsprit.cpp.

00185 {
00186     mpNext = pNext;
00187 }

void FlashSprite::SetPlace FlashPlaceObject pPlace  ) 
 

Sets mpPlace, which is the head of a linked list of FlashPlaceObject records.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
pPlace - A pointer to a FlashPlaceObject. [INPUTS]
Returns:
-

Definition at line 373 of file swfsprit.cpp.

00374 {
00375     mpPlaceTail = mpPlace = pPlace;
00376 }

void FlashSprite::SetTail FlashPlaceObject pPlace  ) 
 

Sets the value of PlaceTail to be pPlace, so that the list of objects can be extended.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/1/00
Parameters:
pPlace - A pointer to a FlashPlaceObject. [INPUTS]
Returns:
-

Definition at line 391 of file swfsprit.cpp.

00392 {
00393     // Check to see whether or not there is a pointer first. If not, create a new record.
00394     if ( mpPlaceTail != NULL )
00395     {
00396         mpPlaceTail->SetNext ( pPlace );
00397         mpPlaceTail = pPlace;
00398     }
00399     else
00400         SetPlace ( pPlace );
00401 }


Member Data Documentation

WORD FlashSprite::mID [private]
 

Definition at line 143 of file swfsprit.h.

LayerState FlashSprite::mLayer [private]
 

Definition at line 145 of file swfsprit.h.

String_256 FlashSprite::mName [private]
 

Definition at line 144 of file swfsprit.h.

FlashSprite* FlashSprite::mpNext [private]
 

Definition at line 146 of file swfsprit.h.

FlashPlaceObject* FlashSprite::mpPlace [private]
 

Definition at line 147 of file swfsprit.h.

FlashPlaceObject* FlashSprite::mpPlaceTail [private]
 

Definition at line 148 of file swfsprit.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:26 2007 for Camelot by  doxygen 1.4.4