|
degate 0.1.1
|
Storage policy for image objects that resists in memory. More...
#include <StoragePolicies.h>

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 |
Storage policy for image objects that resists in memory.
Definition at line 78 of file StoragePolicies.h.
| 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) {
}
| virtual degate::StoragePolicy_Memory< PixelPolicy >::~StoragePolicy_Memory | ( | ) | [inline, virtual] |
Definition at line 91 of file StoragePolicies.h.
{}
| 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);
}

| 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);
}

MemoryMap<typename PixelPolicy::pixel_type> degate::StoragePolicy_Memory< PixelPolicy >::memory_map [protected] |
Definition at line 83 of file StoragePolicies.h.
Referenced by degate::StoragePolicy_Memory< PixelPolicy >::get_pixel(), and degate::StoragePolicy_Memory< PixelPolicy >::set_pixel().
const MAP_STORAGE_TYPE degate::StoragePolicy_Memory< PixelPolicy >::storage_type = MAP_STORAGE_TYPE_MEM [static, protected] |
Definition at line 82 of file StoragePolicies.h.
1.7.4