diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-11 16:54:58 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-11 16:54:58 +0000 |
commit | 249203127d1ae989785978024ef0ad25bc994384 (patch) | |
tree | df20ef109ae5435b0fa6ccd6219fa03ab2ef1a86 /libdimensionxx/dimensionxx/canvas.hpp | |
parent | ca84516fa80cfca35da7df71ea04423780028212 (diff) | |
download | dimension-249203127d1ae989785978024ef0ad25bc994384.tar.xz |
Allow Array's of non-POD types through specialized Array_Element class.
Diffstat (limited to 'libdimensionxx/dimensionxx/canvas.hpp')
-rw-r--r-- | libdimensionxx/dimensionxx/canvas.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libdimensionxx/dimensionxx/canvas.hpp b/libdimensionxx/dimensionxx/canvas.hpp index c75b100..321e1c7 100644 --- a/libdimensionxx/dimensionxx/canvas.hpp +++ b/libdimensionxx/dimensionxx/canvas.hpp @@ -60,6 +60,25 @@ namespace Dimension std::tr1::shared_ptr<dmnsn_canvas*> m_canvas; }; + + // Array_Element specialization + template <> + class Array_Element<Canvas> + : public DMNSN_Array_Element<Canvas, dmnsn_canvas*> + { + public: + typedef dmnsn_canvas* C_Type; + + Array_Element() { } + Array_Element(Canvas& canvas) + : DMNSN_Array_Element<Canvas, dmnsn_canvas*>(canvas) { } + Array_Element(C_Type c) + : DMNSN_Array_Element<Canvas, dmnsn_canvas*>(c) { } + // Array_Element(const Array_Element& ae); + // ~Array_Element(); + + // Array_Element& operator=(const Array_Element& ae); + }; } #endif /* DIMENSIONXX_CANVAS_HPP */ |