//////////////////////////////////////////////////////////////////////////////
// Name:        SVGAnimatedPreserveAspectRatio.h
// Author:      Alex Thuering
// Copyright:   (c) 2005 Alex Thuering
// Licence:     wxWindows licence
// Notes:       generated by genAnimated.py
//////////////////////////////////////////////////////////////////////////////

#ifndef WX_SVG_ANIMATED_PRESERVE_ASPECT_RATIO_H
#define WX_SVG_ANIMATED_PRESERVE_ASPECT_RATIO_H

#include "SVGPreserveAspectRatio.h"

class wxSVGAnimatedPreserveAspectRatio
{
  public:
    wxSVGAnimatedPreserveAspectRatio(): m_animVal(NULL) {}
    wxSVGAnimatedPreserveAspectRatio(const wxSVGPreserveAspectRatio& value): m_baseVal(value), m_animVal(NULL) {}
    wxSVGAnimatedPreserveAspectRatio(const wxSVGAnimatedPreserveAspectRatio& value): m_baseVal(value.m_baseVal), m_animVal(NULL)
    { if (value.m_animVal != NULL) m_animVal = new wxSVGPreserveAspectRatio(*value.m_animVal); }
    ~wxSVGAnimatedPreserveAspectRatio() { ResetAnimVal(); }
    
    inline wxSVGAnimatedPreserveAspectRatio& operator=(const wxSVGAnimatedPreserveAspectRatio& value)
    { m_baseVal = value.m_baseVal; m_animVal = value.m_animVal != NULL ? new wxSVGPreserveAspectRatio(*value.m_animVal) : NULL; return *this; }
    
    inline wxSVGPreserveAspectRatio& GetBaseVal() { return m_baseVal; }
    inline const wxSVGPreserveAspectRatio& GetBaseVal() const { return m_baseVal; }
    inline void SetBaseVal(const wxSVGPreserveAspectRatio& value) { m_baseVal = value; ResetAnimVal(); }
    
    inline wxSVGPreserveAspectRatio& GetAnimVal()
    {
      if (!m_animVal)
        m_animVal = new wxSVGPreserveAspectRatio(m_baseVal);
      return *m_animVal;
    }
    inline const wxSVGPreserveAspectRatio& GetAnimVal() const
    {
        return m_animVal ? *m_animVal : m_baseVal;
    }
    inline void SetAnimVal(const wxSVGPreserveAspectRatio& value)
    {
      if (!m_animVal)
        m_animVal = new wxSVGPreserveAspectRatio(value);
      else
        *m_animVal = value;
    }
    inline void ResetAnimVal()
    {
      if (m_animVal)
      {
        delete m_animVal;
        m_animVal = NULL;
      }
    }
    
  public:
    inline operator const wxSVGPreserveAspectRatio&() const { return GetAnimVal(); }
    
  protected:
    wxSVGPreserveAspectRatio m_baseVal;
    wxSVGPreserveAspectRatio* m_animVal;
};


#endif // WX_SVG_ANIMATED_PRESERVE_ASPECT_RATIO_H
