SVGAttributeToPropertyMap.h [plain text]
#ifndef SVGAttributeToPropertyMap_h
#define SVGAttributeToPropertyMap_h
#include "SVGPropertyInfo.h"
#include <wtf/HashMap.h>
namespace WebCore {
class SVGAnimatedProperty;
class SVGElement;
class SVGAttributeToPropertyMap {
public:
bool isEmpty() const { return m_map.isEmpty(); }
void addProperties(const 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, std::unique_ptr<PropertiesVector>> AttributeToPropertiesMap;
AttributeToPropertiesMap m_map;
};
}
#endif