SVGAttrValueWrapper.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef MOZILLA_SVGATTRVALUEWRAPPER_H__
  6. #define MOZILLA_SVGATTRVALUEWRAPPER_H__
  7. /**
  8. * Utility wrapper for handling SVG types used inside nsAttrValue so that these
  9. * types don't need to be exported outside the SVG module.
  10. */
  11. #include "nsStringGlue.h"
  12. class nsSVGAngle;
  13. class nsSVGIntegerPair;
  14. class nsSVGLength2;
  15. class nsSVGNumberPair;
  16. class nsSVGViewBox;
  17. namespace mozilla {
  18. class SVGLengthList;
  19. class SVGNumberList;
  20. class SVGPathData;
  21. class SVGPointList;
  22. class SVGAnimatedPreserveAspectRatio;
  23. class SVGStringList;
  24. class SVGTransformList;
  25. } // namespace mozilla
  26. namespace mozilla {
  27. class SVGAttrValueWrapper
  28. {
  29. public:
  30. static void ToString(const nsSVGAngle* aAngle, nsAString& aResult);
  31. static void ToString(const nsSVGIntegerPair* aIntegerPair,
  32. nsAString& aResult);
  33. static void ToString(const nsSVGLength2* aLength, nsAString& aResult);
  34. static void ToString(const mozilla::SVGLengthList* aLengthList,
  35. nsAString& aResult);
  36. static void ToString(const mozilla::SVGNumberList* aNumberList,
  37. nsAString& aResult);
  38. static void ToString(const nsSVGNumberPair* aNumberPair, nsAString& aResult);
  39. static void ToString(const mozilla::SVGPathData* aPathData,
  40. nsAString& aResult);
  41. static void ToString(const mozilla::SVGPointList* aPointList,
  42. nsAString& aResult);
  43. static void ToString(
  44. const mozilla::SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
  45. nsAString& aResult);
  46. static void ToString(const mozilla::SVGStringList* aStringList,
  47. nsAString& aResult);
  48. static void ToString(const mozilla::SVGTransformList* aTransformList,
  49. nsAString& aResult);
  50. static void ToString(const nsSVGViewBox* aViewBox, nsAString& aResult);
  51. };
  52. } /* namespace mozilla */
  53. #endif // MOZILLA_SVGATTRVALUEWRAPPER_H__