1 #ifndef GENESIS_UTILS_FORMATS_SVG_OBJECT_H_
2 #define GENESIS_UTILS_FORMATS_SVG_OBJECT_H_
60 template<
typename T >
68 : pimpl_( other.pimpl_->clone() )
90 return pimpl_->bounding_box_();
98 pimpl_->write_( out,
indent, options );
109 virtual ~Concept() {}
111 virtual SvgBox bounding_box_()
const = 0;
116 SvgDrawingOptions
const& options = SvgDrawingOptions()
119 virtual std::unique_ptr< Concept > clone()
const = 0;
122 template<
typename T >
123 struct Model : Concept
125 Model( T
const& value )
129 SvgBox bounding_box_()
const override
131 return object_.bounding_box();
137 SvgDrawingOptions
const& options = SvgDrawingOptions()
139 object_.write( out,
indent, options );
142 std::unique_ptr< Concept > clone()
const override
146 return genesis::utils::make_unique< Model<T> >( object_ );
152 std::unique_ptr< Concept > pimpl_;
159 #endif // include guard