#pragma once
#include "Animation.h"
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
class AnimationList : public RefCounted<AnimationList> {
public:
static Ref<AnimationList> create() { return adoptRef(*new AnimationList); }
Ref<AnimationList> copy() const { return adoptRef(*new AnimationList(*this)); }
void fillUnsetProperties();
bool operator==(const AnimationList&) const;
bool operator!=(const AnimationList& other) const
{
return !(*this == other);
}
size_t size() const { return m_animations.size(); }
bool isEmpty() const { return m_animations.isEmpty(); }
void resize(size_t n) { m_animations.resize(n); }
void remove(size_t i) { m_animations.remove(i); }
void append(Ref<Animation>&& animation) { m_animations.append(WTFMove(animation)); }
Animation& animation(size_t i) { return m_animations[i].get(); }
const Animation& animation(size_t i) const { return m_animations[i].get(); }
private:
AnimationList();
AnimationList(const AnimationList&);
AnimationList& operator=(const AnimationList&);
Vector<Ref<Animation>, 0, CrashOnOverflow, 0> m_animations;
};
WTF::TextStream& operator<<(WTF::TextStream&, const AnimationList&);
}