summaryrefslogtreecommitdiff
path: root/public/movieobjects/dmeanimationlist.h
blob: 9c9a0263b27d47be51c323542c168913da9b31d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Snapshot of 
//
//===========================================================================//

#ifndef DMEANIMATIONLIST_H
#define DMEANIMATIONLIST_H

#ifdef _WIN32
#pragma once
#endif

#include "datamodel/dmelement.h"
#include "datamodel/dmattribute.h"
#include "datamodel/dmattributevar.h"


//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CDmeChannelsClip;


//-----------------------------------------------------------------------------
// A class representing a list of animations
//-----------------------------------------------------------------------------
class CDmeAnimationList : public CDmElement
{
	DEFINE_ELEMENT( CDmeAnimationList, CDmElement );

public:
	int GetAnimationCount() const;
	CDmeChannelsClip *GetAnimation( int nIndex );
	int FindAnimation( const char *pAnimName );
	void SetAnimation( int nIndex, CDmeChannelsClip *pAnimation );
	int AddAnimation( CDmeChannelsClip *pAnimation );
	void RemoveAnimation( int nIndex );

private:
	CDmaElementArray<CDmeChannelsClip> m_Animations;
};


//-----------------------------------------------------------------------------
// Inline methods
//-----------------------------------------------------------------------------
inline int CDmeAnimationList::GetAnimationCount() const
{
	return m_Animations.Count();
}

inline CDmeChannelsClip *CDmeAnimationList::GetAnimation( int nIndex )
{
	return m_Animations[nIndex];
}


#endif // DMEANIMATIONLIST_H