degate  0.1.2
Public Member Functions | Protected Attributes | Static Protected Attributes
degate::StoragePolicy_Memory< PixelPolicy > Class Template Reference

Storage policy for image objects that resists in memory. More...

#include <StoragePolicies.h>

Inheritance diagram for degate::StoragePolicy_Memory< PixelPolicy >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 StoragePolicy_Memory (unsigned int _width, unsigned int _height)
virtual ~StoragePolicy_Memory ()
PixelPolicy::pixel_type get_pixel (unsigned int x, unsigned int y) const
 Get pixel for "native" pixel types.
void set_pixel (unsigned int x, unsigned int y, typename PixelPolicy::pixel_type new_val)
 Set "native" pixel.

Protected Attributes

MemoryMap< typename
PixelPolicy::pixel_type > 
memory_map

Static Protected Attributes

static const MAP_STORAGE_TYPE storage_type = MAP_STORAGE_TYPE_MEM

Detailed Description

template<class PixelPolicy>
class degate::StoragePolicy_Memory< PixelPolicy >

Storage policy for image objects that resists in memory.

Definition at line 78 of file StoragePolicies.h.


Constructor & Destructor Documentation

template<class PixelPolicy >
degate::StoragePolicy_Memory< PixelPolicy >::StoragePolicy_Memory ( unsigned int  _width,
unsigned int  _height 
) [inline]

Definition at line 87 of file StoragePolicies.h.

                                                                    :
      memory_map(_width, _height) {
    }
template<class PixelPolicy >
virtual degate::StoragePolicy_Memory< PixelPolicy >::~StoragePolicy_Memory ( ) [inline, virtual]

Definition at line 91 of file StoragePolicies.h.

{}

Member Function Documentation

template<class PixelPolicy >
PixelPolicy::pixel_type degate::StoragePolicy_Memory< PixelPolicy >::get_pixel ( unsigned int  x,
unsigned int  y 
) const [inline, virtual]

Get pixel for "native" pixel types.

This method is abstract. If you derive from this class, you should implement it for a concrete StoragePolicy.

Implements degate::StoragePolicy_Base< PixelPolicy >.

Definition at line 93 of file StoragePolicies.h.

References degate::MemoryMap< T >::get(), and degate::StoragePolicy_Memory< PixelPolicy >::memory_map.

                                                                                          {
      return memory_map.get(x, y);
    }

Here is the call graph for this function:

template<class PixelPolicy >
void degate::StoragePolicy_Memory< PixelPolicy >::set_pixel ( unsigned int  x,
unsigned int  y,
typename PixelPolicy::pixel_type  new_val 
) [inline, virtual]

Set "native" pixel.

This method is abstract. If you derive from this class, you should implement it for a concrete StoragePolicy.

Implements degate::StoragePolicy_Base< PixelPolicy >.

Definition at line 97 of file StoragePolicies.h.

References degate::StoragePolicy_Memory< PixelPolicy >::memory_map, and degate::MemoryMap< T >::set().

                                                           {
      memory_map.set(x, y, new_val);
    }

Here is the call graph for this function:


Member Data Documentation

template<class PixelPolicy >
MemoryMap<typename PixelPolicy::pixel_type> degate::StoragePolicy_Memory< PixelPolicy >::memory_map [protected]
template<class PixelPolicy >
const MAP_STORAGE_TYPE degate::StoragePolicy_Memory< PixelPolicy >::storage_type = MAP_STORAGE_TYPE_MEM [static, protected]

Definition at line 82 of file StoragePolicies.h.


The documentation for this class was generated from the following file: