#ifndef SVGNumberOptionalNumber_h
#define SVGNumberOptionalNumber_h
#include "core/svg/SVGAnimatedNumber.h"
namespace WebCore {
class SVGNumberOptionalNumber : public SVGPropertyBase {
public:
typedef void TearOffType;
typedef void PrimitiveType;
static PassRefPtr<SVGNumberOptionalNumber> create(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNumber> secondNumber)
{
return adoptRef(new SVGNumberOptionalNumber(firstNumber, secondNumber));
}
PassRefPtr<SVGNumberOptionalNumber> clone() const;
virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const OVERRIDE;
virtual String valueAsString() const OVERRIDE;
void setValueAsString(const String&, ExceptionState&);
virtual void add(PassRefPtr<SVGPropertyBase>, SVGElement*) OVERRIDE;
virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) OVERRIDE;
virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) OVERRIDE;
static AnimatedPropertyType classType() { return AnimatedNumberOptionalNumber; }
PassRefPtr<SVGNumber> firstNumber() { return m_firstNumber; }
PassRefPtr<SVGNumber> secondNumber() { return m_secondNumber; }
protected:
SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNumber> secondNumber);
RefPtr<SVGNumber> m_firstNumber;
RefPtr<SVGNumber> m_secondNumber;
};
inline PassRefPtr<SVGNumberOptionalNumber> toSVGNumberOptionalNumber(PassRefPtr<SVGPropertyBase> passBase)
{
RefPtr<SVGPropertyBase> base = passBase;
ASSERT(base->type() == SVGNumberOptionalNumber::classType());
return static_pointer_cast<SVGNumberOptionalNumber>(base.release());
}
}
#endif