|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_FORMATS_SVG_DEFINITIONS_H_
2 #define GENESIS_UTILS_FORMATS_SVG_DEFINITIONS_H_
61 template<
typename T >
67 : pimpl_( other.pimpl_->clone() )
91 pimpl_->write_( out,
indent );
102 virtual ~Concept() {}
109 virtual std::unique_ptr< Concept > clone()
const = 0;
112 template<
typename T >
113 struct Model : Concept
115 Model( T
const& value )
123 object_.write( out,
indent );
126 std::unique_ptr< Concept > clone()
const override
130 return genesis::utils::make_unique< Model<T> >( object_ );
136 std::unique_ptr< Concept > pimpl_;
143 #endif // include guard
void swap(Sample &lhs, Sample &rhs)
std::string indent(std::string const &text, std::string const &indentation)
Indent each line of text with indentation and return the result.
Provides some valuable additions to STD.
SvgDefinitions & operator=(SvgDefinitions other)
~SvgDefinitions()=default
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
void write(std::ostream &out, size_t indent=0) const
SvgDefinitions(SvgDefinitions const &other)
std::unique_ptr< T > make_unique(Args &&... args)
Returns a std::unique_ptr for a given type.
SvgDefinitions(T const &object)