model for some specified category.
template< typename category_name >
class model;
template< typename category_name >
class model
{
public:
typedef category_name category_type;
typedef typename ::color:trait::index< category_type>::instance_type index_type;
typedef unspecified index_return_image_type;
typedef unspecified index_input_const_type
typedef typename ::color:trait::component< category_type>::instance_type component_type;
typedef unspecified component_input_const_type;
typedef unspecified component_return_const_type;
typedef typename ::color:trait::container< category_type>::instance_type container_type;
typedef unspecified container_return_const_type;
typedef unspecified container_return_original_type;
typedef unspecified container_input_const_type;
typedef typename ::color:trait::size< category_type>::instance_type size_type;
typedef unspecified set_return_type;
typedef model< typename category_name > this_type;
model();
explicit model( container_input_const_type container );
template< typename tag_name >
explicit model( ::color::constant::base< tag_name > const& constant );
explicit model( std::initializer_list<component_type> const& ilist );
model( ::color::model<category_type> const& that );
template< typename other_category_name >
explicit model( ::color::model<other_category_name> const& that );
template< typename tag_name >
this_type & operator=( ::color::constant::base< tag_name > const& constant );
template< typename other_category_name >
this_type & operator=( ::color::model<other_category_name> const& that );
component_return_const_type get( index_input_const_type index )const;
template< index_type index >
component_return_const_type get()const;
set_return_type set( index_input_const_type index, component_input_const_type component );
template< index_type index >
set_return_type set( component_input_const_type component );
component_return_const_type operator[]( index_input_const_type index )const;
proxy_type operator[]( index_input_const_type index );
container_return_const_type container()const;
container_return_original_type container();
void container( container_input_const_type container );
static size_type size();
private:
container_type m_container;
};
category_typetypedef category_name category_type;component_typeindex_input_const_typeindex_typecomponent_input_const_typecomponent_return_const_typecontainer_return_const_typecontainer_return_original_typecontainer_input_const_typeindex_return_image_typetypedef ::color:trait::container< category_type>::return_image_type index_return_image_type; container_typetypedef ::color:trait::container< category_type>::instance_type container_type; size_typetypedef typename ::color:trait::size< category_type>::instance_type size_type;set_return_typetypedef typename container_trait_type::set_return_type set_return_type;this_typetypedef model< typename category_name > this_type;model();explicit model( container_input_const_type container );template< typename tag_name >
explicit model( ::color::constant::base< tag_name > const& constant );explicit model( std::initializer_list const& ilist ); model( ::color::model<category_type> const& that );template< typename other_category_name >
explicit model( ::color::model<other_category_name> const& that );template< typename tag_name > this_type & operator=( ::color::constant::base< tag_name > const& constant ); template< typename other_category_name > this_type & operator=( ::color::model<other_category_name> const& that );component_return_const_type
get( index_input_const_type index )const template< index_type index >
component_return_const_type get()const;set_return_type set( index_input_const_type index, component_input_const_type component ) set is slow in compare to template version.template< index_type index >
set_return_type set( component_input_const_type component ) set is faster and it is optimized to get only component for given index .component_return_const_type operator[]( index_input_const_type index )const operator[]( index_input_const_type index ). Modification of return value has effect on instance as using set function.proxy_type operator[]( index_input_const_type index ); container_return_const_type container()const container_return_original_type container() void container( container_input_const_type container );static size_type size() m_containercontainer_typecolor::model< color::category::rgb_float > r; Equal to: color::rgb<float> r; color::model< color::category::hsl_uint8 > h; Equal to: color::hsl<std::uint8_t> h;