Public Member Functions | Protected Attributes

AnimEnum Class Reference

Search for all occurrences

Detailed Description

A callback class for Animatable::EnumAnimTree().

This class automatically keeps track of the depth of the enumeration.

See also:
class Animatable

#include <AnimEnum.h>

Inheritance diagram for AnimEnum:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  AnimEnum (int s=SCOPE_OPEN, int deep=0, DWORD tv=0xffffffff)
  Constructor.
virtual  ~AnimEnum ()
  Destructor.
void  SetScope (int s)
  Implemented by the System.
int  Scope ()
  Implemented by the System.
void  IncDepth ()
  Implemented by the System.
void  DecDepth ()
  Implemented by the System.
int  Depth ()
  Implemented by the System.
DWORD  TVBits ()
virtual int  proc (Animatable *anim, Animatable *client, int subNum)=0
  This is the method called by EnumAnimTree().

Protected Attributes

int  depth
int  scope
DWORD  tv

Constructor & Destructor Documentation

AnimEnum ( int  s = SCOPE_OPEN,
int  deep = 0,
DWORD  tv = 0xffffffff 
) [inline]

Constructor.

Sets default scope and depth if specified.

Returns:
A new AnimEnum object.
            {scope = s; depth = deep; this->tv = tv;}
virtual ~AnimEnum ( ) [inline, virtual]

Destructor.

{;}

Member Function Documentation

void SetScope ( int  s ) [inline]

Implemented by the System.



Sets the scope. See below for possible values.

Parameters:
s Specifies the scope to set. See below.
{ scope = s; }
int Scope ( ) [inline]

Implemented by the System.



Returns the scope.

Returns:
One or more of the following scope values:

SCOPE_DOCLOSED

Do closed animatables.

SCOPE_SUBANIM

Do the sub anims

SCOPE_CHILDREN

Do the node children

SCOPE_OPEN

Do all open animatables

Equal to (SCOPE_SUBANIM|SCOPE_CHILDREN)

SCOPE_ALL

Do all animatables.

Equal to (SCOPE_OPEN|SCOPE_DOCLOSED)
{ return scope; }
void IncDepth ( ) [inline]

Implemented by the System.



Increments the depth count.

{ depth++; }
void DecDepth ( ) [inline]

Implemented by the System.



Decrements the depth count.

{ depth--; }
int Depth ( ) [inline]

Implemented by the System.



Returns the depth count.

{ return depth; }
DWORD TVBits ( ) [inline]
virtual int proc ( Animatable anim,
Animatable client,
int  subNum 
) [pure virtual]

This is the method called by EnumAnimTree().

Parameters:
anim The sub anim.
client The client anim. This is the parent with a sub-anim of anim.
subNum The index of the sub-anim that anim is to client. For example, if you were to call client->SubAnim(subNum) it would return anim.
Returns:
One of the following values:

ANIM_ENUM_PROCEED

Continue the enumeration process.

ANIM_ENUM_STOP

Stop the enumeration process at this level.

ANIM_ENUM_ABORT

Abort the enumeration processing.

Implemented in ClearAnimFlagEnumProc.


Member Data Documentation

int depth [protected]
int scope [protected]
DWORD tv [protected]

AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum
AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum AnimEnum