Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Snapshot of
  4. //
  5. //===========================================================================//
  6. #ifndef DMEANIMATIONLIST_H
  7. #define DMEANIMATIONLIST_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "datamodel/dmelement.h"
  12. #include "datamodel/dmattribute.h"
  13. #include "datamodel/dmattributevar.h"
  14. //-----------------------------------------------------------------------------
  15. // Forward declarations
  16. //-----------------------------------------------------------------------------
  17. class CDmeChannelsClip;
  18. //-----------------------------------------------------------------------------
  19. // A class representing a list of animations
  20. //-----------------------------------------------------------------------------
  21. class CDmeAnimationList : public CDmElement
  22. {
  23. DEFINE_ELEMENT( CDmeAnimationList, CDmElement );
  24. public:
  25. int GetAnimationCount() const;
  26. CDmeChannelsClip *GetAnimation( int nIndex );
  27. int FindAnimation( const char *pAnimName );
  28. void SetAnimation( int nIndex, CDmeChannelsClip *pAnimation );
  29. int AddAnimation( CDmeChannelsClip *pAnimation );
  30. void RemoveAnimation( int nIndex );
  31. private:
  32. CDmaElementArray<CDmeChannelsClip> m_Animations;
  33. };
  34. //-----------------------------------------------------------------------------
  35. // Inline methods
  36. //-----------------------------------------------------------------------------
  37. inline int CDmeAnimationList::GetAnimationCount() const
  38. {
  39. return m_Animations.Count();
  40. }
  41. inline CDmeChannelsClip *CDmeAnimationList::GetAnimation( int nIndex )
  42. {
  43. return m_Animations[nIndex];
  44. }
  45. #endif // DMEANIMATIONLIST_H