SVGAttributeToPropertyMap.h [plain text]
#ifndef SVGAttributeToPropertyMap_h
#define SVGAttributeToPropertyMap_h
#if ENABLE(SVG)
#include "QualifiedName.h"
#include "SVGAnimatedPropertySynchronizer.h"
#include <wtf/HashMap.h>
namespace WebCore {
class SVGAnimatedProperty;
class SVGElement;
struct SVGPropertyInfo;
class SVGAttributeToPropertyMap {
public:
SVGAttributeToPropertyMap() { }
~SVGAttributeToPropertyMap() { deleteAllValues(m_map); }
bool isEmpty() const { return m_map.isEmpty(); }
void addProperties(SVGAttributeToPropertyMap&);
void addProperty(const SVGPropertyInfo*);
void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >&);
void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>&);
void synchronizeProperties(SVGElement* contextElement);
bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName);
private:
void synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName, const SVGPropertyInfo*);
PassRefPtr<SVGAnimatedProperty> animatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, const SVGPropertyInfo*);
typedef Vector<const SVGPropertyInfo*> PropertiesVector;
typedef HashMap<QualifiedName, PropertiesVector*> AttributeToPropertiesMap;
AttributeToPropertiesMap m_map;
};
}
#endif
#endif